NexusFi: Find Your Edge


Home Menu

 





multi time frame indicator lags


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one microsat with 2 posts (0 thanks)
    2. looks_two Fat Tails with 2 posts (4 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Big Mike with 1 posts (0 thanks)
    1. trending_up 2,304 views
    2. thumb_up 4 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
microsat
houston texas/us
 
Posts: 25 since Dec 2014
Thanks Given: 6
Thanks Received: 2

I used xcMovAvg to draw EMA(20) under range 4. The line of the multi time frame seems to lag a little bit behind EMA(20) under range 4. What causes the lag?

Any solutions for this?

Imgur: The most awesome images on the Internet


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
Victory Day Delivers: Russia-Ukraine Ceasefire Market Cl …
Prediction Markets & Event Contracts
Iran Airspace Contract Surges to 33.5% as Project Freedo …
Prediction Markets & Event Contracts
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
MyForexFunds Begins Returning Frozen Funds After CFTC Ca …
Funded Trading Evaluation Firms
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


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.


Reply With Quote
Thanked by:
  #4 (permalink)
microsat
houston texas/us
 
Posts: 25 since Dec 2014
Thanks Given: 6
Thanks Received: 2

If we call the visualEMA from a strategy, will the indicator lag? How much does it lag, one tick or one bar?

Or should we not call visualEMA from any strategy?

No strategy that can use MTF indicator without lag?


Fat Tails View Post
"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.



Reply With Quote
  #5 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,557


Fat Tails View Post
The lag is a result of the way NinjaTrader processes bars internally (design flaw).

@Fat Tails do you know if this is resolved with NT8? I assume you are one of the beta testers.

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


Big Mike View Post
@Fat Tails do you know if this is resolved with NT8? I assume you are one of the beta testers.

Mike

I have not checked it so far.


Reply With Quote
Thanked by:




Last Updated on September 21, 2015


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts