Hello All,
I looked around the site and couldn't figure out what I am doing wrong.
I'm trying to write a script to change color and also say "buy" or other comments that will keep me in check with my trading.
AddLabel(yes, "DPO: " + round(DPO),
if DPO> Zeroline then Color.GREEN else Color.RED);
def numericaldifference = dpo - midlineP;
AddLabel(yes, "DPO vs Midline Difference: " + numericalDifference,
else if numericalDifference> 0 then Color.GREEN else Color.RED,
else if numericalDifference> 0 then "BUY" else "WAIT"));
I was using this script as a example to code the script.
Thank you,
jrj4774
I looked around the site and couldn't figure out what I am doing wrong.
I'm trying to write a script to change color and also say "buy" or other comments that will keep me in check with my trading.
AddLabel(yes, "DPO: " + round(DPO),
if DPO> Zeroline then Color.GREEN else Color.RED);
def numericaldifference = dpo - midlineP;
AddLabel(yes, "DPO vs Midline Difference: " + numericalDifference,
else if numericalDifference> 0 then Color.GREEN else Color.RED,
else if numericalDifference> 0 then "BUY" else "WAIT"));
I was using this script as a example to code the script.
Code:
AddLabel(
yes,
if CMOvalue >= 50 then "VERY BULLISH"
else if CMOvalue > 0 and slopeUp then "BULLISH"
else if CMOvalue > 0 and slopeDown then "BULLISH BUT TRENDING DOWN"
else if CMOvalue <= -50 then "STRONGLY BEARISH"
else if CMOvalue < 0 and slopeDown then "BEARISH"
else if CMOvalue < 0 and slopeUp then "BEARISH BUT TRENDING UP"
else "NEUTRAL",
if CMOvalue >= 50 then Color.DARK_GREEN
else if CMOvalue > 0 and slopeUp then Color.GREEN
else if CMOvalue > 0 and slopeDown then Color.ORANGE
else if CMOvalue <= -50 then Color.RED
else if CMOvalue < 0 and slopeDown then Color.RED
else if CMOvalue < 0 and slopeUp then Color.CYAN
else Color.YELLOW
);
Thank you,
jrj4774
Attachments
Last edited by a moderator: