Hi,
I have a simple question:
In general is it safe/OK to use the << DataSeries shift operator in a strategy?
(The reason I ask is that is a simple way to "shift back" a moving average so the peaks line up with the underlying values.)
I assume the answer is no, because it creates a new data series by taking future bars and shifting them back.
I also assume it is OK to use this in a Neuro-Net output training script, since this won't be used when the strategy runs.
Thanks,
Tim
Size:
Color:
Hi Tim,
QUOTE:
In general is it safe/OK to use the << DataSeries shift operator in a strategy?
No, it's not OK to use the peeking left shift operator in a Strategy. The only valid use is to take data in the past and shift it to the right (>>).
Size:
Color:
And right, the << operator could be used in a N-L Output [training] script since the neuroLab,Output series purposely peeks ahead to align a predicted value with the current bar.
For example, the Output script in the User Guide example is equivalent to this:
CODE:
Please log in to see this code.
Size:
Color: