♥ 0 |
Hello Pete I’ve been trying to convert my two chart labels into watch list columns with no luck..Hopefully you can help….
Thanks for you help… input Show81321Label = yes; DefineGlobalColor(“Bullish”, Color.GREEN); def EMA34High = ExpAverage (high, 34); #was ema1_34 def bullish = (EMA8 > EMA13) and (EMA13 > EMA21); def WaveState = {default SW, Bullish, Bearish}; #SW = sideways def IsBullishWave = WaveState == WaveState.Bullish; AddLabel(Show81321Label, “8:13:21: ” + if Bullish then “Bullish” else if Bearish then “Bearish” else “Slop”, if bullish then GlobalColor(“Bullish”) else if bearish then GlobalColor(“Bearish”) else GlobalColor(“Sideways”)); AddLabel(ShowWaveTrendLabel, “Wave: ” + if IsBullishWave then “Bullish” else if IsBearishWave then “Bearish” else “S/W”, if IsBullishWave then GlobalColor(“Bullish”) else if IsBearishWave then GlobalColor(“Bearish”) else GlobalColor(“Sideways”)); #adding a blank label after as a spacer
Marked as spam
|
Here is how you replace the GlobalColor with regular colors that are supported by the watchlist. Your code:
AddLabel(Show81321Label, "8:13:21: " + if Bullish then "Bullish" else if Bearish then "Bearish" else "Slop", if bullish then GlobalColor("Bullish") else if bearish then GlobalColor("Bearish") else GlobalColor("Sideways"));
Supported code:
AddLabel(Show81321Label, "8:13:21: " + if Bullish then "Bullish" else if Bearish then "Bearish" else "Slop", if bullish then Color.GREEN else if bearish then Color.RED else Color.YELLOW);