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 1,687 views
    2. thumb_up 4 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 1 attachments




 
Search this Thread

multi time frame indicator lags

  #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?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Futures True Range Report
The Elite Circle
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


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,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,534


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 Twitter Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts