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,252 / 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

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


Fat Tails View Post
The code is specifically 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.

No worries - it will give me (yet) another MC7 challenge .

Kudos for the NT versions though - nice piece of work!

Cheers

Reply With Quote
 
  #112 (permalink)
Elite Member
Rechovot
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: CQG
Favorite Futures: Index,Currency and Energy futures
 
perryg's Avatar
 
Posts: 1,703 since Jan 2010
Thanks: 504 given, 6,262 received

VisualSMAMTF

Hello @Fat Tails,

Have just updated the latest VisualSMAMTF which is now "anavisualsma". In the previous version I changed the "DATA" input series to TYPICAL. In this new version you have a seperate Price type for the Data Input for the indicator. If I put both of these input data to TYPICAL I get a different output line for the SMA as opposed to putting only one of them to typical. Which is the correct way of using this indicator now.

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



perryg View Post
Hello @Fat Tails,

Have just updated the latest VisualSMAMTF which is now "anavisualsma". In the previous version I changed the "DATA" input series to TYPICAL. In this new version you have a seperate Price type for the Data Input for the indicator. If I put both of these input data to TYPICAL I get a different output line for the SMA as opposed to putting only one of them to typical. Which is the correct way of using this indicator now.

Changing the primary data input series to "Typical" does not have any impact on the outcome. The indicator values are calculated from a secondary bar series, so the settings for the primary bar series are simply ignored.

The new option effectively allows you to calculate the values from the typical price of the secondary bar series.

Reply With Quote
The following 4 users say Thank You to Fat Tails for this post:
 
  #114 (permalink)
Elite Member
Albuquerque, New Mexico/USA
 
Futures Experience: Intermediate
Platform: NinjaTrader-Continuum(Mirus)
Favorite Futures: emini Currency and Index Futures
 
Posts: 103 since Jan 2011
Thanks: 285 given, 104 received

Hello @Fat Tails,
I have a question about the anaVisualSMA. Please refer to the two charts attached. On the first chart, I have an SMA of period 1 and an anaVisualSMA(8R, 1), which as I understand it, is an SMA of period 1 on an 8R chart, but transformed onto the 4R chart. I was thinking, perhaps erroneously, that if there is consistency in this transport, then if I substitute 4R for the 8R in the anaVisualSMA, then I should get an SMA of period 1 on the 4R chart that is identical with the SMA(1) that is already there. However, as you can see on Chart #2, it produces an SMA of period 1 that is shifted forward in time by one 4R bar. Am I suffering from flawed reasoning here and is my lack of complete understanding of this MTF/Higher Time Frame Transport process the problem? Thanks for your help.

Attached Thumbnails
Coding Multi Time Frame (MTF) Indicators with NinjaTrader-6e-09-11-4-range-8_22_2011-2-.jpg   Coding Multi Time Frame (MTF) Indicators with NinjaTrader-6e-09-11-4-range-8_22_2011.jpg  
Reply With Quote
The following 3 users say Thank You to HighDesertTrader for this post:
 
  #115 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,652 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


gpquigley View Post
Hello @Fat Tails,
I have a question about the anaVisualSMA. Please refer to the two charts attached. On the first chart, I have an SMA of period 1 and an anaVisualSMA(8R, 1), which as I understand it, is an SMA of period 1 on an 8R chart, but transformed onto the 4R chart. I was thinking, perhaps erroneously, that if there is consistency in this transport, then if I substitute 4R for the 8R in the anaVisualSMA, then I should get an SMA of period 1 on the 4R chart that is identical with the SMA(1) that is already there. However, as you can see on Chart #2, it produces an SMA of period 1 that is shifted forward in time by one 4R bar. Am I suffering from flawed reasoning here and is my lack of complete understanding of this MTF/Higher Time Frame Transport process the problem? Thanks for your help.

Your observation is correct.

The chart shows a lag of 1 bar, which is due to the fact that OnBarUpdate() calls the primary bar series, which is shown on the chart, first and the secondary bars only afterwards. This means that the values calculated from the secondary bars cannot be used for the current bar of the primary bar series, but only the following one.

This only creates a problem, if the primary and secondary bars have identical time stamps.

The only remedy to compensate this, is to repaint the previous indicator value, once the first tick of the next bar has been registered. I have already used the 1-tick repainting for fixed period bars in both VisualMode and FirstTickMode of the indicator, such that the indicator compensates for the one-bar delay. Maybe I should do this for range and tick bars as well.

Let me check it and come back later.

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

Update VisualSMA and VisualEMA

Have modified the indicator code to include 1-tick repainting in VisualMode and FirstTickMode for other bar types than fixed period bars.

The 1-tick repainting will be activated, when

-> the primary bar series and the secondary bar series called by the indicator use the same bar type
-> the closing time of the primary and secondary candles is identical
-> VisualMode or FirstTickMode is selected

In StrategyMode nothing will be repainted, but the result of the calculation from the secondary bar series will only be used for the next bar of the primary bars.

The updated indicators can be found here:

https://futures.io/free_downloads/ninjatrader-7/indicators/942-download.html?view
https://futures.io/free_downloads/ninjatrader-7/indicators/939-download.html?view

Reply With Quote
The following 4 users say Thank You to Fat Tails for this post:
 
  #117 (permalink)
Elite Member
Albuquerque, New Mexico/USA
 
Futures Experience: Intermediate
Platform: NinjaTrader-Continuum(Mirus)
Favorite Futures: emini Currency and Index Futures
 
Posts: 103 since Jan 2011
Thanks: 285 given, 104 received


Fat Tails View Post
Have modified the indicator code to include 1-tick repainting in VisualMode and FirstTickMode for other bar types than fixed period bars.

The 1-tick repainting will be activated, when

-> the primary bar series and the secondary bar series called by the indicator use the same bar type
-> the closing time of the primary and secondary candles is identical
-> VisualMode or FirstTickMode is selected

In StrategyMode nothing will be repainted, but the result of the calculation from the secondary bar series will only be used for the next bar of the primary bars.

The updated indicators can be found here:

https://futures.io/free_downloads/ninjatrader-7/indicators/942-download.html?view
https://futures.io/free_downloads/ninjatrader-7/indicators/939-download.html?view

@Fat Tails:
Thanks for the update. I am not having any luck installing these into Ninja Trader (v. 64-bit 7.0.1000.7). I am getting the attached error message.

Attached Thumbnails
Coding Multi Time Frame (MTF) Indicators with NinjaTrader-snagit1.png  
Reply With Quote
The following user says Thank You to HighDesertTrader for this post:
 
  #118 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,652 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


gpquigley View Post
@Fat Tails:
Thanks for the update. I am not having any luck installing these into Ninja Trader (v. 64-bit 7.0.1000.7). I am getting the attached error message.

Sorry, this is probably my fault. I had played around with the Traders Insight Indicator, which requires the Dundas gauge. Then I had forgotten to uninstall it. I also had another assembly installed, when I had exported the indicators and they could only be installed on your machine, if both other assemblies were installed as well.

My mistake.

I have exported the two indicators a second time and replaced the files in the download section. Please try again.


Last edited by Fat Tails; August 30th, 2011 at 07:05 PM.
Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #119 (permalink)
Elite Member
Albuquerque, New Mexico/USA
 
Futures Experience: Intermediate
Platform: NinjaTrader-Continuum(Mirus)
Favorite Futures: emini Currency and Index Futures
 
Posts: 103 since Jan 2011
Thanks: 285 given, 104 received


Fat Tails View Post
Sorry, this is probably my fault. I had played around with the Traders Insight Indicator, which requires the Dundas gauge. Then I had forgotten to uninstall it. I also had another assembly installed, when I had exported the indicators and they could only be installed on your machine, if both other assemblies were installed as well.

My mistake.

I have exported the two indicators again and replaced the files in the download section. Please try again.


Hello @Fat Tails,
All is working fine. Thanks again for the update. I appreciate you taking your valuable time to get this out so fast.

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



gpquigley View Post
Hello @Fat Tails,
All is working fine. Thanks again for the update. I appreciate you taking your valuable time to get this out so fast.

Thanks again for your qualified comment, which allowed me to improve the indicator.

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 12:53 PM.

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-13 in 0.15 seconds with 20 queries on phoenix via your IP 54.82.79.109