How to Use the TOS Scanner

markos

markos

Well-known member
VIP
This video shows how you can use the Stock Hacker in ThinkorSwim with most of the indicators posted on this site. It allows you to scan for new signals on your chart.

In this specific video:
  • I used the RSI 2 indicator as an example
  • The timeframe was the Daily chart
  • Scan within 1 bar (which means the current day)
  • Scan for both up and down signals on the S&P 500 Watchlist

How To Drive The TOS Scanner - (ed by Markos for useThinkScript.com, All rights to TDAmeritrade - ThinkorSwim)

Scan (Please watch the videos located within! Also, Blue Links should all be active)

The features of the Scan tab enable you to filter through tens of thousands of stock, option, futures and forex products available based on your search criteria. The following interfaces are available on this tab: Stock Hacker, Option Hacker, Spread Hacker, Spread Book, and ISE Spread Book. Please continue on to the provided videos in this section for more details.




------------------------------------------
Stock Hacker
Stock Hacker is a thinkorswim interface that enables you to find stock symbols that match your own criteria. Learn how to scan for specific stocks using thinkorswim—then create an alert to stay updated.
Watch the Video: blob:http://tlc.thinkorswim.com/44e07653-2508-4402-8c00-207eb58a34a6How to Use Stock Hacker
  1. Before entering the actual scan criteria, you can narrow your search by using the Scan in drop-down menu on top of the Setup Scan area. This menu enables you to choose among which set of symbols the scan will be performed. You can select your personal or a public watchlist, a certain category (e.g., All Stocks, All Indices, All Futures), a preset scan list, or a GICS industry list. You can narrow the search even further by selecting a different subset from the Intersect with drop-down menu so the scan will only be performed among symbols that belong to both subsets. (Save yourself potential headache, scan in S&P 500 when setting up)


2. Scan filters by clicking on the buttons:
  • Add filter for stock to add a scan criterion based on stock metrics, e.g., net change, percent change, bid/ask prices, etc.
  • Add filter for options to add a scan criterion based on option metrics, e.g., Greeks, intrinsic/extrinsic values, probabilities, etc.
  • Add study filter to add a scan criterion based on study values, including your own thinkScript-based calculations. Learn more: Study Filters in Stock Hacker.
  • Add fundamental filter to add a scan criterion based on corporate data.
  • Add pattern filter add a scan criterion based on occurrence of selected classical patterns in the price action of a stock symbol.
3. The filters will be stacked in the Filters area with default parameters. You can use up to 25 filters in a single scan and only one pattern filter is allowed. To remove a filter, click X on its right.


4. Adjust your scan criteria by using the controls in each filter. For example, select a different parameter to perform the scan with or edit the desirable range of parameter values. The latter can be done by either selecting the minimum and the maximum values of the range in the corresponding boxes or by dragging the brackets in the pre-scan diagram. The diagram illustrates how many results there are for each of the micro-ranges that constitute the specified range. The total number of matches is displayed live on the right.
Note that even though each filter may display a certain number of matches in pre-scan, the actual scan may return no results, as the stock (option) needs to match all the specified criteria. Pre-scan matches are currently unavailable for pattern filters.


##For your own sake, skip #5 and #8 because Patterns is for CMT’s and Chart Readers etc. as they know exactly the result of what they are looking for/at in a Pattern. In otherwords, if you don't already know patterns, you'll probably get hung up on that instead of just trading. It could become a can of proverbial worms as well as take you off your game. (imo ed. ms)##

5. To adjust a pattern filter:
  • Select patterns you would like to perform the scan for. More info on available patterns: Classic Patterns.
  • Click Edit... to modify sensitivity and parameters of the selected patterns. To learn more about sensitivity and parameters of classical patterns, see Using Classic Patterns.
  • Specify the time frame on which the patterns are to be looked for.
6. Adjust your preferences for result output: how many results to show, whether to display stocks, options, or both, which column to sort by and in which order. (Lot's of good stuff when you click on the TINY sprocket below the scan button,)

7. Click Scan. The results will be displayed in a watchlist-like form (and you can actually save them as a watchlist by clicking the Show actions menu button and selecting Save as Watchlist…). Virtually all operations available in watchlists are also available in the search results: you can add or remove columns, adjust sorting, add orders, create alerts, etc.

If there is a pattern filter in the scan setup, the results include symbols that have at least one occurrence of any of the specified patterns on the specified time frame. The results of pattern filter scans are updated hourly.

8. If your scan for patterns returns any symbols, a new column Patterns will be added to the Search Results. Clicking on the 'pattern' icon in this column opens a detached chart of the corresponding symbol with the same time-frame as specified in the pattern filter setup. Found patterns will be highlighted on this chart.



9. Consider saving your scan query for further use. To save your query, click on the Show actions menu button next to Sizzle Index and select Save scan query… Enter the query name (with date) and click Save. To load a saved query, click Show actions menu, select Load scan query and choose the desirable one from the list.

10. Scan results are dynamically updated (Approx. every 3 minutes). If you would like to be notified of changes in the results, consider adding an alert on the changes. To add an alert:
  • Click on the Show actions menu button and select Alert when scan results change…
  • In the dialog window, specify which events you prefer to be notified of (e.g., when there is a new symbol that matches the criteria or a symbol that no longer matches them) and the scan query to be monitored.
  • Specify the frequency options: whether you would like the system to notify you of every change in the results or send you a list of changes on an hourly, daily, or weekly basis.
  • Click Create. The alert will be added to your Alert book.
-------------------------------------------

Sizzle Index

Sizzle Index
is a thinkorswim feature that allows you to find stock symbols that currently see an increase in the number of options traded compared to the last five days’ average. It is calculated as the ratio of the current total volume of put and call options to the arithmetic mean of daily put and call volumes over the last five days. Individual call and put Sizzle Index values are also calculated and available as watchlist columns.

The Sizzle Index feature is essentially a Stock Hacker scan template that returns ten stock symbols with highest Sizzle Index values and, by default, have market capitalization of at least 35 million dollars, volume of at least 100,000 shares, and last price of at least five dollars. These default values can be modified in the Stock Hacker interface.

Watch the Video : blob:http://tlc.thinkorswim.com/cd4ef417-8d52-483a-8b1d-654f1abcff59

How to Use Sizzle Index
  1. Click the Scan tab and choose Stock Hacker from the sub-tab row. Click the Sizzle Index button on the right of the Stock Hacker header. This will load the Top 10 Sizzling Stocks scan template.
  2. By default, three stock scan filters are added in the template: minimum last price, minimum volume, and minimum market capitalization. If necessary, modify these filters. The total number of matches is displayed live on the right. Note that even though each filter may display a certain number of matches in pre-scan, the actual scan may return no results, as the stock needs to match all the specified criteria.
  3. If necessary, add more filters to the scan by clicking the buttons on above the filters area. You can use up to 25 filters in a single scan and only one pattern filter is allowed. To remove a filter, click X on its right.
  4. Click Scan. The results will be displayed in a watchlist-like form (and you can actually save them as a watchlist by clicking the Show actions menu button and selecting Save as Watchlist...). Virtually all operations available in watchlists are also available in the search results: you can add or remove columns, adjust sorting, add orders, create alerts, etc.
  5. Consider saving your scan query for further use. To save your query, click on the Show actions menu button next to Sizzle Index and select Save scan query... Enter the query name and click Save.
  6. Scan results are dynamically updated.If you would like to be notified of changes in the results, consider adding an alert on the changes. To add an alert:
    • Click on the Show actions menu button and select Alert when scan results change...
    • In the dialog window, specify which events you prefer to be notified of (e.g., when there is a new symbol that matches the criteria or a symbol that no longer matches them) and the scan query to be monitored.
    • Specify the frequency options: whether you would like the system to notify you of every change in the results or send you a list of changes on an hourly, daily, or weekly basis.
    • Click Create. The alert will be added to your Alert book.
-----------------------------------------------

STOCKSIZZLE (This portion is not original to http://tlc.thinkorswim.com/center/howToTos/thinkManual/Scan/Stock-Hacker/Sizzle-Index.html ed. ms)

StockSizzle is a “Study” that can be added as a column by clicking the little gear at the end of an scans’ description column. Study is in quotations because it is not documented very well, even though it is there, and I use it.


Once loaded, click on the little scroll to the left of its name and you should find customizations. By default, StockSizzle shows up an ever-darker green the higher the volume is from the parameters you set.

---------------------------------------------

Study Filters

The Stock Hacker Scanning Tool allows you to search for symbols meeting certain criteria. Study filters are criteria based on study values: adding one or several study filters will help you narrow the search range when looking for symbols. You can use up to 25 filters to scan the market.

How to Find It:

1. Click the Scan tab and choose Stock Hacker from the sub-tab row.



2. Click the Add Study Filter button. A new filter editor will appear.



3. The first field of the editor allows you to choose a custom or pre-defined study to filter the results. Choose the desirable study and adjust input parameters.



4. Click Scan . Search results will be shown in the watchlist form below the Filters section.

5. If pre-defined study filters are not enough for your scan, you can create custom study filters. To do so, choose Custom from the study list. This will open the Scanner Custom Filter editor window.

In Scanner Custom Filter, you can either use Condition Wizard, an interface that is operated by human-readable expressions, or thinkScript Editor, an interface for creation of thinkScript-based studies.

Example

Consider the following script:

close > expaverage(close, 60) and ADX(length = 14) > 18

This condition is used in the Volume Zone Oscillator study; it checks whether the price is above the 60 period EMA and 14 period ADX value is higher than 18, which could possibly mean that the market is in strong uptrend. Click OK save the filter and then press Scan to display all symbols meeting this criterion.

You can also use plot values in Study Filters:

def SMA = Average(close, 15);

plot condition = close[2] > SMA[2] and close[1] < SMA[1] and close < SMA;

This example script searches for symbols which were above simple moving average two days ago, but have fallen below since then.

Note that search criteria can be adjusted by pressing the "pencil" icon in the filter. To delete a filter, click X.


Note also that search results are displayed in the watchlist form, which means that you can display custom quotes along with standard values. For more information on that, refer to the Custom Quotes article.

Specific Usage

When in Stock Hacker, thinkScript® usage is somewhat different from that in studies and strategies. Here is the list of peculiarities:
  • Secondary aggregation is not allowed; (Huh? Well, look it up! :))
  • Scripts using standard thinkScript® syntax must have exactly one plot; (Look me up too! :D )
  • Scripts using intraday aggregation include extended session data in calculations. (Attn: Day Traders)
Data Limitations

Data used in study filters is limited in terms of time period. These limitations depend on the aggregation period:

Data typeAggregation periodsData limit (in astronomical days)
MinFrom 1 min to 30 min15
HourlyFrom 1 hour to 4 hours270
DailyFrom 1 day to 1 month (including OptXp)730

Further study can be found at the link below (ed. ms)

http://tlc.thinkorswim.com/center/howToTos/thinkManual/Scan/Stock-Hacker.html

End of Tutorial
 
Last edited by a moderator:
markos

markos

Well-known member
VIP
#Mobius for Marshall ed by Markos TSL 11:15am 1-2-18
1. Use the Scan Wizard
2. Select Add Study Filter
3. Click the pencil next to "D" on the right side
4. Delete Study
5. Add Condition
6. Add Study
7. Scroll to DIPlus (or your study) and add
8. Center Column click Greater Than (or your study)
9. Right Side Click Add Study
10. Scroll to DIPlus (or your study)and click Offset1 (or your condition)
11. Set Aggregation Period
12. Select the Scan In List
13. Select the Intersect with List
14. Scan
 
T

tomsk

Well-known member
VIP
Just to be sure that EVERYONE understands how to interpret this, at the end of the scan there is a section of code like so:

# Comment out (#) the ONE not needed
plot BullScan = close crosses above SHigh;
#plot BearScan = close crosses below SLow;

Notice that there are some lines that are commented out with (#) - Those would be ignored by the scanner, only for human consumption
In the above example only the bullish scan is enabled.

In order to turn this into a bearish scan, just switch the commented lines like so

# Comment out (#) the ONE not needed
#plot BullScan = close crosses above SHigh;
plot BearScan = close crosses below SLow;

Compare those differences - it really is that simple.

Just REMEMBER that there can only be one active plot defined or the scanner would complain
 
Last edited by a moderator:
H

HighBredCloud

Active member
VIP
@BenTen Yeah...perhaps you're right...I did read about it repainting. I just wanted to know that I was able to input everything correctly into the scan as I have never done this before. ANYWAYS...do you know of ANY good scans such as % gainers and losers but ones that show up practically at opening bell...and not hit later on such as 15 to 20 min into the market open such as the % gainers/losers found in default TOS scan... I guess what I am looking for is stocks that are going either up or down premarket and continue on that trend once opening bell rings. Would the HULL scan be more suitable for such a scan or are there better scans out there that I am not aware of? I
 
T

tomsk

Well-known member
VIP
In the past several years I have seen several versions of premarket gap up and gap down scans that Mobius had posted. You might like to check out the OneNote archive that @markos posted before. I'm almost positive it is archived there.
 
H

HighBredCloud

Active member
VIP
@tomsk I will look for them...Thanks for the suggestion. Would I import them the same way as this particular scan and under conditions also select "True" as BenTen suggested? Sorry for all the questions...I never used custom scans before...only ones I set that met my criteria...
 
T

tomsk

Well-known member
VIP
You will find that all the scans that Mobius writes are simple and effective and undoubtedly produce results. Hence you will not need to reference them as a separate study but import it directly into the scanner. Since you're new to scans, you might like to read up this great tutorial that @markos wrote.
 
H

HighBredCloud

Active member
VIP
@markos Not sure if you want to talk about the following here or if it would be better to make a separate post...but after reading the ONEDRIVE...I think it would be important to include and touch upon the differences between the LAST price vs CLOSE price when scanning as well as VOLUME vs AVG VOLUME...Something to note would also be what is best setting is as far as periods go...default is set to 50 SMA...

As far as the custom scans that were developed by many here. I think it would be nice to clarify if it's better to run the scan as a study as shown in the video or simply imported the study using the ThinkScript as suggested by some coders...It can be a bit confusing for a new user to the scanner especially with what conditions need to be added for the scans to work properly.
 
M

mmm777

New member
2019 Donor
in scan ,it is possible to set up condition like scan stock in spy (the stocks in ETF spy or stocks in ETF iwm).
 
BenTen

BenTen

Administrative
Staff
VIP
@mmm777 You can choose the S&P 500 Watchlist that ThinkorSwim provided and it should let you scan for stocks in the SPY.
 
H

HighBredCloud

Active member
VIP
I have been looking for a Hull Moving Average scanner and I have found this scan on here below: I was told that in order to use this scanner I first need to save it as a study then open it as custom then study and edit condition to (is true) (within 1 bar). Please see the pic below:


When I called TOS I was told that because this is a moving average study I need to use (cross below) for a bear scan and or (cross above) for a bull scan under the edit conditions. Also I need to set the other conditions to as follows...Please see pic below:


So which is right? setting the edit condition to true or setting the conditions to cross below or above depending on bull or bear scan as per TOS instructions.

Not to further complicate things...but TOS also has their own Hull Average Change option under Study ---> Price Performance ---> Hull_Average_Change. Please see pic below:


The weird part about all this is when I run the custom scan under the same parameters such as 15 length 1 hour scan...I get different results between the Hull Average Change TOS scanner vs the Hull Moving Average Scan that I found here...Please see pic below: Why is that IF all parameters are the same?


Lastly...I heard and or experienced that when scanning for moving average cross overs not so much a Hull Moving Average scan...that the results can be delayed anywhere from 2-3 bars depending on the timeframe. Meaning that if you select a 1 hour time frame...such a delay can be 2-3 hours...Is this true? If so do I need to scan lets say on a 15 min timeframe to get the results desired for a 1 hour time frame? I thought that such results would be in real time or with a 3 min delay as per TOS scanner updates once the condition of Hull Moving Average were met on a 1 hour timeframe...

Perhaps I am doing something wrong here...anyone with experience can you please clarify this? I have read over the section that @markos wrote on the scanner...but none of these questions pertain to what I am experiencing here. Thanks in advance.

Code:
# Basic Hull Ma Pack tinkered by InSilico
# Original Port from https://www.tradingview.com/script/hg92pFwS-Hull-Suite

input modeSwitch = {default "Hma", "Thma", "Ehma"}; #Hull Variation
input length = 55; #Length(180-200 for floating S/R , 55 for swing entry)
input src = close; #Source

def hma;
switch (modeSwitch) {
case "Hma":
    hma = wma(2 * wma(src, length / 2) - wma(src, length), round(sqrt(length)));
case "Ehma":
    hma = expAverage(2 * expAverage(src, length / 2) - expAverage(src, length), round(sqrt(length)));
case "Thma":
    hma = wma(wma(src,(length/2) / 3) * 3 - wma(src, (length/2) / 2) - wma(src, (length/2)), (length/2));
}

def hull = hma;
def transition = hull > hull[2];

# Delete (#) the plot not needed

#plot scanBull = !transition[1] and transition;
plot scanBear = transition[1] and !transition;

# End Basic Hull Ma Pack Scan
 
BenTen

BenTen

Administrative
Staff
VIP
You should use the "True" statement when there is an arrow or an indication on the chart. For example, if there is a function in the code that plot an arrow every time the price crosses above or below the moving average, then in the Scanner, you would want to use the "True" option. If there isn't such a thing, you will have to use "crosses," "crosses above," or "crosses below" in the Scanner.

Looking at the source code, it already include the scan snippet for you.

As far as delay time, it's between 5-10 mins; it doesn't matter which timeframe you're using.
 
BenTen

BenTen

Administrative
Staff
VIP
@jvbaty The indicator is based on ZigZag so it will surely repaint. I suspect that you would need to adjust the lookback period to minimum 2 bars (I'm talking about the within X bars in the Scanner section).
 
BenTen

BenTen

Administrative
Staff
VIP
@jvbaty The easiest way to figure out whether your scan works or not is by setting the aggregation timeframe to Daily and lookback period to 10. That's how I usually check.
 
BenTen

BenTen

Administrative
Staff
VIP
@jvbaty Within the last 10 candles (if you set the aggregation period to Day then that equates to within the last 10 trading days). Now, that's not how I usually scan for things. That was just an example.
 
M

mcfaul100

New member
Does anyone know how to run a Zig Zag step pattern scan in think or swim? I haven't been able to do so myself. It always timesout. thanks
 
BenTen

BenTen

Administrative
Staff
VIP
@mcfaul100 The pattern will repaint so you would have to adjust the "within X bar" to the value of 2 or more.
 
M

mcfaul100

New member
I'm sorry but I'm not very good with this stuff. What do you mean adjust within the x bar? Thank you
 
Top