I seem to be getting an error when using this code:
if ( Close[0] <= MAX( Close[0], BarsSinceEntryExecution(1,@"Long",0) )[0] -.45)
I get "Value of property 'Period' of ninjacript 'Max' is -1 and not in valid range between 1 and 2147...."
I understand that a value of "-1" occurs if no previous entry is found, but is there a way to simply return "0" if not in a trade so that I can actually initialize the strategy?
Anyone else have this problem?
Comment