Skip to main content
Top Hat Scan in TOS

Code / script to use in the stock hacker in ThinkOrSwim to scan for Top or Bottom Hats

Duncan Boggs avatar
Written by Duncan Boggs
Updated over 2 years ago

 

Scan script

See below script that can be used to make a custom scan filter in the TOS Stock or Options Hacker.
​ 
​  

You will need to have the Top Hat Scan indicator helper file installed into TOS to run the scripts below. If you need the Top Hat Scan study file, please email support. 

 
​ 
Video tutorial on setting up the Top Hat scans.


 
Scanning for the TopHat in Thinkorswim

Create three scan filters for the timeframes you would like to set the TopHat scan. For instance, the default time frames for the Top Hat indicator are month, week and day.

 
​  

Top Hat scans to use with TOS:

# Top Hat Scan
ST_TopHatScan().TopHat

or

#Bottom Hat Scan
ST_TopHatScan().BottomHat

 
​ 
Make sure you using only one of the above scans per filter. 

 

  

 
​     

 
Create a custom scan filter in TOS

https://intercom.help/simpler-trading/en/articles/3619367

TOS - Setting up scan criteria in the Stock or Option Hacker in Thinkorswim
https://intercom.help/simpler-trading/en/articles/3575220

Compound Breakout Tool scans to use in TOS
https://intercom.help/simpler-trading/en/articles/3620642

How do I save and find a shared scan in TOS
https://intercom.help/simpler-trading/en/articles/3348299

Credit Sniper scans to use in TOS
https://intercom.help/simpler-trading/en/articles/3620608
​ 
​ 
​ 
​ 
​ 
​ 
​ 

Did this answer your question?