While trying to code a new indicator, I'm not able to reference any past bars in my scripting. Whenever I use a positive value for the 'barsago' offset index variable, I get blank indicator values. Not undefined, just blank. Even if I simplify my entire indicator down to:
Plot0.Set(Close[1]); I still get nothing. Plot0.Set(Close[0]); works fine and plots the current close, and Plot0.Set(Close[-1]); works as well and plots the next close. But I simply cannot reference past bars with a positive 'barsago' value.
Please help.

Comment