View Full Version : Adding Indicators
NinjaTrader_Josh
05-19-2007, 10:20 PM
When you add indicators to a strategy to display is there anyway you can modify the indicators options like color and width?
NinjaTrader_Dierk
05-20-2007, 12:42 AM
Please check out the Initialize method of the SampleMACrossOver strategy.
NinjaTrader_Josh
05-20-2007, 03:20 AM
ahh. Thanks. Is there a list to all the parameters available somewhere?
NinjaTrader_Dierk
05-20-2007, 03:55 AM
Pen class is standard .NET. Please see e.g. here: http://msdn2.microsoft.com/en-us/library/system.drawing.pen_members(VS.71).aspx
NinjaTrader_Josh
05-20-2007, 04:03 AM
What I'm having problems with is trying to change the color of the upper and lower channels for my Regression Channel indicator.
RegressionChannel(60, 2).Lower.Pen.Color = Color.Purple;
It doesn't like the Pen after Lower
NinjaTrader_Dierk
05-20-2007, 04:08 AM
Please take again a look at the sample I provided. "Lower" is of type "DataSeries" and not of type "Plot".
You need to go
RegressionChannel(60, 2).Plots[2].Pen.Color = Color.Purple
NinjaTrader_Josh
05-20-2007, 04:10 AM
Oh snap. Thanks. Sorry I'm just using trial and error to figure out the syntax at the moment.
NinjaTrader_Josh
05-24-2007, 03:42 AM
How do you set which Panel the indicator will show up on? I'm trying to get my volume to show up in panel 1.
NinjaTrader_Dierk
05-24-2007, 05:38 AM
Please check out the Panel properties on the chart indicator dialog box.
NinjaTrader_Josh
05-24-2007, 10:12 AM
Sorry I meant to ask how to do it when I am calling the indicator from a strategy with Add().
NinjaTrader_Dierk
05-24-2007, 10:24 AM
Hmm, have not yet tried if this works. You could try something like
SMA(Fast).Panel=2; (see SampleMACrossOver strategy on how to set properties on indicators which are added by a strategy).
NinjaTrader_Josh
05-24-2007, 12:18 PM
It seems to kind of work.
.Panel=1 makes the indicator go to panel 2
.Panel=2 makes the indicator go to panel 3
but .Panel=0 doesn't make the indicator go to panel 1, instead it seems to just drop the indicator at a default panel.
NinjaTrader_Dierk
05-24-2007, 12:23 PM
Right.
Panel is the internal 0-based representation.
PanelUI is the 1-based UI representation (like in the indicator dialog).