How To: Scanning for an ATR Trailing Stop Crossover

Scanning for the price cross of the ATR Trailing Stop indicator has become very popular of late. No doubt this is a result of  Chris Brecher’s amazing prowess with the indicator.

The scan for the cross is fairly basic. First, you will need to go to the thinkorswim Scan tab and open the Stock Hacker. By default, there are several scan parameters already pre-configured that you may want to remove by clicking the x at the far right. The next step is to click the button for “Add study filter” as shown below.

By default, you will see ADXCrossover. Click the dropdown and select “CUSTOM”. This will bring up the Scanner Custom Filter dialog. Select the thinkScript editor tab and delete the ADXCrossover code from the window. Type the following into the script editor:

close > ATRTrailingStop()


close[1] <= ATRTrailingStop()[1]

This is the basic bullish ATR Trailing Stop Crossover scan. If you wish to modify the default parameters of the ATR Trailing Stop, click inside the “ATRTrailingStop()” text in the editor and then you will see its parameters shown in the Inspector. Note that if you don’t see the Inspector you may need to click it in the upper right. You will see any changes appear in the script window.

Finally, choose your desired aggregation period for the scan and click OK. The daily is shown here. I’ll leave it to you to create the bearish crossover scan…Hint: Just reverse the < and > signs.


Eric Purdy

Eric Purdy ThinkScript Expert

Eric spent the better part of his adult life turning dead dinosaurs into loud noise as a fighter pilot in the US Navy. Commander Purdy’s twenty year career included tours as a flight instructor, teaching university physics and ethics at the US Naval Academy, and multiple combat deployments in the F/A-18 Hornet.

1 thought on “How To: Scanning for an ATR Trailing Stop Crossover

Comments are closed.