To change chart background color (and bar colors) from indicator I this simple way, that works perfectly:
if( ChartControl != null && Bars != null )
{
ChartControl.Properties.ChartBackground = System.Windows.Media.Brushes.Black;
ChartBars.Properties.ChartStyle.UpBrush = WmBrushes.Violet;
}
But, in strategies, this way work from time to time (I tied to use it in all States, and in OnBarUpdate() method.
In one of my strategies it don't work at all.
Is there another [more correct] way to do it from strategy [and, may be, from indicator]?
Comment