Question:
How to AssignPriceColor only if changeColor == yes? If changeColor = no, then follow the color settings in Appearance tab. Thanks in advance.
Example:
input changeColor = yes;
def IsUptrend = IsA + IsB + IsC;
plot Uptrend = IsUptrend;
Uptrend.Hide();
plot Data = close;
Data.DefineColor("Uptrend", CreateColor(100, 200, 100));
Data.DefineColor("Downtrend", Color.LIGHT_RED);
Data.DefineColor("Sideway", CreateColor(225, 175, 225));
AssignPriceColor(if Uptrend == 3 then Data.Color("Uptrend") else if Uptrend == 0 then Data.Color("Downtrend") else Data.Color("Sideway"));
How to AssignPriceColor only if changeColor == yes? If changeColor = no, then follow the color settings in Appearance tab. Thanks in advance.
Example:
input changeColor = yes;
def IsUptrend = IsA + IsB + IsC;
plot Uptrend = IsUptrend;
Uptrend.Hide();
plot Data = close;
Data.DefineColor("Uptrend", CreateColor(100, 200, 100));
Data.DefineColor("Downtrend", Color.LIGHT_RED);
Data.DefineColor("Sideway", CreateColor(225, 175, 225));
AssignPriceColor(if Uptrend == 3 then Data.Color("Uptrend") else if Uptrend == 0 then Data.Color("Downtrend") else Data.Color("Sideway"));