I use the following code to display a label on my chart of the volume for the past 5 minutes. What would be the correct coding to add to the existing code to display a different color based on the following amount of Volume for the past 5 mins?
Display Color.LIGHT_GRAY if the 5 Min Volume between 1-20,000
Display (Color LIGHT_ORANGE if the 5 Min Volume between 20,001 to 40,000
Display Color.YELLOW if the 5 Min Volume between 40,001+
CURRENT CODE https://tos.mx/lcPQWf4
def volAgg = if GetAggregationPeriod() < AggregationPeriod.FIVE_MIN then AggregationPeriod.FIVE_MIN else GetAggregationPeriod();
def TodaysVolume = volume("period" = volAgg);
AddLabel(yes, " 5-Min Volume: " + TodaysVolume + " ", Color.GRAY);
Display Color.LIGHT_GRAY if the 5 Min Volume between 1-20,000
Display (Color LIGHT_ORANGE if the 5 Min Volume between 20,001 to 40,000
Display Color.YELLOW if the 5 Min Volume between 40,001+
CURRENT CODE https://tos.mx/lcPQWf4
def volAgg = if GetAggregationPeriod() < AggregationPeriod.FIVE_MIN then AggregationPeriod.FIVE_MIN else GetAggregationPeriod();
def TodaysVolume = volume("period" = volAgg);
AddLabel(yes, " 5-Min Volume: " + TodaysVolume + " ", Color.GRAY);