NexusFi: Find Your Edge


Home Menu

 





Coding Multi Time Frame (MTF) Indicators with NinjaTrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 180 posts (562 thanks)
    2. looks_two Zondor with 19 posts (29 thanks)
    3. looks_3 madLyfe with 16 posts (10 thanks)
    4. looks_4 BankRobberNT with 14 posts (16 thanks)
      Best Posters
    1. looks_one gomi with 3.7 thanks per post
    2. looks_two Fat Tails with 3.1 thanks per post
    3. looks_3 Zondor with 1.5 thanks per post
    4. looks_4 BankRobberNT with 1.1 thanks per post
    1. trending_up 186,462 views
    2. thumb_up 743 thanks given
    3. group 87 followers
    1. forum 424 posts
    2. attach_file 166 attachments




 
Search this Thread

Coding Multi Time Frame (MTF) Indicators with NinjaTrader

  #381 (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


mk77ch View Post
i am currently coding an indicator which is using a second dataseries.
the primary is a 1 minute chart and the second is a 5 minute.

could somebody please tell me how many bars of the second (m5) dataseries are getting loaded?
does it just load all available historical 5 minute bars or is there a way i can control this?

cheers,
mike

If you open a 1-minute chart with a lookback of 15 days and then add the indicator to your chart, the indicator will load 5-minute bars for the last 15 calendard days in line with the primary bars.

If you wish to know in detail, which bars are being loaded you can add some print instructions at the very beginning, for example

 
Code
if(BarsInProgress == 0) // primary bars processed
   Print( "BIP0  " + CurrentBars[0] + "  " + Times[0][0]);
else if (BarsInProgress == 1) // secondary bars processed
   Print( "BIP1  " + CurrentBars[1] + "  " + Times[1][0]);

This will show you exactly which bars (bar index and time stamp) are being processed in which order.

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Are there any eval firms that allow you to sink to your …
Traders Hideout
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Futures True Range Report
The Elite Circle
Build trailing stop for micro index(s)
Psychology and Money Management
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
23 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #382 (permalink)
 
mk77ch's Avatar
 mk77ch 
Switzerland
 
Experience: Advanced
Platform: NinjaTrader
Broker: Dorman
Trading: Currency Futures, ES
Posts: 130 since Oct 2010
Thanks Given: 27
Thanks Received: 347

thank you very much for your answer!

cheers,
mike

Reply With Quote
  #383 (permalink)
 jsengxx2 
Portugal, Viana do Castelo
 
Experience: Intermediate
Platform: ninjatrader
Trading: 6e
Posts: 345 since Sep 2011


Is there any indicator that can plot an indicator from another chart?

Reply With Quote
  #384 (permalink)
 sburtt 
London, UK
 
Experience: Advanced
Platform: NinjaTrader
Trading: EUR/USD
Posts: 58 since Jul 2012
Thanks Given: 3
Thanks Received: 4


jsengxx2 View Post
Is there any indicator that can plot an indicator from another chart?

could you be a bit more specific?

Reply With Quote
  #385 (permalink)
 
michaelf's Avatar
 michaelf 
Mérida, Mexico
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8
Broker: NinjaTrader Brokerage
Trading: MNQ
Frequency: Daily
Duration: Minutes
Posts: 559 since Mar 2011
Thanks Given: 1,434
Thanks Received: 581


jsengxx2 View Post
Is there any indicator that can plot an indicator from another chart?



@jsengxx2

maybe this one is the one


Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #386 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 477 since Jun 2009
Thanks Given: 1,416
Thanks Received: 404

Harry,
Thanks for your contributions here. I'm currently reading through the thread while fighting with my Jurbol MTF stochastic to try to incorporate your "essentials" notes regarding proper sequencing. I'll have to work on it further tomorrow. Have you already made a stochastic MTF?

Thanks again,
zeller4 Kirk

Reply With Quote
  #387 (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


zeller4 View Post
Harry,
Thanks for your contributions here. I'm currently reading through the thread while fighting with my Jurbol MTF stochastic to try to incorporate your "essentials" notes regarding proper sequencing. I'll have to work on it further tomorrow. Have you already made a stochastic MTF?

Thanks again,
zeller4 Kirk

I have not been recently working on MTF indicators.

However, I do have a xStochastics built from composite bars, see chart attached. This indicators allows to reproduce an exact higher timeframe chart, if bar type of higher timeframe and primary chart are identical. This concept works for minute, tick and volume bars. For range based bars such as equal range or Renko charts, it only possible to approximate the higher timeframe.


Started this thread Reply With Quote
Thanked by:
  #388 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 477 since Jun 2009
Thanks Given: 1,416
Thanks Received: 404


Fat Tails View Post
I have not been recently working on MTF indicators.

However, I do have a xStochastics built from composite bars, see chart attached. This indicators allows to reproduce an exact higher timeframe chart, if bar type of higher timeframe and primary chart are identical. This concept works for minute, tick and volume bars. For range based bars such as equal range or Renko charts, it only possible to approximate the higher timeframe.


Harry,
Thanks for the info on xStochastics, is that one of your ana downloads? Please point to a link or thread where I can find it. I couldn't find it through the normal search...

Kirk

Reply With Quote
  #389 (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


zeller4 View Post
Harry,
Thanks for the info on xStochastics, is that one of your ana downloads? Please point to a link or thread where I can find it. I couldn't find it through the normal search...

Kirk

This is only available as an assembly, it is a complex piece of code, which emulates higher timeframe bar series within an indicator. I will come back via private message, or we can discuss it via Skype.

Started this thread Reply With Quote
Thanked by:
  #390 (permalink)
 
deltason's Avatar
 deltason 
Memphis, Tennessee
 
Experience: None
Platform: NinjaTrader
Trading: ES, EUR/USD
Posts: 133 since Jul 2009
Thanks Given: 1,613
Thanks Received: 122


Great thread. Hard for me to phrase this question. Is there a way to create an alert or chart marker when an indicator or bar value on one time frame equals an indicator or bar value on another time frame? For example, can there be an alert/chart marker when the 5 period SMA of a 10 minute chart equals the 5 period SMA of a 20 minute chart (rounded if necessary)? Another example would be an alert/chart marker when the high/low of a 30 minute bar equals the high/low of a 20 minute bar.

Visit my NexusFi Trade Journal Reply With Quote




Last Updated on April 19, 2022


© 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