this is the idea
Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "Trend"));
Add(PeriodType. Minute , 60);
protected override void OnBarUpdate()
{
Trend.Set( Inputs[1] );
if (Trend[0] > Trend[1] )
{
{PlotColors[0][0]= risingAverage;}
}
else if (Trend[0] < Trend[1] )
{
{ PlotColors[0][0]= fallingAverage;}
}
but the thing is it doesn't works because it looks like a stepMA, any help will be appreciated
Comment