NexusFi: Find Your Edge


Home Menu

 





panel condition


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one baberg with 4 posts (0 thanks)
    2. looks_two forrestang with 3 posts (0 thanks)
    3. looks_3 mea109 with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 1,905 views
    2. thumb_up 4 thanks given
    3. group 3 followers
    1. forum 9 posts
    2. attach_file 0 attachments




 
Search this Thread

panel condition

  #1 (permalink)
baberg
Canada
 
Posts: 29 since Jul 2011
Thanks Given: 4
Thanks Received: 1

Hi,

Is it possible to code something like :

if(indicator on panel 2)
else if(indicator on panel 3)
else ...

?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047



baberg View Post
Hi,

Is it possible to code something like :

if(indicator on panel 2)
else if(indicator on panel 3)
else ...

?

If you are asking if you can reference more than one indicator via a study you create, the answer is yes?

It doesn't matter what is actually on your chart, you can reference ANY study that exists within your library.

Reply With Quote
  #4 (permalink)
baberg
Canada
 
Posts: 29 since Jul 2011
Thanks Given: 4
Thanks Received: 1

Actually I have a DataSeries that I wish would change depending if you select the indicator to appear on panel 1 or panel 2, etc

Not sure if I'm being understood.

Reply With Quote
  #5 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047


baberg View Post
Actually I have a DataSeries that I wish would change depending if you select the indicator to appear on panel 1 or panel 2, etc

Not sure if I'm being understood.

Oh ok. I'm still not sure what you want to do, but I see it wasn't what I initially thought.

Reply With Quote
  #6 (permalink)
baberg
Canada
 
Posts: 29 since Jul 2011
Thanks Given: 4
Thanks Received: 1

Sorry ! Let me try again.

if(indicator is displayed on panel 2) plot.Set(a);
else if(indicator is displayed on panel 3) plot.Set(b);

I'm trying to find out if you can test on which chart panel the indicator has been displayed by the user.

Reply With Quote
  #7 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047

Ok gotcha! Sorry I am not sure how you would access that information or if it is possible?

Reply With Quote
  #8 (permalink)
 MooreTech 
Orlando, Florida
 
Experience: Advanced
Platform: NinjaTrader, TradeStation, MultiCharts, eSignal, MetaTrader
Trading: ES
Posts: 57 since Aug 2010
Thanks Given: 6
Thanks Received: 73

See if this helps...

 
Code
IndicatorBase[] indicators = ChartControl.Indicators;
foreach (Indicator i in indicators)
{
    if (i.Panel==2)
    {
        // do something here
    }
}

If you have any questions about our products or services please contact me via Private Message
Follow me on Twitter Reply With Quote
Thanked by:
  #9 (permalink)
baberg
Canada
 
Posts: 29 since Jul 2011
Thanks Given: 4
Thanks Received: 1

Thanks for your Help !
However I ca't make it seem to work.

Here's a simple try

 
Code
		if(Bars.FirstBarOfSession) c.Set(Close[1]); 
			else c.Set(c[1]);
			c2.Set(c[0]);
			foreach (Indicator i in indicators){
   				if(i.Panel>1) c2.Set(0);
				else{
					c2.Set(c[0]);
					if(Bars.FirstBarOfSession) PlotColors[1][0]=Color.Transparent;
					else PlotColors[1][0]=Color.Yellow;
				}
			}
When panel 1 is chosen, it's fine.
When panel 2 is chosen, it acts the same way it is coded for panel 1, that is to say previous day close instead of 0, and custom PlotColors.
It does not seem to detect panels and make a difference.

Also, AutoScale is forced to be set to "true" once indicator is installed on chart while AutoScale is actually hard-coded to "false" on Initiliase{}

Any ideas ?
Brian

Reply With Quote
  #10 (permalink)
 
mea109's Avatar
 mea109 
france
 
Experience: Beginner
Platform: nt
Posts: 201 since Oct 2009
Thanks Given: 1,776
Thanks Received: 56


Did someone make it work ?

Reply With Quote




Last Updated on September 7, 2011


© 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