NexusFi: Find Your Edge


Home Menu

 





Coding Multi Time Frame (MTF) Indicators with NinjaTrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 180 posts (562 thanks)
    2. looks_two Zondor with 19 posts (29 thanks)
    3. looks_3 madLyfe with 16 posts (10 thanks)
    4. looks_4 BankRobberNT with 14 posts (16 thanks)
      Best Posters
    1. looks_one gomi with 3.7 thanks per post
    2. looks_two Fat Tails with 3.1 thanks per post
    3. looks_3 Zondor with 1.5 thanks per post
    4. looks_4 BankRobberNT with 1.1 thanks per post
    1. trending_up 189,208 views
    2. thumb_up 743 thanks given
    3. group 87 followers
    1. forum 424 posts
    2. attach_file 166 attachments




 
Search this Thread

Coding Multi Time Frame (MTF) Indicators with NinjaTrader

  #201 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


kalalex View Post
FT,,

This question might be out of place but is there any way you can include daily bars so I can place 20 day EMA on 15 min chart?

Thanks for all the efforts.

There is no way of including daily bars. Due to a NinjaTrader limitation the loading of daily bars will not work properly depending on the selecting session template. So the daily bars maybe inserted both too early or too late.

The only reliable way of inserting daily bars, would be

(1) in case that you need the settlement price for futures : loading them asynchronously as for the SessionPivot and FibonacciZones indicators
(2) in case that you do not need the settlement price for futures: building them from intraday data

If you need daily bars you should use a different indicator. I understand what you need, but there is no way of including this option with NinjaTrader 7. Maybe with NinjaTrader 8, if the bug is fixed, but then you will have to wait for a few years.

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
Exit Strategy
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
32 thanks
Just another trading journal: PA, Wyckoff & Trends
26 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
19 thanks
  #202 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

Below is the updated install file for the NewVisualEMA and NewVisualSMA. I consider this still to be version for testing, the indicators are not yet final.

Please uninstall the first test version prior to installing this file.

I had to make quite a number of changes relating to

-> NinjaTrader processing bars of primary and secondary bar series with identical time stamps
-> eight different options for transition from historical to real-time data
-> modifications of the code to adapt to session breaks

@ madLyfe, @ perryg: Please let me know, if you find any bugs!

Attached Files
Elite Membership required to download: VisualIndicatorsTest2.zip
Started this thread Reply With Quote
  #203 (permalink)
 
madLyfe's Avatar
 madLyfe 
Des Moines, Iowa
 
Experience: None
Platform: Ninja, TOS
Broker: AMP/CQG, TOS
Trading: CL, TF, GC
Posts: 1,641 since Feb 2011
Thanks Given: 9,220
Thanks Received: 1,020


what about this, is the new version supposed to follow the bar exactly like shown here(blue)? the old one is in black and kinda hanging back..


dont believe anything you hear and only half of what you see

Ż\_(ツ)_/Ż

(╯°□°)╯︵ ┻━┻
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #204 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


madLyfe View Post
what about this, is the new version supposed to follow the bar exactly like shown here(blue)? the old one is in black and kinda hanging back..


It would be much easier to evaluate

-> if you show the entire chart
-> leave the indicator settings on top of the chart, allowing me to test it on my side
-> also let me know, whether it is historical or real-time data

I have no clue what your chart shows.

Started this thread Reply With Quote
  #205 (permalink)
 
madLyfe's Avatar
 madLyfe 
Des Moines, Iowa
 
Experience: None
Platform: Ninja, TOS
Broker: AMP/CQG, TOS
Trading: CL, TF, GC
Posts: 1,641 since Feb 2011
Thanks Given: 9,220
Thanks Received: 1,020


Fat Tails View Post
It would be much easier to evaluate

-> if you show the entire chart
-> leave the indicator settings on top of the chart, allowing me to test it on my side

I have no clue what your chart shows.

sorry about that.. here was what i was looking at in real time, it has since changed again:


dont believe anything you hear and only half of what you see

Ż\_(ツ)_/Ż

(╯°□°)╯︵ ┻━┻
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #206 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


madLyfe View Post
sorry about that.. here was what i was looking at in real time, it has since changed again:



I do not have 8 range no gap bars installed, so I can only run it on a range chart. I am now running it in real time against the old indicator and will post the result in a few minutes. I have also modified the test indicators to show whether they have detected historical data (blue dots) or real-time data (red dots). This makes it easier to find out what happens.

The modified indicator with the dots added and one additional minor change relating to the first real-time tick, when a minute bar series is loaded, is attached below:

Attached Files
Elite Membership required to download: VisualIndicatorsTest3.zip
Started this thread Reply With Quote
  #207 (permalink)
 
madLyfe's Avatar
 madLyfe 
Des Moines, Iowa
 
Experience: None
Platform: Ninja, TOS
Broker: AMP/CQG, TOS
Trading: CL, TF, GC
Posts: 1,641 since Feb 2011
Thanks Given: 9,220
Thanks Received: 1,020


Fat Tails View Post
I do not have 8 range no gap bars installed, so I can only run it on a range chart. I am now running it in real time against the old indicator and will post the result in a few minutes. I have also modified the test indicators to show whether they have detected historical data (blue dots) or real-time data (red dots). This makes it easier to find out what happens.

The modified indicator with the dots added and one additional minor change relating to the first real-time tick, when a minute bar series is loaded, is attached below:

here is the rangenogap bars for ya:

https://nexusfi.com/elite-circle/14471-rangenogap-without-rjays-name.html#post165206

dont believe anything you hear and only half of what you see

Ż\_(ツ)_/Ż

(╯°□°)╯︵ ┻━┻
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #208 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

Here is the chart with the new indicator running against the prior version.

On that section they are absolutely identical.


Started this thread Reply With Quote
  #209 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



But in a first step I want to test the indicators on default bars. I have had problems with some Renko bar types which were not correctly coded in a way that some indicator did not run.

In a second step I may test the indicators on exotic bar types to find out whether they are compatible or not. They have now been tested on second, minute, volume, tick, range and Renko bars. This took already hours, because Ninjatrader processes bars in a different way on charts built from ticks and those built from seconds or minutes.

Started this thread Reply With Quote
  #210 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731


An approach that I have been using is to not tie the secondary series to a defined time, range, etc but instead to define it based on multiples of the primary data series. I believe this has been referred to as composite bars.

So, on any type of chart, the 2x "extended" time frame would simply look back twice as far as the base indicator, etc. This is not necessarily as simple as it seems. Sometimes when looking back twice as far you need to skip every other data point. Or when looking back three times as far, only look at one of every three of the previous data points. Otherwise all you are doing is doubling or tripling the lookback period in the base time frame. Except for indicators like the stochastic that are looking for highest highs and lowest lows.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on April 19, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts