Is it OK to use the DataSeries back shift operator (<<) in a live strategy?
Author: tschwei
Creation Date: 3/9/2017 2:16 AM
profile picture

tschwei

#1
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
profile picture

Eugene

#2
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 (>>).
profile picture

Cone

#3
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.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).