Help to Automate an Order and set TP

Created at 03 Feb 2021, 14:38
TW

twootwogaming

Joined 03.02.2021

Help to Automate an Order and set TP
03 Feb 2021, 14:38


I have this indicator of Daily Price Lines and i want to automate this.

var bars = MarketData.GetBars(TimeFrame.Daily);

if (High)
                Chart.DrawHorizontalLine("Daily High", bars.HighPrices.Last(1), Color, 1, LineStyle.Dots);

if (Low)
                Chart.DrawHorizontalLine("Daily Low", bars.LowPrices.Last(1), Color, 1, LineStyle.Dots);

 

Example.

//Buy Order

Execute a Buy order and set my Target profit to the Daily High Line.

//Sell Order

Execute a Sell order and set my Target profit to the Daily Low Line.

 

Hope that someone can help me to do this.

 

Thanks


@twootwogaming