Coding Multi Time Frame (MTF) Indicators with NinjaTrader - NinjaTrader | futures io social day trading
futures io futures trading


Coding Multi Time Frame (MTF) Indicators with NinjaTrader
Updated: Views / Replies:103,284 / 411
Created: by Fat Tails Attachments:161

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 161  
 
Thread Tools Search this Thread
 

Coding Multi Time Frame (MTF) Indicators with NinjaTrader

  #101 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary

Or let us have a look at the Directional Movement


trendisyourfriend View Post
What is the difference between using a 5 x 5minutes and using a normal MACD with 12x5, 26x5, 9x5 periods ?

Below is a chart with two data series, a 3 min and a 5 min data series of ES. Compare thhe indicators in the three lower panels.

(a) Original 14-period DM/ADX calculated from a 15 min series

(b) 70-period DM/ADX calculated from a 3 min series

(c) Multi-timeframe 14-period ADX calculated from a 3 minute series

Would you say that (b) or (c) is a better match for (a)?

Attached Thumbnails
Coding Multi Time Frame (MTF) Indicators with NinjaTrader-comparison-dm.jpg  
Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #102 (permalink)
Elite Member
Barcelona / Spain
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: ZenFire
Favorite Futures: CL
 
davidfa's Avatar
 
Posts: 93 since Feb 2010
Thanks: 217 given, 118 received


Fat Tails View Post
I have looked for a way to code "false" multi-timeframe indicators from a single bar series. This has both advantages and inconvenients compared to real multi- timeframe indicators.

Advantage: Only loading 1 bar series, faster loading and calculation, robustness.

I find the concept very interesting and I would implement it on the indicators I use within that scenario.
I do need faster loading, calculation and robustness
Would you share an indicator example that uses this technique you've implemented?

In the end, don't you feel like NT is lacking a public read collection access similar to workspaces(n).charts(i).indicators(j).values(k)?
Examples where needed:
- suppose we have a 5min chart with other ones where we want the 5min 20ema replicated. Would only be calculated once on the 5m chart and then accessed from other charts just to plot that value, not needing to recalculate it.
- or for Value Area and Poc computation avoided on more than one chart

I'd like if you could also point me out the instructions or thread where explains how to debug indicators one by one with VS2005 or similar so as to compare performances.

Thanks

Reply With Quote
The following user says Thank You to davidfa for this post:
 
  #103 (permalink)
Elite Member
Portland Oregon, United States
 
Futures Experience: Beginner
Platform: Ninjatrader®
Broker/Data: CQG, Kinetick
Favorite Futures: Gameplay Klownbine® Trading of Globex
 
Zondor's Avatar
 
Posts: 1,327 since Jul 2009
Thanks: 1,246 given, 2,635 received

Public Access Collection



Quoting 
In the end, don't you feel like NT is lacking a public read collection access similar to workspaces(n).charts(i).indicators(j).values(k)?
Examples where needed:
- suppose we have a 5min chart with other ones where we want the 5min 20ema replicated. Would only be calculated once on the 5m chart and then accessed from other charts just to plot that value, not needing to recalculate it.
- or for Value Area and Poc computation avoided on more than one chart


What a great idea! I wonder if there is a way to implement this now by some type of workaround. Maybe using a special namespace. Or calculating values outside of Ninjatrader and making them available from an outside file like a GomRecorder file, or a database.

Reply With Quote
The following user says Thank You to Zondor for this post:
 
  #104 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


davidfa View Post
I find the concept very interesting and I would implement it on the indicators I use within that scenario.
I do need faster loading, calculation and robustness
Would you share an indicator example that uses this technique you've implemented?

In the end, don't you feel like NT is lacking a public read collection access similar to workspaces(n).charts(i).indicators(j).values(k)?
Examples where needed:
- suppose we have a 5min chart with other ones where we want the 5min 20ema replicated. Would only be calculated once on the 5m chart and then accessed from other charts just to plot that value, not needing to recalculate it.
- or for Value Area and Poc computation avoided on more than one chart

I'd like if you could also point me out the instructions or thread where explains how to debug indicators one by one with VS2005 or similar so as to compare performances.

Thanks

Sorry I did not answer earlier, simply forgot it. The point is that the bar series which is calculated may use a different session template than the bar series shown on another chart, in this case, the other values cannot be used. Although your idea is great from a point of view of CPU performance, it would create additional interdependencies, which in the end may pose additional problems. So I am a bit sceptical. But then I do not have the profound knowledge of the internal architecture of NinjaTrader to really be able to appreciate your suggestion.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #105 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary

Multi-TimeFrame Stochastics

Here is another experiment with a multi-timeframe Stochastics indicator.

The indicator creates higher time-frame bars by using the primary bar series, no loading of a secondary bar series is necessary. The chart again shows various approaches

Panel 2: Exact replication of the higher time-frame indicator
Panel 3: Raw Stochastics calculated from a rolling higher time-frame
Panel 4: Smoothed Raw Stochastics
Panel 5: Step function, as shown by conventional MTF indicators

This is still work in progress. The indicators in panel 2 and panel 4 are useful as higher timeframe stochastics. The panel 4 indicator (smoothed raw rolling) does not repaint, the panel 2 indicator repaints within the unstable period of the higher timeframe, so it should not be used for running strategies.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:
 
  #106 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary

Approximation for Range and Renko Bars

For Range and Renko Bars, there is a difficulty to calculate the higher timeframe bars from the primary bars, which can be easily understood. Let us take the example of a time frame factor 5:

a 5-minute bar -> can be built from five 1-minute bars
a 5000-volume bar -> can be built from five 1000-volume bars
a 500-tick bar -> can be built from five 100-tick bars

a 5 range bar -> can not be built from five 1-range bars

It is known that in general volatility is proportianal to the square root of time. Using this relation ship you can build
a 5 range bar by regrouping twenty five 1-range bars. This does not give an exact replication of the higher time frame but a reasonable approximation. The same reasoning applies to Renko bars. The result is shown below.



Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #107 (permalink)
Elite Member
Roseville CA
 
Futures Experience: Advanced
Platform: N7
Broker/Data: Amp Futures/CQG
Favorite Futures: ES
 
Posts: 124 since Jun 2009
Thanks: 32 given, 19 received

I keep getting an error when trying to import script for the VisualSMAX2.

also attached are all my files that have been imported successfully without any errors.

I am currently using v 7.0.1.0007

thanks for any ideas

Attached Thumbnails
Coding Multi Time Frame (MTF) Indicators with NinjaTrader-visualsmax2zip_error.jpg   Coding Multi Time Frame (MTF) Indicators with NinjaTrader-imported_script.jpg  
Reply With Quote
 
  #108 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


ceramictilepro View Post
I keep getting an error when trying to import script for the VisualSMAX2.

also attached are all my files that have been imported successfully without any errors.

I am currently using v 7.0.1.0007

thanks for any ideas

The VisualSMAX2 was an experimental pre-version. Please uninstall any VisualSMA files via File -> Utilities -> Remove NinjaScript Assemblies first. Then import the latest VisualSMA from the Download section of this forum.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #109 (permalink)
Elite Member
Cary, NC
 
Futures Experience: Advanced
Platform: MC, NT, Python, R
Broker/Data: FXCM, IB, Oanda, IQFeed
Favorite Futures: 6E, CL, EUR/USD
 
Fu510n's Avatar
 
Posts: 96 since Oct 2009
Thanks: 729 given, 81 received

MultiCharts port?

Fat Tails,

Just curious (given that Perry's new system now includes VisualSMAX) whether you've given any thought to porting any of your MTF indicators to MC7? I bit the bullet and decided to go the MultiCharts route vs. Ninja (i.e. bought a lifetime license but could only afford one or the other), so I've been converting indicators as necessary given that futures.io (formerly BMT) is predominantly NT-centric (though MC, Sierra and others are increasing in number).

Alas these are protected (otherwise I wouldn't be asking ).

Thanks,
-Guy

Reply With Quote
 
  #110 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary



Fu510n View Post
Fat Tails,

Just curious (given that Perry's new system now includes VisualSMAX) whether you've given any thought to porting any of your MTF indicators to MC7? I bit the bullet and decided to go the MultiCharts route vs. Ninja (i.e. bought a lifetime license but could only afford one or the other), so I've been converting indicators as necessary given that futures.io (formerly BMT) is predominantly NT-centric (though MC, Sierra and others are increasing in number).

Alas these are protected (otherwise I wouldn't be asking ).

Thanks,
-Guy

The code is specificly adapted to the architecture of NinjaTrader and will possibly not run on MultiCharts. Some of the key points are the session management and the way NinjaTrader handles non-equidistant spacing. I think that the logic of this needs to modified for MultiCharts, so I cannot be of a great help.

Reply With Quote

Reply



futures io > > > > Coding Multi Time Frame (MTF) Indicators with NinjaTrader

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Time Frame Strategy Cancellation jthom NinjaTrader Programming 2 October 9th, 2014 12:00 PM
Close bar recognization in multi time frame strategy pinto552 NinjaTrader Programming 6 September 6th, 2011 10:07 AM
Multi-time frame strategy with periods of different size pequemec NinjaTrader Programming 2 February 24th, 2010 01:41 PM
visual multi-time frame scoring system. benbrooke Traders Hideout 1 October 4th, 2009 06:49 PM
Multi Volume/Time Frame Trading wh The Elite Circle 7 September 15th, 2009 05:55 PM


All times are GMT -4. The time now is 02:29 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-14 in 0.15 seconds with 20 queries on phoenix via your IP 54.221.76.68