The following code snipit prints the ParabolicSAR value when backtested, but fails to provide a value other than 0 (zero) when run under Market Replay.
I tried this same test on 6.0 and it ran as expected when backtested and in Market Replay.
[FONT=Courier New][SIZE=2][COLOR=#0000ff]protected[FONT=Courier New][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] OnBarUpdate()[/SIZE][/FONT] [SIZE=2][FONT=Courier New]{[/FONT][/SIZE] [SIZE=2][FONT=Courier New]Print(CurrentBar.ToString() + [/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#800000]" ParabolicSAR=["[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] + ParabolicSAR([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0.02[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0.2[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0.02[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2])[[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]] + [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]"]"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]);[/SIZE][/FONT] [SIZE=2][FONT=Courier New]}[/FONT][/SIZE]
In other testing I have done I belive that in Market Replay or when running in real-time the ParabolicSAR indicator fails to return a value.
Thanks!
Comment