RSI overbought or oversold within sepcified days


Category:
0
0

Pete,

I would like to construct a scan that culls out stocks with the highest 4 day RSI in the past 25 days of 80 or greater. Conversely, I would like to find stocks that have a lowest 4 day RSI of less than 20 in the past 25 days.
thank you for your assistance.

-Bill

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on October 20, 2021 8:57 am
197 views
0
Private answer

I updated the title of your question so that it accurately describes the context of your request.

You can build this scan without writing a single line of code using the Condition Wizard. I will demonstrate how you can build the scan for overbought within 25 days and you can work out the flip side of this scan on your own.

First thing to note is that you have requested to run this scan using a 4 Day time frame. You would like the scan to look back a total of 25 days. However if the minimum increment is 4 days we can either look back 24 days or 28 days. We cannot look back 25 days because that would require the use of a daily time frame instead of a 4 day time frame. In my example I will set this to look back 24 days. First we need to convert that 24 day period to the total number of 4 day bars. The math is pretty simple: 24 divided by 4 = 6. So we select the 4 day time frame and have the scan look back 6 bars for overbought or oversold conditions.

Two screenshots below show how this scan is constructed using the Condition Wizard. I have also copied the code that was automatically generated by the Condition Wizard and pasted it below:

RSI()."RSI" is greater than 80 within 6 bars

That's all there is to it.

If you would like to learn how to use the Condition Wizard you will find everything explained in the following video:

https://www.hahn-tech.com/thinkorswim-condition-wizard/

 

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4086)
Answered on October 20, 2021 1:35 pm