The images below show the dramatic difference this approach can make.
In this example of ATR you’ll notice the 14 bars at the session open are artificially high without the “GapLess” code.
It’s the same with PercentR. It takes 14 bars to settle down and return to normal. GL (GapLess) allows PercentR to show a buy signal at the 8th bar of the day which would have been missed on the non-corrected version.
Notice how the Bollinger Band acts at the opening. It gives a false BUY signal on the first bar of the day. The GL version gives a buy signal several bars later, near the relative low of the first twenty bars of the day.
Here’s the GL version of the BB.
You can see the regular RSI gave a false buy signal at the opening bar.
The GL version of RSI gave the first buy signal over twenty bars later near the actual low.
The regular Stochastic is indicating an oversold condition at the market open.
The GL version of the Stochastic indicates the open is overbought and correctly gives a sell signal near the sixth bar of the day.
I do not think that the approach of subtracting or adding a gap is valid.
Let us take the following example: Yesterday was a down day for ES that closed near the low. The EMA is some points above the close. During the night session ES retraces 38% of the move.
If you adjust for the gap, you will find the EMA above the open, which is higher than the high of the Globex session. I do not think that this makes sense.
A better approach would be resetting the EMA at the begin of the session. Just replace CurrentBar in the EMA formula of the EMA CurrentSessionBar, where CurrentSessionBar is an integer, which is reset to 0 at the begin of the session and increased by 1 with every new bar -> use FirstTickOfBar.
I have used a similar approach for the CurrentSessionVWAP.
It is important not to pollute the new EMA with any price action from yesterday. The same applies, if you want to use an EMA for the NYSE Tick. It simply does not make sense to include any tick readings from the day before.
The following 3 users say Thank You to Fat Tails for this post:
I am not trying to create a gapless chart, but a gapless indicator. Instead of an ema 20, for instance, taking 20 bars to catch up on a RTH chart after a big gap, I wanted to experiment with having a gapless EMA that would not be 'lagging' simply because of the gap. In other words, it's a 'smart' ema that could be set to 'ignore' the gap, thereby showing what an EMA 20 would look like (close) if the chart was ETH instead of RTH for the first 20 bars after the open.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
This can only be achieved, if the indicator can access the data of the ETH session prior to the start of the RTH session. As far as I have seen, Multicharts also allows to use session times for each instrument.
On option would be to use a session template that starts 2 hours prior to the open. You could then start with a recursive EMA(1) formula and run that up to EMA (20) on the 20th bar. This would come close enough at the session start.
I have used a similar approach with NT 7.0, the only problem was that I used an SMA, which due to its recursive formula produced a significant rounding error. This problem could be solved with the setting MaximumBarsLookback.Infinite, but this is a specific NT problem.
The following 2 users say Thank You to Fat Tails for this post: