I'm wondering if anyone knows how you could get the entire indicator panel to be highlighted a specific color that is triggered by a plot crossing another plot.
I've got a custom indicator with 2 plots: Slow, Slow 2
I was thinking that the Region Highlight X drawing tool would be the best way to achieve this.
I put together this code in the OnBarUpdate section:
if (CurrentBar > 0)
{
if (slow[0] > slow2[0])
{
Draw.RegionHighlightX(this, "RegionAbove" + CurrentBar, CurrentBar - 1, CurrentBar, Brushes.Cyan);
}
else if (slow[0] < slow2[0])
{
Draw.RegionHighlightX(this, "RegionBelow" + CurrentBar, CurrentBar - 1, CurrentBar, Brushes.DeepPink);
}
}
}
}
}
}
But for some reason, the drawing tool isn't updating.
Is there anything wrong with this code that could be causing it not to update accordingly?
And lastly, if you think that the Region Highlight X drawing tool isn't the best way to achieve this effect, could you recommend what would work better?
Your help is much appreciated.
Comment