PDA

View Full Version : Test color line indicator


volpiemanuele
11-05-2010, 05:40 AM
Hi,

If i use an indicator that plot in the chart a line, how can test the colour of this line in a strategy ?

Tanks

e

NinjaTrader_Bertrand
11-05-2010, 05:59 AM
volpiemanuele, in the strategy you would want to check for the conditions that color the indicator plot, not for the plot color directly.

volpiemanuele
11-05-2010, 07:21 AM
How?

The indicator have these indication in relation of the plot

protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Blue), PlotStyle.Line, "TmUp"));
Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "TmDn"));
Add(new Plot(Color.FromKnownColor(KnownColor.Yellow), PlotStyle.Line, "TmN"));

How can test in the strategy the colour?

TAnks

NinjaTrader_Bertrand
11-05-2010, 07:22 AM
You would need to work with the conditions that lead to the coloring of the indicator, not with the Plots themselves.