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:110,721 / 418
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

  #411 (permalink)
Elite Member
San Jose, CA, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader, RCG/Continuum
Favorite Futures: GC,CL
 
Posts: 91 since Dec 2013
Thanks: 14 given, 90 received


teee View Post
Is there a way to achieve having different time periods of Daily EMA/SMAs on same chart?

Add the indicator multiple times.

For example, if you want 2 different VisualEMA's on the chart, just right click and add the indicator (again), just like you did when adding the first indicator.

Update the 2nd VisualEMA parameters as desired ... all "duplicate" indicators & parameters are kept separate, and display separately on the chart, as you would expect.

Reply With Quote
The following 2 users say Thank You to bltdavid for this post:
 
  #412 (permalink)
Elite Member
Sydney Australia
 
Futures Experience: Beginner
Platform: CQG,NinjaTrader
Favorite Futures: Oil, ES, Bund, Currencies
 
teee's Avatar
 
Posts: 47 since Nov 2014
Thanks: 132 given, 97 received


Fat Tails View Post
You can set the VisualEMA / VisualSMA to 1440 min, and it will display a daily SMA or EMA.

In that case SMA or EMA will be calculated from the last traded prices as per session template.

Thank you! Shouldve thought of that

Reply With Quote
 
  #413 (permalink)
Elite Member
Nykobing Mors
 
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: NQ DAX
 
Posts: 3 since Jul 2017
Thanks: 0 given, 0 received


Hi

Is there a way to add UniRenko Bars as secondary Bartype?
I want to add UniRenko T5R15O5

Reply With Quote
 
  #414 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,687 since Mar 2010
Thanks: 4,228 given, 25,756 received


Bjorn P View Post
Hi

Is there a way to add UniRenko Bars as secondary Bartype?
I want to add UniRenko T5R15O5


Why would you wish to calculate indicator values from UniRenkoBars?

Renko bars do not show real price action but have a fake open, and mostly false highs or lows.

Also they have a complex structure that often leads to valse values when calling them.

I have already exposed some of these problems in this thread.

Therefore I will definitely not add this as an option, because it will likely create technical problems.


But again, what do you need that for?

Which bar type do you wish to use for calculations and which bar type would you like to use for displaying the result?

Maybe there is another solution.

Reply With Quote
 
  #415 (permalink)
Elite Member
Nykobing Mors
 
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: NQ DAX
 
Posts: 3 since Jul 2017
Thanks: 0 given, 0 received


Fat Tails View Post
Why would you wish to calculate indicator values from UniRenkoBars?

Renko bars do not show real price action but have a fake open, and mostly false highs or lows.

Also they have a complex structure that often leads to valse values when calling them.

I have already exposed some of these problems in this thread.

Therefore I will definitely not add this as an option, because it will likely create technical problems.


But again, what do you need that for?

Which bar type do you wish to use for calculations and which bar type would you like to use for displaying the result?

Maybe there is another solution.

I trade on a 2-6-2 RenkoChart and want to add EMAs from 4-12-4 to my Indicator.
So I can have only one chart on my screen
Here I have it on TickChart 233 to display both Tick 233 and 699

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

Reply With Quote
 
  #416 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,687 since Mar 2010
Thanks: 4,228 given, 25,756 received


Bjorn P View Post
I trade on a 2-6-2 RenkoChart and want to add EMAs from 4-12-4 to my Indicator.
So I can have only one chart on my screen
Here I have it on TickChart 233 to display both Tick 233 and 699

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


In that case there is an easy approximation that you can use.

Simply add a second EMA to your chart and quadruple the period. For example, if you wish to display an EMA(20) calculated from 4-12-4 Unirenko Charts, you may simply add an EMA(80) calculated from the chart bars.

Why do I suggest to use a factor 4?

On a minute chart or a tick chart, when doubling the chart period, you may simply double the indicator period instead. For example if you want to use an hourly EMA(20) on a 30 minute chart, you may simply use an EMA(40) on the 30 minute chart. Although this EMA(40) is not identical with the hourly EMA(20), it comes close enough. This approach does not work with all types of moving averages, but it works very well with SMAs and EMAs, as long as you apply them to time-based charts (daily, minute, second chart), tick charts and volume charts.

With range or renko bars this approach does not work, because 2 smaller range or renko bars will not make up for a larger range or renko bar, which is due to the overlap. However, you may use the rule that ranges are approximately proportional to the square root of time. Applying this rule means that you need to take approximately four bars to construct a "double period" range or Renko bar. Although this method is not at all exact, it is good for all practical purposes, if you wish to use a higher time frame trend.

Also a larger period EMA applied to the primary bars is much more robust than a complex multi-timeframe calculation. The CPU load is considerably reduced by chosing the way of simplicity.

So this is your solution: Simply apply an EMA to your 2-6-2 Renko bars and quadruple the indicator period. The resulting higher timeframe EMA comes close to your EMA calculated from 4-12-4 Renko bars and will be fit for all purposes.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #417 (permalink)
Elite Member
Nykobing Mors
 
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: NQ DAX
 
Posts: 3 since Jul 2017
Thanks: 0 given, 0 received


Fat Tails View Post
In that case there is an easy approximation that you can use.

Simply add a second EMA to your chart and quadruple the period. For example, if you wish to display an EMA(20) calculated from 4-12-4 Unirenko Charts, you may simply add an EMA(80) calculated from the chart bars.

Why do I suggest to use a factor 4?

On a minute chart or a tick chart, when doubling the chart period, you may simply double the indicator period instead. For example if you want to use an hourly EMA(20) on a 30 minute chart, you may simply use an EMA(40) on the 30 minute chart. Although this EMA(40) is not identical with the hourly EMA(20), it comes close enough. This approach does not work with all types of moving averages, but it works very well with SMAs and EMAs, as long as you apply them to time-based charts (daily, minute, second chart), tick charts and volume charts.

With range or renko bars this approach does not work, because 2 smaller range or renko bars will not make up for a larger range or renko bar, which is due to the overlap. However, you may use the rule that ranges are approximately proportional to the square root of time. Applying this rule means that you need to take approximately four bars to construct a "double period" range or Renko bar. Although this method is not at all exact, it is good for all practical purposes, if you wish to use a higher time frame trend.

Also a larger period EMA applied to the primary bars is much more robust than a complex multi-timeframe calculation. The CPU load is considerably reduced by chosing the way of simplicity.

So this is your solution: Simply apply an EMA to your 2-6-2 Renko bars and quadruple the indicator period. The resulting higher timeframe EMA comes close to your EMA calculated from 4-12-4 Renko bars and will be fit for all purposes.

Thanks I will try that

Reply With Quote
 
  #418 (permalink)
Elite Member
Mumbai
 
Futures Experience: Beginner
Platform: NinjaTrader 8
Favorite Futures: futures
 
Posts: 8 since Mar 2017
Thanks: 5 given, 1 received

Thanks for all the Indicators and Valuable Info, I have a query for TSSupertrend.

First of all, I would like to Thank You for all the Indicators, your valuable knowledge to solve all User queries & this helpful Platform.

I have got many of my queries solved by searching through the posts where you shared your knowledge and explained ways to achieve the results.


I have a query for TSSupertrend Indicator for Ninjatrader 8 and would like to see same output results in amaSuperTrendU11 in Ninjatrader 8.
Can you please help me out to achieve similar results in amaSuperTrend11 / basically I want to replicate TSSupertrend results in amaSuperTrendU11


I tried a lot with parameters but I am not getting similar results.
Many a times - amaSuperTrendU11 is always 2-4 bars behind in showing results similar to TSSupertrend.




Right now using the following parameters in TSSupertrend:
Supertrend mode : ATR
Period : 14
Multiplier : 3.2
Moving Average Type : HMA
Smooth : 14


Parameters Tried in amaSuperTrendU11 to get results // output similar to TSSupertrend:
Baseline Smoothing : HMA / tried other options
Offset formula : True_Range
Offset Smoothing : Wilder / trid other options
Baseline Period : 14 / tried from 5 to 15
Offset period : 14 tried from 10 to 15
Offset multiplier : 3.2 / tried from 2.5 to 3.2





========================



Fat Tails View Post
I am still relying on NinjaTrader to code my indicators and have recently played around with adding secondary bar series to indicators, so I just want to share my experience and show what currently can be done and what can't be done.

Of course I hope that others will share their experience as well, allowing to better exploit the full potential that lies within this option which has recently been introduced with NinjaTrader 7.

With the first post I just want to summarize, what I have in mind, and what potential improvements can be made.


Increasing the Resolution of Indicators

Some indicators do not show correct values, because the information required to calculate them is not contained with the primary bar series. By adding a secondary high definition bar series, the indicators can be improved. There are three of them that come to my mind immediately.

The current session's VWAP:

If you calculate the volume weighted average price for a 30 min bar series, there is only one value after 30 minutes which could be the typical or any other price calculated from Open, High, Low and Close. It is obvious that this value will be far from reality and that the calculated value will be false. It would be much better to calculate the VWAP from a secondary 1 minute bar series, which would reduce the error to a minimum for all practical purposes.

The opening range indicator:

If you read "The Logical Trader" by Mark Fisher, you will not that he suggests an opening range of 20 minutes for ES. How can you display this range on a 15 min chart? The answer is: You can't. Unless you calculate the opening range from a secondary 1 min data bar series.

Volume profiles:

Let us assume that you want to display a market profile for the current session on a 17 minute chart by using one of the volume zones indicators (such as the dValueArea indicator). The problem which you will encounter here: You cannot calculate 30 min TPOs from 17 minute data. Also you cannot calculate any mode for the volume distribution of the current session from 17 min data, but you need higher resolution data. This again would be a case for a multi time frame indicator.


Displaying Higher Time Frame Signals on Your Chart

This is practically the opposite of the first way to use a secondary bar series. It is technically impossible to display smaller time frame signals on any chart, as the resolution of the chart, that is the grid defined by the visible bar series does not allow it. This limits the use of smaller bar series to cases, where more precision is needed to display some of the more complex indicators. Also smaller time frame traders can be considered as noise traders, so I am rather interested in what the larger time frame traders are doing.

Some of the indicators that are used are already MTF indicators as they tell us something about the actions of the other time frame traders. These indicators use reference points outside the visible fraction of the chart. So although indicator values are mostly calculated from price, and just represent a reduced version of price, it is their time frame transfer capability that makes them interesting for the trader.

Existing indicators include market profile, daily, weekly and monthly pivots, average daily range, fibonacci confluence indicators, which all add some information from the more distant past.

But now, with adding data series, anything should be possible. Moving averages, oscillators, divergence indicators, actually the whole set of NinjaTrader default indicators as a MTF version allowing you to calculate them on a 60 min bar series, but display the results on a 157 tick or 6 range chart.

However, there is a number of traps, which have to be avoided, when creating such indicators. My intention is to document some of those traps with a simple multi time frame EMA. I also want to release a modified version of the SuperTrend indicator.


Reply With Quote
 
  #419 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,687 since Mar 2010
Thanks: 4,228 given, 25,756 received


kashyapjdave View Post
First of all, I would like to Thank You for all the Indicators, your valuable knowledge to solve all User queries & this helpful Platform.

I have got many of my queries solved by searching through the posts where you shared your knowledge and explained ways to achieve the results.


[B]I have a query for TSSupertrend Indicator for Ninjatrader 8 and would like to see same output results in amaSuperTrendU11 in Ninjatrader 8.

@kashyapjdave: Please post your questions in an appropriate thread. This thread is about multi-timeframe indicators that use data from higher timeframe bars. The SuperTrend has nothing to do with coding multi-timeframe indicators.

Please search for "anaSuperTrend", and you will easily find a few threads that match the subject.

I have therefore taken the liberty to answer your question in a different place. You will find my answer here:

https://futures.io/ninjatrader-programming/34786-configuring-anasupertrend-4.html#post668586

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:

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)

Updating schedule soon for June

June
     

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


All times are GMT -4. The time now is 05:21 PM.

Copyright © 2018 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 2018-06-18 in 0.16 seconds with 20 queries on phoenix via your IP 54.198.86.28