Code located in OnStateChange(), and tried both inside If (State == State.SetDefaults) and outside:
/// Initiate new solid color backbrush with custom color: Uptrend Background Color
Brush UptrendColor = new SolidColorBrush(Color.FromRgb(50, 50, 50));
UptrendColor.Freeze();
Code located in OnBarUpdate():
/// Uptrend - Background Color
if (MA1[0] > MA2[0])
{
BackBrush = Brushes.UptrendColor;
}

Comment