Hello, I'm looking for some help with a VWOP AddLabel indicator that will change colors once outside the bands. I have duplicated the original VWAP code and built on this from another script that was working similarly. However, I have messed something up. Help please. Thank you.
VWAP.SetDefaultColor(GetColor(0)); UpperBand.SetDefaultColor(GetColor(2)); LowerBand.SetDefaultColor(GetColor(4)); # My piecemeal code begins here # def VWAP_Above_Upper = if price + numDevUp * deviation > UpperBand then 1 else 0; def VWAP_Below_Lower = if price + numDevUp * deviation < LowerBand then 1 else 0; def VWAP_Between = If price >= VWAP_Above_Upper and price <= VWAP_Below_Lower then 1 else 0; AddLabel(VWAP_Above_Upper, "VWAP HI:" + price + numDevUp * deviation , COLOR. RED); AddLabel(VWAP_Below_Lower,"VWAP LO:" + price + numDevUp * deviation, COLOR. LIGHT_RED); AddLabel(VWAP_Between,"VWAP IN:" + price + numDevUp * deviation, COLOR. GREEN);