I want to apply a stop loss using the ATR(14).
I wrote the following code:
// Condition set Long Stop Loss
if (Close[0] < (Position.AvgPrice - ATR(14)[0])
&& Position.MarketPosition == MarketPosition.Long)
{
ExitLong("STOPLOSS", "BUY");
}
Problem is, the stop loss never kicks in!
Any advice?
Thank you
Comment