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

  #81 (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,602 received
Forum Reputation: Legendary


gomi View Post
The indicator considers that the default session template used in the instrument manager is what defines RTH, whatever session template you use for your chart.

@gomi: That consideration is more than strange!

If you set this option, it excludes ETH data from your charts. I have not a single instrument, where the session template selected in the instrument manager is the RTH session.

For all my session related indicators, I use segmented sessions, which allow me to catch the RTH information, but to display ETH price action as well. Then, I only use charts with the session template <instrument settings>. This allows me to toggle between instruments, without the need change any indicator parameters.

For example, below is my session template for ES defined under instrument settings. The chart shows ES with the pre-session high and low and the opening range calculated by a MTF indicator. If I set the instrument session template to RTH, I will never see that pre-session range again.

Obviously this does not invalidate your concept, but is just a minor detail.

Attached Thumbnails
Coding Multi Time Frame (MTF) Indicators with NinjaTrader-session-template-es.jpg   Coding Multi Time Frame (MTF) Indicators with NinjaTrader-es-09-11-7-min-08_07_2011-opening-range.jpg  
Reply With Quote
 
  #82 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,177 since Oct 2009
Thanks: 228 given, 4,097 received


Fat Tails View Post
If you set this option, it excludes ETH data from your charts.

Actually, no, it doesn't.
The indicator uses the default instrument session defined in instrument manager as RTH, but you can use any kind of session on your chart.
For instance on, the ES, I have default instrument session set as CME RTH, but if on my chart I use 24/7 and select "use only RTH", I will see only the RTH values of the indicator, on a full ETH chart. If I don't select "use only RTH", I see whole ETH values.
Obviously it won't work if you split the whole ETH session in the default session in the instrument manager ;-)

Reply With Quote
The following user says Thank You to gomi for this post:
 
  #83 (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,602 received
Forum Reputation: Legendary



gomi View Post
Actually, no, it doesn't.
The indicator uses the default instrument session defined in instrument manager as RTH, but you can use any kind of session on your chart.
For instance on, the ES, I have default instrument session set as CME RTH, but if on my chart I use 24/7 and select "use only RTH", I will see only the RTH values of the indicator, on a full ETH chart. If I don't select "use only RTH", I see whole ETH values.
Obviously it won't work if you split the whole ETH session in the default session in the instrument manager ;-)

Thank you for the explanation. So you use the Instrument.Master.Instrument.Session to collect the instrument session template. I am just thinking how to solve this.....

If I define a shadow instrument for each instrument which I trade by adding "ZZ" (ES -> ESZZ), I could define a second session template for the shadow instrument, in order to use the second template for GOMMultiTFIndicatorBase. I could then in GOMMultiTFIndicatorBase call the MasterInstrument, convert it to a "string" value, append "ZZ" to the string and then convert it back to the shadow instrument to collect the other session template.

Would this work? Ou est-ce que j'ai l'esprit trop tordu?

Reply With Quote
 
  #84 (permalink)
Elite Member
Paris
 
Futures Experience: None
Platform: NinjaTrader
 
Posts: 1,177 since Oct 2009
Thanks: 228 given, 4,097 received


Fat Tails View Post
Thank you for the explanation. So you use the Instrument.Master.Instrument.Session to collect the instrument session template.

Yes, that way I have 2 sessions for 1 instrument : the RTH defined by the Instrument.Master.Instrument , and the ETH defined by the chart. I thought it would be the simplest way to deal with the RTH problem.


Fat Tails View Post
Would this work? Ou est-ce que j'ai l'esprit trop tordu?

I think it would, but it really really wouldn't fit the KISS principle. So yes, I guess , you are twisted

Reply With Quote
 
  #85 (permalink)
Elite Member
Nampa, ID
 
Futures Experience: Intermediate
Platform: TradeStation and Ninja
Broker/Data: AMP - Zenfire
Favorite Futures: ES
 
Posts: 39 since Jan 2011
Thanks: 22 given, 29 received

Hey Guys, I am trying to do something "multi time frame" that I think should be really easy, but I haven't been able to get it figured out. I use an indicator called xcMovAvg that plots a 5 minute EMA on my "other time frame" charts. Unfortunately I would like this code my indicator so that I can use Rising / Falling etc. to play other indicators off of it. To Date I have not been able to get this coded. I can't seem to figure out how to get Ninja to do it.

I thought I was onto something with a separate data series until I realized that every bar must have a value. Anyway, I know some of you have written indicators that do the same thing as the xcMovAvg, but I just can't seem to figure the method? Don't even need the code per se, just a shove in the right direction.

Thanks much.

Reply With Quote
 
  #86 (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,602 received
Forum Reputation: Legendary


RambleDog View Post
Hey Guys, I am trying to do something "multi time frame" that I think should be really easy, but I haven't been able to get it figured out. I use an indicator called xcMovAvg that plots a 5 minute EMA on my "other time frame" charts. Unfortunately I would like this code my indicator so that I can use Rising / Falling etc. to play other indicators off of it. To Date I have not been able to get this coded. I can't seem to figure out how to get Ninja to do it.

I thought I was onto something with a separate data series until I realized that every bar must have a value. Anyway, I know some of you have written indicators that do the same thing as the xcMovAvg, but I just can't seem to figure the method? Don't even need the code per se, just a shove in the right direction.

Thanks much.

The xcMovAvg often produces a step function, so it is not easy to collect information such as rising or falling MA. After all a step function is mostly flat and does not tell you whether the higher timeframe indicator rises or falls. It would be necessary to expose that information separately to access it. This means that the indicator has to be modified. At least this would be my understanding.

Reply With Quote
 
  #87 (permalink)
Elite Member
Nampa, ID
 
Futures Experience: Intermediate
Platform: TradeStation and Ninja
Broker/Data: AMP - Zenfire
Favorite Futures: ES
 
Posts: 39 since Jan 2011
Thanks: 22 given, 29 received

Thanks Fat Tails,

I actually found my answer on the NT support forum. I added a time period to my indicator (don't even need inputs because I am always interested in what 5 min charts are doing). Then that becomes an indexable "Bars Array." From there you just need to apply the standard EMA to the "Bars Array" and pick a time period.

It does step which is visually less than appealing, but the only way to reflect the truth of a higher time frame. To determine rising or falling I just assign my EMA values to a DataSeries and then compare the current value to one 5 bars ago (if on a 2 min time frame.

Not sure any of this would be helpful if it was tick or range charts, but it works for my 1 min chart. Now the real test is to see if it helps. Thanks Much!!

Reply With Quote
 
  #88 (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,602 received
Forum Reputation: Legendary


RambleDog View Post
Thanks Fat Tails,

I actually found my answer on the NT support forum. I added a time period to my indicator (don't even need inputs because I am always interested in what 5 min charts are doing). Then that becomes an indexable "Bars Array." From there you just need to apply the standard EMA to the "Bars Array" and pick a time period.

It does step which is visually less than appealing, but the only way to reflect the truth of a higher time frame. To determine rising or falling I just assign my EMA values to a DataSeries and then compare the current value to one 5 bars ago (if on a 2 min time frame.

Not sure any of this would be helpful if it was tick or range charts, but it works for my 1 min chart. Now the real test is to see if it helps. Thanks Much!!

For a 1min chart it should work, for a tick chart it is not so easy, as you cannot take the value 5 bars ago. The bar duration of tick bars is not constant,. But for minute bars it should work.

Reply With Quote
 
  #89 (permalink)
Elite Member
Grand Rapids, Michigan, United States
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: TF, 6E
 
Posts: 318 since Dec 2010
Thanks: 263 given, 111 received

MTF Support & Resistance

Hello Fat Tails. As you know by now I use a 12 tick SBS Renko chart for longer term analysis and a 6 tick SBS Renko chart for timing the entry. One of the most useful indicators I've found for help in timing entry is the Swing Ray2 indicator (see attached) which does a terrific job of highlighting important price pivot support and resistance levels.

What I thought would be useful is to modify this indicator so that when setting up the indi on the 6 tick chart; both the rays from the 6 tick chart and 12 tick chart would print on the 6 tick chart. The lines derived from the 12 tick chart could be made thicker to indicate stronger support and resistance. Your thoughts?

Best Regards
Chuck

Attached Files
Register to download File Type: zip SwingRays.zip (3.8 KB, 95 views)
Reply With Quote
The following user says Thank You to maxreturn for this post:
 
  #90 (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

added second data series as parameter


Hello guys,
I am working on an indicator that would paint minute based bars on top of a range chart. Would also work for other combinations, but that is basically the need.
The idea is similar to @Fat Tails anaMultiPeriodCandles from where I got the plot logic.

The problem I am facing is to put the added second data series as a minute amount parameter as NT logic needs that value in the Initialize proc and it seems doesn't allow that as a parameter.

As I downloaded and had a glance to @gomi GomMultiTFIndicator, I realise that would be a nice workaround. Is there any indicator using this so as I can have it a as a sample implementation?

The code under development and image attached correspond to a version with fixed (no parameter) 5 minute bars as added dataseries.

Thanks for your work.
David

Attached Thumbnails
Coding Multi Time Frame (MTF) Indicators with NinjaTrader-2011-07-28-cl-4range-5m-bars.jpg  
Attached Files
Register to download File Type: cs N10t_BiggerTimeFrameBars.cs (18.1 KB, 60 views)
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 05:02 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-16 in 0.16 seconds with 20 queries on phoenix via your IP 54.163.210.170