This solution plots one label for the selected time frame. User inputs allow you to adjust the time frame and label text as needed. Add the chart study to the chart as many times as you like and set each one to a different time frame:
input timeFrameOne = AggregationPeriod.DAY;
input labelText = "Daily SMI";
input percentDLength = 3;
input percentKLength = 5;
def minLow = lowest(low(period = timeFrameOne), percentKLength);
def maxHigh = highest(high(period = timeFrameOne), percentKLength);
def relDiff = close(period = timeFrameOne) - (maxHigh + minLow)/2;
def diff = maxHigh - minLow;
def avgrel = ExpAverage(ExpAverage(relDiff, percentDLength), percentDLength);
def avgdiff = ExpAverage(ExpAverage(diff, percentDLength), percentDLength);
def smi = if avgdiff != 0 then avgrel / (avgdiff / 2) * 100 else 0;
def avgSMI = ExpAverage(smi, percentDLength);
AddLabel(yes, labelText, if smi >= avgSMI then Color.GREEN else Color.RED);