protected override void OnBarUpdate()
{
if (Value[0] > 0)
{
Plots[0].Brush = Brushes.Green;
Plots[0].Width = 20;
}
if (Value[0] < 0)
{
Plots[0].Brush = Brushes.Red;
Plots[0].Width = 20;
}
}
Update:
When running the indicator live the color changes work but they change the colors of all the previous days as well. So when the value is greater than 0 it turns all the bars green on the current day as well as all the bars on the previous days. When the value is less than 0 it turns all the bars red on the current day as well as the previous days. I would like for all bars that are greater than 0 to be green and stay green and all the bars that are less than 0 to turn red and stay red.
Comment