The lag is a result of the way NinjaTrader processes bars internally (design flaw). For a multi-timeframe indicator NinjaTrader first processes the primary bars (the bars that can be seen on the chart). In a second step all secondary bar series (those loaded via the indicator) are processed.
Your chart shows the special case, where the primary bars and the secondary bars are identical (4 range bars). In that case when the primary bars are processed, the indicator value is calculated from the last available value from the secondary bar series. This is the prior bar, as the current bar of the secondary bar series has not yet been processed. Therefore the multi-timeframe indicator is lagging by 1 bars.
There are some workarounds possible
-> For historical bars you can access the current bar of the secondary bar series as the value is already known, it is possible to eliminate the lag for historical bars. The chart below shows the VisualEMA which has no lag when compared to the regular EMA.
-> For real-time bars you may paint back (override) the lagging value after the current bar of the secondary bar series has been processed. I have integrated this feature with my multi-timeframe indicator and called it "one-tick correction". "One-tick correction" should be avoided when calling the indicator via a strategy. Therefore the indicator comes with a strategy mode (1 bar lag with real-time data) and the "One-tick correction" mode, which repaints 1-tick back and shows no lag.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
The following 3 users say Thank You to Fat Tails for this post:
@Fat Tails do you know if this is resolved with NT8? I assume you are one of the beta testers.
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.