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:180 / 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: 158 since Jul 2012
Thanks: 21 given, 35 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: 158 since Jul 2012
Thanks: 21 given, 35 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: 3,016 since Dec 2012
Thanks: 9,982 given, 6,110 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: 158 since Jul 2012
Thanks: 21 given, 35 received

OK

Futures Edge on FIO

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)
 

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only

FIO Video Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

April

Process above all else w/Anthony Crudele @ Futures Radio Show

Elite only

Machine Learning - Quantitative Trading w/Martin Froehler @ Quantiacs

Elite only

Market Dynamics w/Peter Davies @ Jigsaw Trading

Elite only

Ask Me Anything w/Patrick Rooney @ Trading Technologies

Apr 18

Ask Me Anything w/FuturesTrader71

Apr 19

Machine Learning w/Kris Longmore

Elite only

Market Analysis w/Dave Forss

Apr 25

Introducing iSystems with Stage 5 Trading

Apr 27
     

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


All times are GMT -4. The time now is 04:30 AM.

no new posts
Page generated 2017-03-28 in 0.09 seconds with 19 queries on phoenix via your IP 54.205.251.237