What I am wanting to do, is when the bars since the start of the session is LESS THAN the period I am using, use the last x number of values from the prior session... BUT offset by the size of the gap. I am attaching a picture of that called "exhibitA."
What I did was create a 'synthetic' data series, that is simply the last x number of values from the prior session, but simply shifted by the gap amount. You can see this in the picture 'exhibitA,' as I drew dots on the Synthetic series, and you can see it is shifted by the gap amount.
Then the plotting, is simply set based on the number of bars since the session start, so if the number of bars is LESS than the period chosen, the MA is built with the synthetic session. If GREATER, it is built with the closing price as is normally the case.
So the problem is that this works exactly the way I want using "EMA." But when using SMA, or Linear Regression for example, it just doesn't work the way it should? I believe this is just the way the built in NT MAs handle being referenced.
See the attached pic labeled "ExhibitB." Only change was to reference an SMA instead of EMA, and it handles the series weirdly.
I am wondering if anyone knows the reason the EMA handles the data the way I want, but not other MA types in NT?
Thanks!
Comment