Is there a easy way to check for high of day value of RSI indicators and print a popup (or anything else) on the graph like in the image joint.
in thinkorswim the code was:
def daychange = GetDay() != GetDay()[1];
plot gettoday = GetDay() == 2;
def RSI_high = CompoundValue(1, if daychange then RSI else if RSI >= RSI_high[1] then RSI else RSI_high[1], RSI);
def RSI_low = CompoundValue(1, if daychange then RSI else if RSI <= RSI_low[1] then RSI else RSI_low[1], RSI);
plot RSI_highest1 = HighestAll(if GetDayOfWeek(GetYYYYMMDD()) == 1 then RSI_high else 0);
def RSI_highest2 = HighestAll(if GetDayOfWeek(GetYYYYMMDD()) == 2 then RSI_high else 0);
def RSI_highest3 = HighestAll(if GetDayOfWeek(GetYYYYMMDD()) == 3 then RSI_high else 0);
def RSI_highest4 = HighestAll(if GetDayOfWeek(GetYYYYMMDD()) == 4 then RSI_high else 0);
def RSI_highest5 = HighestAll(if GetDayOfWeek(GetYYYYMMDD()) == 5 then RSI_high else 0);
def RSI_lowest1 = LowestAll(if GetDayOfWeek(GetYYYYMMDD()) == 1 then RSI_low else 500);
def RSI_lowest2 = LowestAll(if GetDayOfWeek(GetYYYYMMDD()) == 2 then RSI_low else 500);
def RSI_lowest3 = LowestAll(if GetDayOfWeek(GetYYYYMMDD()) == 3 then RSI_low else 500);
def RSI_lowest4 = LowestAll(if GetDayOfWeek(GetYYYYMMDD()) == 4 then RSI_low else 500);
def RSI_lowest5 = LowestAll(if GetDayOfWeek(GetYYYYMMDD()) == 5 then RSI_low else 500);
AddChartBubble(RSI == RSI_highest1 or
RSI == RSI_highest2 or
RSI == RSI_highest3 or
RSI == RSI_highest4 or
RSI == RSI_highest5, high, "RSI: " + RSI, Color.RED, yes);
AddChartBubble(RSI == RSI_lowest1 or
RSI == RSI_lowest2 or
RSI == RSI_lowest3 or
RSI == RSI_lowest4 or
RSI == RSI_lowest5, low, "RSI: " + RSI, Color.GREEN, yes);
Comment