I have a script that is a watchlist column indicator that I have added but it has six columns with different colors when the condition
changes. I'm trying to convert the six different scripts into one custom column indicator with changes in colors as the condition changes.
Below is the script I am trying to convert to only one script, I've played around with it but can't get it to do my desired result. If possible I would like to add
custom labels in this script also. Does any member have any ideas or help?
Thanks
changes. I'm trying to convert the six different scripts into one custom column indicator with changes in colors as the condition changes.
Below is the script I am trying to convert to only one script, I've played around with it but can't get it to do my desired result. If possible I would like to add
custom labels in this script also. Does any member have any ideas or help?
Thanks
plot myVariable = SimpleMovingAvg("length" = 50)."SMA" is less than SimpleMovingAvg("length" = 200)."SMA" and close is greater than SimpleMovingAvg("length" = 50)."SMA" and close is greater than SimpleMovingAvg("length" = 200)."SMA"; | ||||||||||||||||||||||
AssignBackgroundColor(if myVariable then color.YELLOW else Color.WHITE); | ||||||||||||||||||||||
plot myVariable = close is less than SimpleMovingAvg("length" = 50)."SMA" and | ||||||||||||||||||||||
close is less than SimpleMovingAvg("length" = 200)."SMA"; | ||||||||||||||||||||||
AssignBackgroundColor( if myVariable then Color.DARK_RED else Color.WHITE); | ||||||||||||||||||||||
plot myVariable = SimpleMovingAvg("length" = 50)."SMA" is greater than SimpleMovingAvg("length" = 200)."SMA" and close is greater than SimpleMovingAvg("length" = 50)."SMA" and close is greater than SimpleMovingAvg("length" = 200)."SMA"; | ||||||||||||||||||||||
AssignBackgroundColor(if myVariable then color.GREEN else Color.WHITE); | ||||||||||||||||||||||
plot myVariable = SimpleMovingAvg("length" = 50)."SMA" is greater than SimpleMovingAvg("length" = 200)."SMA" and close is less than SimpleMovingAvg("length" = 50)."SMA" and close is less than SimpleMovingAvg("length" = 200)."SMA"; | ||||||||||||||||||||||
AssignBackgroundColor(if myVariable then color.RED else Color.WHITE); | ||||||||||||||||||||||
plot myVariable = SimpleMovingAvg("length" = 50)."SMA" is less than SimpleMovingAvg("length" = 200)."SMA" and close is greater than SimpleMovingAvg("length" = 50)."SMA" and close is less than SimpleMovingAvg("length" = 200)."SMA"; | ||||||||||||||||||||||
AssignBackgroundColor(if myVariable then color.GRAY else Color.WHITE); | ||||||||||||||||||||||
plot myVariable = SimpleMovingAvg("length" = 50)."SMA" is greater than SimpleMovingAvg("length" = 200)."SMA" and close is less than SimpleMovingAvg("length" = 50)."SMA" and close is greater than SimpleMovingAvg("length" = 200)."SMA"; | ||||||||||||||||||||||
AssignBackgroundColor(if myVariable then color.ORANGE else Color.WHITE); | ||||||||||||||||||||||