Skip to main content
All CollectionsTrading PlatformsHow-To_Trading Platform
Scan in TOS - Make a scanner custom filter from a study using the condition wizard
Scan in TOS - Make a scanner custom filter from a study using the condition wizard

Set up a search in the ThinkorSwim Stock Hacker using the condition wizard and an indicator.

Duncan Boggs avatar
Written by Duncan Boggs
Updated over a week ago

 

Custom Study Filter

 
​ 
​ 
Some studies can be used in the Stock Hacker without writing custom Thinkscript.
These are normally studies that are less complex, we will use the Simple Moving Average study built into TOS as an example. 

More complex studies like the Squeeze require custom Thinkscript to run a scan. 

Very complex studies like Ready Aim Fire require custom helper files for the Thinkscript to reference.
​ 
​  

 

Creating a custom filter from an indicator:

 
​ 

1.   In the Stock hacker, click on Add Filter. Choose Study from the drop-down menu. 

 
​ 

2.   From the Study drop-down menu, choose Custom...  

 
​ 
3.  Choose a time frame you want to scan from the Aggregation menu. 

 

 
4.  Un-check the "Include Extended-Hours Trading session" checkbox if you don't want to include after-hours trading.
Normally, un-check for stocks / options. 

 
​ 
5.  Choose a condition to check for. In this case we are looking for price to cross a moving average. 

 
​ 
6.  Choose a function of price. In this example, we're wanting the price to close across our moving average study. 

 
​ 
7.  Choose how the left side condition will interact with the right side condition.
In this case, we are wanting the close of price to cross a moving average. 

 
​ 

8.  On the right side condition, choose the Simple Moving Average study or SimpleMovingAvg.

 
​ 
9.  Set the parameters. Here we are going to use a 21 period SMA and keep it within 1 bar so we get an alert as soon as it happens. 

 
​ 
10.  Click OK.
Now you are ready to scan for the close of price on a one hour chart that crosses the 21 period simple moving average.  

 
​ 

Create more complex scans by combining filters. 

 

For example, create an additional study filter for the 34 period SMA but use the study conditions to exclude tickers those tickers from the search.
​ 
Now your scan will produce results where price crosses the 21 SMA but not the 34 SMA. 

 
​ 
In the above scan, the first ticker result is AA and in this screenshot we see that price is between the 21 and 34 SMAs. 

 
​ 
Any number of combinations of study filters can be combined to product a limitless variety of scans in the stock hacker. 

 
​ 
​ 
In the below video this process using the condition wizard shows how to create an alert from an indicator on a chart.  

 
​ 
​ 
​ 

 
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

Squeeze Pro Scans in TOS
https://intercom.help/simpler-trading/en/articles/5595764
​ 
​ 
​ 


Did this answer your question?