Need help plotting RSI along with the price

venus360

New member
Need help plotting RSI along with the price in the same window... Even if you help me find pieces of code, I may be able to string them together. I am new to thinkscript but I have done some programming.

I was first wondering if it possible. The reason I want to plot it along with the price is to see the divergence more clearly.
  • I don't care at all about the overbought or oversold.
  • I would like to use Weighted average of the past X time periods
  • SumGain = sum of points gained on the past X up periods
  • SumLoss = sum of points lost on the past down periods
  • RS = SumGain / SumLoss
  • I want to plot the RSI = 100 - [100(1+RS)]
Thanks a lot.
 
Last edited:

korygill

Active member
VIP
How would this draw/scale if plotted in same window as price? Wont this RSI be 0 to 100? That wont look very good I am thinking on say Tesla at 400. Your price plot will get squished. Maybe I am not understanding how you envision this working.
 

venus360

New member
I have seen it on another traders charting program. It may have been a custom indicator.

I agree the chart will be busy, but I want to use it for end of day review. If plotting in the same window is not a priority, is there any indicator / script available that I can tweak?

Thank you.

Screenshot is here. In this chart , price, rsi, and moving averages are also included.

p3SEeN2.png
 
Last edited:

horserider

Well-known member
VIP
Agree with Kory. You will need to solve scaling problem to plot RSI along with moving averages.

Are you plotting the RSI or this and calling it RSI "I want to plot the RSI = 100 - [100(1+RS)] " ?
 

korygill

Active member
VIP
ok, i see. you want to use primary and secondary axis. you can just do this in TOS with no special code. add RSI to Upper plot area (price) and select secondary axis (left axis).
 
Top