NexusFi: Find Your Edge


Home Menu

 





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


Discussion in NinjaTrader

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




 
Search this Thread

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

  #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?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 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,633 since Dec 2012
Thanks Given: 17,423
Thanks Received: 8,425


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


© 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