I would like to set my stop loss on the lower band of a keltner channel if the position is long.
So the keltner channel lower band becomes my stop loss or stop profit as is the case. The idea is that the stop loss should follow the trend as it develops.
I wrote this code,
double longTrailStop = KeltnerChannel(1.5 , 10).Lower[1] ;
SetStopLoss( "LongTrade", CalculationMode.Price, longTrailStop, false);
but it is not working, and I do not understand why?
When I activate the strategy on a chart, Ninjatrader automatically deactivate it!
Please help!
Thank you.
Comment