How to find stocks with weekly options in a trading range on TOS

Brooks

New member
I can do a scan and see there are ~600 stocks with weekly options.

I want to find the ones that have been in a trading range (i.e. sideways price movement) for about 3 months.

Any ideas on doing this either with one or more TOS studies or with thinkscript?

Thanks!
 
Check out this think script by mobius
It came up with CSX
Only problem I see is stocks with narrow trading range have low volatility so not much premium available if that is what you are looking for
Thanks for your post and asking on reddit. You're right, of course, with lower volatility the premiums will be lower.

I did later find a TOS study called Near_High_Lows which is providing the scan I was looking for. I am going to look into the TTM Sqeeze suggested.
 
I found a near high thinkscript not sure if it's the same but it looks good I had AXP ,ABT and a few others in the result
 
I found a near high thinkscript not sure if it's the same but it looks good I had AXP ,ABT and a few others in the result
Sounds like the right one. I looked into the TTM Squeeze and it looks like the opposite of my objective. It finds symbols about to break out of their channels. It is an interesting indicator though.
 
I believe that is the objective of the TTM Squeeze so after a period of consolidation it breaks out either to the upside or the downside
 
@Brooks: I don't know precisely how you wish to define (within a range). I just hacked a quick Custom study, (Custom studies can be used in the sorting of TOS Scans) to look for %change in prior 90 bars (days) and fix a threshold (set to 10% here, that you can alter) that will effectively discard by returning a zero for those over that threshold (an attempt at what you may want for range) and provide higher weighting to lower percent changes. -- I used "Custom 1" see below:
# Brooks response for a custom thinkscript to aid in quantifying sideways movementPercent of stocks over LookBack bars(days)
# Must insure aggregation is set to days for bar to == days.
input LookBack=90; # Days
input PercentLimit=10;
def highest=highest(high,LookBack);
def lowest=lowest(low,LookBack);
def range=highest-lowest;
def lineinsand=highest-range/2; # pick mid point
def movementPercent=100*(range/2)/lineinsand; # How much movementPercent
plot Weighting=if (movementPercent>PercentLimit) then 0 else PercentLimit-movementPercent;

Pic of a scan setup:
 

Attachments

  • custom for scan.PNG
    custom for scan.PNG
    164.2 KB · Views: 4
Hats off to you, Gary, writing thinkscript to do this. I found someone who knew how to do this with a study called Near_High_Lows. Attached is the saved study and results. I think its 2 different ways that both work to solve the problem.
 

Attachments

Top
Contact Us