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

  #311 (permalink)
 Cash4Ag 
Scottsdale AZ
 
Experience: Intermediate
Platform: NT
Trading: CL, TF
Posts: 11 since Sep 2011
Thanks Given: 91
Thanks Received: 2

I'm sorry if this had already been posted but has anybody created a VisualSMA Crossover indicator that would plot an arrow or colored background? Thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
What broker to use for trading palladium futures
Commodities
 
  #312 (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


Cash4Ag View Post
I'm sorry if this had already been posted but has anybody created a VisualSMA Crossover indicator that would plot an arrow or colored background? Thanks

You would need to call the VisualSMA to do so, and that is not so easy. I have callable version as well, but due to the NinjaTrader archtecture, the called VisualSMA will not work if it loads secondary Range or Renko Bar.

But if you just want to use an SMA cross calculated from time-based, tick or volume bars, this can be done. The only problem is limited time to do it.

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


Hello Fat Tails. I know that you have indicated that there is an issue using the visual SMA on a non-time based chart like renko. I'm just wondering if this is because it can't be done in Ninja Trader or if it would just involve too much programming time to solve? The reason I'm asking is that I LOVE using RJay's renko hybrid chart and would LOVE to be able to use the visual SMA on this chart and get an accurate plot.

I've attached a screenshot of a 16 renko hybrid chart and an 8 renko hybrid chart. I have a 3 period SMA of the typical price plotted on the 16 renko hybrid and a 3 period visual SMA of the typical price of the 16 renko hybrid plotted on the 8 renko hybrid chart. On the 16 renko hybrid chart you'll notice that the highest price bar on the chart the SMA has a value of 820.20 while at the same time the visual SMA has a value of 819 on the 8 renko.

Attached Thumbnails
Click image for larger version

Name:	RenkoComparison.JPG
Views:	267
Size:	100.9 KB
ID:	65770  
Reply With Quote
  #314 (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


maxreturn View Post
I've attached a screenshot of a 16 renko hybrid chart and an 8 renko hybrid chart. I have a 3 period SMA of the typical price plotted on the 16 renko hybrid and a 3 period visual SMA of the typical price of the 16 renko hybrid plotted on the 8 renko hybrid chart. On the 16 renko hybrid chart you'll notice that the highest price bar on the chart the SMA has a value of 820.20 while at the same time the visual SMA has a value of 819 on the 8 renko.


Comparing Apples and Oranges (RenkoHybrid and Renko)

I think you are comparing apples and oranges. The left chart shows a SMA calculated from RJay's RenkoHybrid
bars. The right chart shows a SMA calculated from Renko bars.

The bar types are quite different and so is the SMA.


No issue with MTF Indicators Directly Applied to Chart

There is no issue with the VisualSMA or other MTF indicators that load range and Renko bars, as long as you use the VisualSMA or MTF indicator directly on a chart.

There is only an issue, if you call a MTF indicator which loads range or Renko bars. The VisualSMA and other MTF indicators cannot be used in a strategy, if they load range or Renko bars. They can be used in a strategy if they load minute, tick or volume bars.

Below I have compared the values returned for a simple MTF indicator and then for that same indicator being called by another indicator. The values should match, which is the case for minute, tick and volume bars. However, the values do not match for range and Renko bars. The problem with range bars is that they are only completed, once the range is exceeded. This seems to introduce a lag, when calling indicators that call range bars. Chart attached.


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

Hi Fat Tails

How are you?

Small question, is it very dificult to code, for example, a 5min. RSI in a Renko chart?

thank you for you answer

regards
michael

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #316 (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
Hi Fat Tails

How are you?

Small question, is it very dificult to code, for example, a 5min. RSI in a Renko chart?

thank you for you answer

regards
michael

It is feasible. I could use the same method as I used in the VisualSMA. The only difference is that the RSI has two plots, so you would need to execute the code twice - once for each plot. The VisualSMA has over 1,500 lines of code, but there may be some brilliant guys who find a simpler solution.

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

Actually I stoped using the (RSI) Avg, I'm working now only with the RSI itself.


Edit:
When I think about it, I actually don't care so much about to see the RSI line on the chart. I care more of the value.
Is it posible to plot only the value of a 5min or 10 min RSI (like Market Analyzer) in a Renko or Range chart?

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

Something like that

Attached Thumbnails
Click image for larger version

Name:	rsi.JPG
Views:	268
Size:	178.2 KB
ID:	80702  
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #319 (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

Hi Fat Tails

a few moments ago I found out that on my chart the VisualSMA Auto scale function does not work. Can you please give me any help on this.

Thank you

michael

Attached Thumbnails
Click image for larger version

Name:	visualSMA.JPG
Views:	237
Size:	234.7 KB
ID:	80941  
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #320 (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
Hi Fat Tails

a few moments ago I found out that on my chart the VisualSMA Auto scale function does not work. Can you please give me any help on this.

Thank you

michael

There are two reasons for this:

(1) you have activated the nodes
(2) you use an older version of the VisualSMA

In the early versions of the VisualSMA I had set the Autoscale property of the nodes to true. As this caused unnecessary problems - as you are experiencing now - , I had changed that property later.

I think that the latest version in the Download section should not autoscale, when Autoscale is set to "false". If you install a new version, please make sure to remove the prior assembly first and to restart NinjaTrader, before you import the new assembly.

If you are too lazy to install the latest version, you may simply switch off the nodes.

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