i'd like to color the background of the chart with 3 colors:
green (if Close > SMA 50)
yellow ( if Close is between SMA 25 / 50)
red ( if Close is < than 25)
green and red is working fine. but i'm struggling with the 3rd color.
after adding the 3.rd condition everything is yellow....
i'm using the following code
//Condition1
if (Close[0] < SMA(25) [0] && Close [0] < SMA (50[0])
{
BackColor = Color.Red;
}
//Condition 2
if (Close [0] > SMA(25) [0 ]&& Close [0] > SMA (50[0])
{
BackColor = Color.Green;
}
//Condition 3
//if (Close [0] > SMA (25 [0] && Close [0] < SMA(50)[0]);
//{
// BackColor = Color.Yellow;
//}
thx

Comment