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,653 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

  #281 (permalink)
 BankRobberNT 
NYC
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Interactive Brokers
Trading: forex
Posts: 38 since Aug 2011

You load it into 1min chart and you can set up all the parameters including the second time frame in strategy window.

Strategy was provided as is, for educational purposes, and as Fat Tails said "Unfortunately my time is limited, and I cannot spend hours for free on coding strategies"
Strategy without serious work and lot of testing and tweaking will never be profitable.
I have a lot of my own projects to play with.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
What broker to use for trading palladium futures
Commodities
REcommedations for programming help
Sierra Chart
 
  #282 (permalink)
 BankRobberNT 
NYC
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Interactive Brokers
Trading: forex
Posts: 38 since Aug 2011


Fat Tails View Post
Good idea to embed the secondary bar series directly in a strategy.

I would like to know whether you manage to freeze NT with BIP 163. I bet so.

Here is a screenshot of the Output window where you can see there are no freezes with 160-something BIP

Attached Thumbnails
Click image for larger version

Name:	output.JPG
Views:	208
Size:	402.9 KB
ID:	57668   Click image for larger version

Name:	output2.JPG
Views:	178
Size:	599.9 KB
ID:	57669  
Reply With Quote
  #283 (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,103



BankRobberNT View Post
Here is a screenshot of the Output window where you can see there are no freezes with 160-something BIP

But you did not set all indicators to CalculateOnBarClose = false, or did you?

Started this thread Reply With Quote
  #284 (permalink)
 BankRobberNT 
NYC
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Interactive Brokers
Trading: forex
Posts: 38 since Aug 2011


Fat Tails View Post
But you did not set all indicators to CalculateOnBarClose = false, or did you?

That's a strategy, not an indicator, and it's working with CalculateOnBarClose = false. Of course heavy time sharing and no external indicators except the simpliest 5 liners like SMA EMA. All other indicators are internal. For example why would I call CurrentOHL indicator when I can do the calculations by myself, save some instructions and time and add some features. That's the catch.

Reply With Quote
  #285 (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,103

There has been a number of requess to add some color options to the VisualSMA and Visual EMA. This is what I have done with the update.

-> color can be selected for upsloping and downsloping EMA and SMA
-> paint bars are available to detect the trend according to the indicator slope
-> the paint bars can be shown without plotting the indicator

The update can be found in the download section as usual:



Attached Thumbnails
Click image for larger version

Name:	VisualSMA.jpg
Views:	261
Size:	91.6 KB
ID:	58763  
Started this thread Reply With Quote
  #286 (permalink)
 maxreturn 
Grand Rapids, Michigan, United States
 
Experience: Intermediate
Platform: NinjaTrader
Trading: TF, 6E
Posts: 319 since Dec 2010
Thanks Given: 264
Thanks Received: 114


Fat Tails View Post
There has been a number of requess to add some color options to the VisualSMA and Visual EMA. This is what I have done with the update.

-> color can be selected for upsloping and downsloping EMA and SMA
-> paint bars are available to detect the trend according to the indicator slope
-> the paint bars can be shown without plotting the indicator

The update can be found in the download section as usual:



A mere thanks does not seem enough for all you do. HUGH ROCK!

Reply With Quote
Thanked by:
  #287 (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,103

I had made a small mistake when exporting the files. The first version, which I attached a few hours ago, cannot be properly imported, as it will ask for a missing file.

I have now replaced the files in the download section and they should work as expected. Please let me know, if there are any problems.

Started this thread Reply With Quote
  #288 (permalink)
 
michaelf's Avatar
 michaelf 
Mérida, Mexico
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8
Broker: NinjaTrader Brokerage
Trading: MNQ
Frequency: Daily
Duration: Minutes
Posts: 559 since Mar 2011
Thanks Given: 1,435
Thanks Received: 581


Fat Tails View Post
There has been a number of requess to add some color options to the VisualSMA and Visual EMA. This is what I have done with the update.

-> color can be selected for upsloping and downsloping EMA and SMA
-> paint bars are available to detect the trend according to the indicator slope
-> the paint bars can be shown without plotting the indicator

The update can be found in the download section as usual:



Thank you Fat Tails for this
have you planned also to put background color on it?

michael

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #289 (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,103


michaelf View Post
Thank you Fat Tails for this
have you planned also to put background color on it?

michael

No I have not planned it. All these color things drive me mad. I do not have any use for those colors, just doing it because poeple love colors for their toys.

It would be best to separate color issues from the Visual indicators, but then you need to call the indicator. Due to NinjaTrader architecture there are some problems in calling MTF indicators, when these indicators load secondary bar series built from range or Renko bars. I have observed a vertical shift, and this problem has been confirmed by NT developers for all MTF indicators.

So what I will do with the next version, is to allow to call it in strategy mode, but also make sure that it does not return any values, when it loads rangebars.

Started this thread Reply With Quote
Thanked by:
  #290 (permalink)
 BankRobberNT 
NYC
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Interactive Brokers
Trading: forex
Posts: 38 since Aug 2011



Fat Tails View Post
No I have not planned it. All these color things drive me mad. I do not have any use for those colors, just doing it because poeple love colors for their toys.

It would be best to separate color issues from the Visual indicators, but then you need to call the indicator. Due to NinjaTrader architecture there are some problems in calling MTF indicators, when these indicators load secondary bar series built from range or Renko bars. I have observed a vertical shift, and this problem has been confirmed by NT developers for all MTF indicators.

So what I will do with the next version, is to allow to call it in strategy mode, but also make sure that it does not return any values, when it loads rangebars.

I finally succeeded to code regular SMA and EMA indicators as functions inside my strategy. (the problem for me was how to do it with multi dimensional dataseries) So if you still don't use this approach in your indicator, you should do it, it will speed up the whole thing A LOT
Proudly can say that my strategy doesn't use any external indicators at all!!!

Attached Thumbnails
Click image for larger version

Name:	res1.JPG
Views:	209
Size:	375.0 KB
ID:	58905  
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