Here's my code:
if(Close[0] > emaMid[0] && Close[0] > emaSlow[0]) {
Brush myBrush = new SolidColorBrush(Color.FromArgb(faOpacity, faRed, faGreen, faBlue));
myBrush.Freeze();
BackBrush = myBrush;
}
else if(Close[0] < emaMid[0] && Close[0] < emaSlow[0]){
Brush myBrush = new SolidColorBrush(Color.FromArgb(fbOpacity, fbRed, fbGreen, fbBlue));
myBrush.Freeze();
BackBrush = myBrush;
}
else{
BackBrush = null;
AboveBelow[0] = 0;
}
Any idea why this is happening?
Thanks.

Comment