Multiple Time Frame Equidistant Bars - NinjaTrader Programming | futures io social day trading
futures io futures trading


Multiple Time Frame Equidistant Bars
Updated: Views / Replies:6,121 / 21
Created: by DavidHP Attachments:7

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
 7  
 
Thread Tools Search this Thread
 

Multiple Time Frame Equidistant Bars

  #1 (permalink)
Market Wizard
New Orleans, La (Mardi Gras City)
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Ninjatrader / Optimus Futures / AmpFutures
Favorite Futures: ES / 6E / 6B / CL
 
DavidHP's Avatar
 
Posts: 1,002 since Aug 2009
Thanks: 802 given, 1,367 received

Multiple Time Frame Equidistant Bars

NT7 will allow multiple time frame charts to overlay or in separate panels.
One of the problems with this is the x axis is hard coded to be in control by using 'Equidistant Bar Spacing" and setting it to FALSE.

The result of this is that all multiple time frame charts have gaps in the display of the charts.
(as in the image below)
Top image has two data series and the bottom a single series.
The top image has gaps in the display because of the equidistant = false on each series.

I know this question has been asked before:
Has anyone discovered a work-around via C# code to allow the charts to have one series dominant and the other as an 'overlay' on the chart.

Tks

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Attached Thumbnails
Multiple Time Frame Equidistant Bars-multitimeframe.jpg  
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Lubbock TX
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Stage 5 Trading
Favorite Futures: CL
 
MWinfrey's Avatar
 
Posts: 1,879 since Jul 2009
Thanks: 1,449 given, 3,306 received



DavidHP View Post
NT7 will allow multiple time frame charts to overlay or in separate panels.
One of the problems with this is the x axis is hard coded to be in control by using 'Equidistant Bar Spacing" and setting it to FALSE.

The result of this is that all multiple time frame charts have gaps in the display of the charts.
(as in the image below)
Top image has two data series and the bottom a single series.
The top image has gaps in the display because of the equidistant = false on each series.

I know this question has been asked before:
Has anyone discovered a work-around via C# code to allow the charts to have one series dominant and the other as an 'overlay' on the chart.

Tks

Not in C# but is this what you're talking about?

https://futures.io/ninjatrader/14502-cool-multitimeframe-chart.html#post165469

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


DavidHP View Post
NT7 will allow multiple time frame charts to overlay or in separate panels.
One of the problems with this is the x axis is hard coded to be in control by using 'Equidistant Bar Spacing" and setting it to FALSE.

The result of this is that all multiple time frame charts have gaps in the display of the charts.
(as in the image below)
Top image has two data series and the bottom a single series.
The top image has gaps in the display because of the equidistant = false on each series.

I know this question has been asked before:
Has anyone discovered a work-around via C# code to allow the charts to have one series dominant and the other as an 'overlay' on the chart.

Tks

I think that this cannot be avoided. If you have two different Bar Series on your chart - say one built from ticks and the other one from time-based bars - at least one of them will be irregularly spaced.


Asking for the Impossible


However you still wish that indicators be drawn on your chart. This requires a drawing algorithm that uses either the bar count or the time stamp of each bar. Now assume that you select the tick chart as the dominant chart with equidistant bar spacing and adjust the minute chart to comply with the tick chart. What algorithm would you use to determine the correct spacing of the minute bars? And what algorithm would you use to display indicators on that minute chart? This a task that would be near impossible to accomplish.

For that reason NinjaTrader uses the time stamps of all bars to plot on multi-series charts. This information is availble for each bar, and indicators that are plotted on those bars can use a relatively simple algorithm for interpolating the data points by taking into account the time-interval between two consecutive time stamps.

So, if you think about it, you are asking for the impossible.


Multi-Series Charting with Equidistant Bars Restricted to Similar Bar Series

Some charting packages do have multi-timeseries charts with equidistant bar spacing, but this is only possible if you display a 5 minute against a 30 minute chart, or a 5-tick against a 30-tick chart. Even for two series of range bars this cannot be done, because a 30-range bar would not be composed of 6 5-range bars. And for mixed bar series, this is impossible, you will always get back to time to organize the incoming bars.


Indicator Values Can Be Projected on the Primary Bar Series

For indicators there is another option. You can code them in a way that the values are calculated from a secondary bar series, which is loaded by the indicator and then projected to the primary bar series. But then you will get the projection, which typically lags by a fraction of the last bar, and you will not get the original values displayed in line with the secondary bars where they were formed.

Reply With Quote
The following 7 users say Thank You to Fat Tails for this post:
 
  #5 (permalink)
Market Wizard
New Orleans, La (Mardi Gras City)
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Ninjatrader / Optimus Futures / AmpFutures
Favorite Futures: ES / 6E / 6B / CL
 
DavidHP's Avatar
 
Posts: 1,002 since Aug 2009
Thanks: 802 given, 1,367 received


MWinfrey View Post

I saw that post and I've tried to use a similar method but still get the look shown in the image. I prefer Point O or Range bars and it seems as if they are a little stubborn about this similar to the reply Fat Tails made.

Thanks for the reply,
I expect that until NT changes this it will not be possible.
But I've found that the impossible just takes a bit longer.

No harm in checking to see if someone has found a work-a-round.

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Reply With Quote
 
  #6 (permalink)
Market Wizard
New Orleans, La (Mardi Gras City)
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Ninjatrader / Optimus Futures / AmpFutures
Favorite Futures: ES / 6E / 6B / CL
 
DavidHP's Avatar
 
Posts: 1,002 since Aug 2009
Thanks: 802 given, 1,367 received

Perhaps this will develop into a solution.
I have a 'virtual bars' indicator that will create simulated bars/candles over an existing chart.
I will look into creating one that emulates the secondary timeframe bars for the types I'm using.

Thanks


Fat Tails View Post

Asking for the Impossible


For indicators there is another option. You can code them in a way that the values are calculated from a secondary bar series, which is loaded by the indicator and then projected to the primary bar series. But then you will get the projection, which typically lags by a fraction of the last bar, and you will not get the original values displayed in line with the secondary bars where they were formed.


Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Reply With Quote
 
  #7 (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

That's impossible

Unless the secondary series consists of bars of variable duration whose life spans correspond to those of the primary series. But why would anyone want to do this?

Well, from these charts I can think of a few reasons.

Attached Thumbnails
Multiple Time Frame Equidistant Bars-ym-12-11-rjay-s-rangenogap-9-tick-11_14_2011.jpg   Multiple Time Frame Equidistant Bars-ym-12-11-121-tick-11_14_2011.jpg  

Last edited by Zondor; November 14th, 2011 at 02:05 PM.
Reply With Quote
 
  #8 (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


DavidHP View Post
Perhaps this will develop into a solution.
I have a 'virtual bars' indicator that will create simulated bars/candles over an existing chart.
I will look into creating one that emulates the secondary timeframe bars for the types I'm using.

Thanks

I think, given the architecture of NinjaTrader, two differnt approaches are possible:


MultiPeriod Candles

You take the primary bar series from the chart, which is the smaller timeframe and then combine N candles into a larger teimframe candle. This is not difficult to code, but has some limitations.

-> the primary and secondary (painted) bar types need to be identical, that it you can only combine tick with tick bars, volume bars with volume bars, etc.
-> the higher timeframe needs to be an integer multiple of the lower timeframe
-> you can only apply this to tick and volume charts, but not to range charts, as unfortunately higher timeframe range
bars cannot be built from lower timeframe range bars
-> it is not needed for minute bars, because for minute bars equidistant and non-equidistant spacing gives (mostly) identical results


Multi-TimeFrame Indicator which loads a secondary bar series

I tihnk that it is possible to code a multi-timeframe indicator, which loads a secondary bar series, computes the candles for those bars and draws them onto the panel, where they belong. It would be sort of a challenge to determine the appropriate size for those secondary candles and make that size adjustable.

Reply With Quote
 
  #9 (permalink)
Elite Member
Accokeek, USA
 
Futures Experience: Beginner
Platform: NT & TOS
Favorite Futures: ES
 
Posts: 32 since Mar 2011
Thanks: 6 given, 12 received

Getting around Equidistant limitation


Fat Tails View Post
I think, given the architecture of NinjaTrader, two differnt approaches are possible:


MultiPeriod Candles

You take the primary bar series from the chart, which is the smaller timeframe and then combine N candles into a larger teimframe candle. This is not difficult to code, but has some limitations.

-> the primary and secondary (painted) bar types need to be identical, that it you can only combine tick with tick bars, volume bars with volume bars, etc.
-> the higher timeframe needs to be an integer multiple of the lower timeframe
-> you can only apply this to tick and volume charts, but not to range charts, as unfortunately higher timeframe range
bars cannot be built from lower timeframe range bars
-> it is not needed for minute bars, because for minute bars equidistant and non-equidistant spacing gives (mostly) identical results


Multi-TimeFrame Indicator which loads a secondary bar series

I tihnk that it is possible to code a multi-timeframe indicator, which loads a secondary bar series, computes the candles for those bars and draws them onto the panel, where they belong. It would be sort of a challenge to determine the appropriate size for those secondary candles and make that size adjustable.

Hello Fat Tails and group,
Ninja's limitation of place 2 or more instrument tick/time frames on a single chart is most frustrating.

1) is there a way to unlock the equidistant option when more than one instrument is on the chart
2) is there a simple way to allow an indicator to read another tick/time frame, while being on a chart of a different tick/time?


I have been looking at some things from MicroTrends, but nothing similar to this.


Thanks, Ky

ps: a thx to "TMFT" for assistance a few weeks ago!!

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



KySt View Post
Hello Fat Tails and group,
Ninja's limitation of place 2 or more instrument tick/time frames on a single chart is most frustrating.

1) is there a way to unlock the equidistant option when more than one instrument is on the chart
2) is there a simple way to allow an indicator to read another tick/time frame, while being on a chart of a different tick/time?


I have been looking at some things from MicroTrends, but nothing similar to this.


Thanks, Ky

ps: a thx to "TMFT" for assistance a few weeks ago!!

1) Non-equidistant bars are simply bars that are aligned along a linear time axis. Equidistant bars distort time in order to achieve equidistant bar spacing. If you want to place several bar series on one chart, you have to settle for one specific timescale. NinjaTrader does not have the option to let you select the timescale, but settles for a linear time scale. This will make appear session breaks on your charts, and all bars that do not have fixed periods will be shown as non-equidistant bars.

I have you have a minute bar series and a tick bar series, at least one of those series will be always unevenly spaced, because they are not being plotted synchronously.

2) This is possible. It would be a multi-timeframe indicator. If you apply a multi-timeframe indicator to a chart, you can get around non-equidistant bar spacing, as long as only a single bar series is shown on the chart. However, multi-timeframe indicators are not really simple.

Reply With Quote
The following user says Thank You to Fat Tails for this post:

Reply



futures io > > > > > Multiple Time Frame Equidistant Bars

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
help code multiple Time Frame indicator ttmarok ThinkOrSwim Programming 25 March 3rd, 2014 09:42 PM
Multiple Time Frame Bollinger Bands Saroj The Elite Circle 3 April 28th, 2013 03:34 PM
Multiple Time Frame Moving Average Indicator Aragorn NinjaTrader 6 November 8th, 2011 11:59 PM
Time of day,and possible time frame sycronization phasganon The Elite Circle 1 September 24th, 2011 12:53 AM


All times are GMT -4. The time now is 04:57 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.16 seconds with 20 queries on phoenix via your IP 54.90.92.204