I just coded a nice strategy for Ninjatrader but I have problems with the necessary trailingstop.
(case long)
All the trailingstop is supposed to do is to close a long position if the current price falls below the low of the previous bar.
I tried things like
if (Low[0] < Low[-1])
ExitLong();
Is there any method which I can call to pass the low of the previous bar? Or do I have to create such a method myself? Maybe it as simple as creating an array which saves all the lows? But where to implement? In OnBarUpdate() it would override the value everytime.
I hope you can understand my problem and help me to find a solution.
Thanks!
Comment