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

  #181 (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
will playing with these have any effect on currently installed visualSMA/EMA indies?

They have different names and do not use the same enums, so there is no conflict between the new and the old versions.

You can therefore install them in parallel.

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
NexusFi Journal Challenge - May 2024
Feedback and Announcements
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
41 thanks
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
21 thanks
  #182 (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

getting pretty drastic differences in plots with the same options set.. Black is the current visualSMA lines, and the equal counterparts are the newvisualSMA lines colored in red:


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

¯\_(ツ)_/¯

(╯°□°)╯︵ ┻━┻
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #183 (permalink)
 
lolu's Avatar
 lolu 
Lagos, Nigeria
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader, SierraChart
Trading: Euro Currency & Oil
Frequency: Daily
Duration: Hours
Posts: 2,552 since Jun 2009
Thanks Given: 1,049
Thanks Received: 1,678



Fat Tails View Post
I have been further digging into the NinjaTrader architecture, and the result is a simpler version of the VisualSMA and the VisualEMA. The new versions were entirely recoded from scratch and the code is about 80 lines shorter than the code of the previous versions.

Simplicity always means performance gain and robustness, so here are some of the main improvements:

-> loading time of the indicator on historical data reduced by a factor 10
-> lag of the indicators reduced
-> indicators can be safely called from other indicator or strategy

The chart below shows the 20-period EMA and 20-period SMA, both calculated from a 5 minute chart, but displayed on a 50 tick chart of the FDAX 12-11.

The new indicators are attached below. After installation you will find them as NewVisualSMA or NewVisualEMA in the dropdown menu of the indicator dialogue box. These are not the final versions, but pre-versions for testing.

Fat,

What are the differences between the anaVisualEMA, anaVisualSMA and VisualEMAX(x), VisualSMAX(x) ? I seem to be more comfortable with ...MAX series.

Lolu

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #184 (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
getting pretty drastic differences in plots with the same options set.. Black is the current visualSMA lines, and the equal counterparts are the newvisualSMA lines colored in red:

This is still a bug in the new indicator, will change the code and post it later. Nothing serious, just forgot to implement the Typical Price correctly, so it is displaying the Close.

Started this thread Reply With Quote
Thanked by:
  #185 (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


lolu View Post
Fat,

What are the differences between the anaVisualEMA, anaVisualSMA and VisualEMAX(x), VisualSMAX(x) ? I seem to be more comfortable with ...MAX series.

Lolu

I use X for experimental, it was a pre-version. There is a learning curve involved in coding MTF indicators, I am gradually getting better at it. An expert is somebody, who has made every possible mistake.

I really suggest to switch to the newest version available in the download section of the forum. I am learning from my own and other people's mistakes and adapt the indicators accordingly.

I now recommend the new test version as it is faster, more stable and also has a reduced lag depending on the bar series loaded.

Started this thread Reply With Quote
Thanked by:
  #186 (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
getting pretty drastic differences in plots with the same options set.. Black is the current visualSMA lines, and the equal counterparts are the newvisualSMA lines colored in red:

Suggest that you test again now. I have now added that little feature, which allows to set the Typical Price, High, Low. The chart below shows the indicator in OneTickCorrection Mode and Visual Mode applied to the high, low and typical of a 30 min bar series.

I have also found two minor other bugs, so I suggest that the few who have downloaded the first version swap it for this one.


Attached Thumbnails
Click image for larger version

Name:	ES 12-11 (5 Min)  21_10_2011.jpg
Views:	204
Size:	110.5 KB
ID:	52815  
Started this thread Reply With Quote
  #187 (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

does this look more like what it was supposed to be plotting? im using the same settings as the previous picture i posted..


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

¯\_(ツ)_/¯

(╯°□°)╯︵ ┻━┻
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #188 (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
does this look more like what it was supposed to be plotting? im using the same settings as the previous picture i posted..


If you look at the chart, you will note that in some places the new version (red) leads the old version (black) by one bar. This would be an improvement. Is your chart data historical or real-time data?

Started this thread Reply With Quote
  #189 (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
If you look at the chart, you will note that in some places the new version (red) leads the old version (black) by one bar. This would be an improvement. Is your chart data historical or real-time data?

its real time.. in the fact that i trade from the live market...?

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

¯\_(ツ)_/¯

(╯°□°)╯︵ ┻━┻
Visit my NexusFi Trade Journal Reply With Quote
  #190 (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
its real time.. in the fact that i trade from the live market...?

Once you press F5, real-time data is replaced with historical data.

Started this thread Reply With Quote
Thanked by:




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