I copied and pasted the code from the example exactly and it compiles fine. Once I add the indicator nothing happens but I get an interesting error in the log.
Error on calling the 'OnBarUpdate' method for indicator '3BarBearishReversal' on bar 0: Index was out of range. Must be non-negative and less than the size of the collection'
After a few hours thinking the logic was wrong somehow, i just put a negative sign in front of all the index like:
if (High[-2] > High[-3] && High[-1] > High[-2] && Close[0] < Open[0])
DrawArrowDown(CurrentBar.ToString(), 0, High[0] + TickSize, Color.Blue);
I still get the error but now the arrows have started showing up but they are displaced a few bars.
Also the Level 7 ninjascript tutorial missing in the help is not helping?
Where am I going wrong? I just copied and pasted the example.
thanks
geo
Comment