Thanks for the vote of confidence in my coding... Warranted or not, who can say eh?@Esminiguu I've looked into plotting the highest and lowest values of the RSI() during each pricebar . . . I'm not certain if it can be done. @mashume If you dont mind, could you please look at this? I'd appreciate your thoughts and ideas.
def series_h = if isNaN(close) then HIGH else CLOSE;
def series_l = if isNan(close) then LOW else CLOSE;
plot RSI_H = RSI(price = series_h);
plot RSI_L = RSI(price = series_l);
Hmmm... More thinking... Thinking... I'll get back to you on this one.@mashume I entered the code into the indicator but it appears to be plotting the regular RSI.
declare lower;
def series_h = if isNaN(close[-1]) then HIGH else CLOSE;
def series_l = if isNan(close[-1]) then LOW else CLOSE;
def RSI_H = RSI(price = series_h);
def RSI_L = RSI(price = series_l);
plot RSI_U = RSI_H;
plot RSI_D = RSI_L;
plot RSI_O = RSI();
addLabel(yes, concat("High: ", RSI_H), color.dark_green);
addLabel(yes, concat("RSI: ", RSI_o), color.dark_gray);
addLabel(yes, concat("Low: ", RSI_L), color.dark_red);
def RSI_Pct = if RSI_L != RSI_O then ((RSI_O - RSI_L) / (RSI_H - RSI_L)) * 100 else 0;
addLabel(yes, concat(RSI_Pct, " %"), color.Blue);
Not likely with this method. To calculate the RSI by the standard, we create the data series so that only the current bar is not close. When we move to the next bar, we WANT the value for the past bars to be close, so that we calculate the RSI by the traditional method. I'm not sure how to preserve the values.@mashume Wow that's amazing. This is exactly what I was looking for. Is it possible to show to previous highs and lows too?
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.