Indicator: How to plot in two different panels with one indicator? - NinjaTrader Programming | futures.io
futures.io futures trading


Indicator: How to plot in two different panels with one indicator?
Started: by vantojo Views / Replies:135 / 4
Last Reply: Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Reply
 
Thread Tools Search this Thread
 

Indicator: How to plot in two different panels with one indicator?

  #1 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 157 since Jul 2012
Thanks: 21 given, 34 received

Indicator: How to plot in two different panels with one indicator?

I have an indicator that will be calculating/generating values on the price panel, it is also drawing there. However, I want to use some of the calculated values to be plotted in a separate panel on the same chart.

(Don't really like the idea of flipping variables that belong in Initialize.)

Is there a way to do this?

Another option would be to expose these values from indicator 1 (primary) and have a secondary indicator pick those values up and plot them in the second panel...not sure how to do this...I don't think instantiating the indicators inside each other will accomplish this?

Ideas?

I have global variables being set, but these are globals for all chart and strategy scripts. I want to share this data only between indicators on the same chart, but different panels.

Always good to see existing code, if there is any....

Thanks

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
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 157 since Jul 2012
Thanks: 21 given, 34 received

this....


is for NT version 7

Reply With Quote
 
  #4 (permalink)
Market Wizard
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 2,947 since Dec 2012
Thanks: 9,501 given, 5,815 received
Forum Reputation: Legendary


vantojo View Post
I have an indicator that will be calculating/generating values on the price panel, it is also drawing there. However, I want to use some of the calculated values to be plotted in a separate panel on the same chart.

(Don't really like the idea of flipping variables that belong in Initialize.)

Is there a way to do this?

Another option would be to expose these values from indicator 1 (primary) and have a secondary indicator pick those values up and plot them in the second panel...not sure how to do this...I don't think instantiating the indicators inside each other will accomplish this?

Ideas?

I have global variables being set, but these are globals for all chart and strategy scripts. I want to share this data only between indicators on the same chart, but different panels.

Always good to see existing code, if there is any....

Thanks

You can do it several ways with shared variables, but to be honest the easiest way is just to run two copies of the same indicator, and switch a parameter dialog option on/off between them to enable/disable what gets drawn. Rarely do you see much cpu impact, unless it's poor code or a beast.

NT7 certainly does not work well switching drawing between two panels using the DrawOnPricePanel variable, so don't waste any time on that route.

Cheers

Travel Well
Reply With Quote
The following user says Thank You to ratfink for this post:
 
  #5 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 157 since Jul 2012
Thanks: 21 given, 34 received

OK

Futures Edge on FIO

Which products do you trade?

 

ratfink View Post
You can do it several ways with shared variables, but to be honest the easiest way is just to run two copies of the same indicator, and switch a parameter dialog option on/off between them to enable/disable what gets drawn. Rarely do you see much cpu impact, unless it's poor code or a beast.

NT7 certainly does not work well switching drawing between two panels using the DrawOnPricePanel variable, so don't waste any time on that route.

Cheers

That was my first thought, to have two indicators draw on different panels and duplicate the calculations in the second one instead of trying shared variables to pass data.

this way I could also run the indicator stand alone in Market Analyzer without any chart plots, against more than one instrument, if I wanted alerts, etc.

Unless I hear of a better solution I'll go that direction.

Thanks

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

Reply



futures.io > > > > > Indicator: How to plot in two different panels with one indicator?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

2016 True Edge Awards: Voting is open until Jan 21!

Now
 

Bookmap New Indicator Panel, Cumulative Delta, Order Flow demo

Jan 17
 

An Afternoon with FIO member Massive l

Elite only

Leo Murphy: Making sense of Technical Analysis and Random Walk

Elite only
 

FuturesTrader71: Ask Me Anything

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
indicator drawing in two panels smallbirdking NinjaTrader 4 August 14th, 2015 03:41 AM
Help my indicator plot on last bar GoldenRatio TradeStation 11 October 26th, 2014 07:02 AM
indicator will not plot MilfordT NinjaTrader 5 October 6th, 2014 07:46 PM
deltaema indicator will not plot aligator The Elite Circle 50 March 6th, 2014 08:36 PM
Indicator plot syntax pequemec NinjaTrader Programming 4 August 30th, 2011 03:06 AM


All times are GMT -4. The time now is 10:08 AM.

no new posts
Page generated 2017-01-18 in 0.12 seconds with 19 queries on phoenix via your IP 54.159.158.180