NexusFi: Find Your Edge


Home Menu

 





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


Discussion in NinjaTrader

Updated
    1. trending_up 3,030 views
    2. thumb_up 2 thanks given
    3. group 1 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012

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


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran Ceasefire Surges to 19.5% on US 15-Point Plan -- 82 …
Prediction Markets & Event Contracts
Penalties in Budapest, Peace Deadline in Tehran: Arsenal …
Prediction Markets & Event Contracts
Trump Truth Social Fires Hormuz From 10% to 59% -- Arsen …
Prediction Markets & Event Contracts
Topstep Acquires The Futures Desk -- Prop Firm Consolida …
Funded Trading Evaluation Firms
Tradeify 3.0 Overhauls Futures Prop Firm Model -- One-Ti …
Funded Trading Evaluation Firms
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012


is for NT version 7


Started this thread Reply With Quote
  #4 (permalink)
 
ratfink's Avatar
 ratfink 
Birmingham UK
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
Posts: 3,550 since Dec 2012
Thanks Given: 17,423
Thanks Received: 8,430


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
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012


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


Started this thread Reply With Quote




Last Updated on September 25, 2016


© 2026 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 - Downloads - Top
no new posts