Sample Scans

Sample Scans

On this page, we have a collection of simple scans that everyone should study and understand before trying to create more complicated scans. Most larger scans are created by combining elements of these scans together is various ways. For more advanced scans, please see the other sections of our Advanced Scan Library.

Note: For the sake of brevity, we are only adding “[type=stock]” to the beginning of each of these sample scans. In your own scans, you will want to narrow down your scan universe far more than just this one clause. Here are a few examples of commonly-used clauses that you may want to add to define your scan universe:

and [country = us]   (or 'canada' or 'uk' or 'india' )
and [exchange = nyse]   (or 'nasdaq' or 'tse' or 'lse' or 'nse')
and [SMA(20,close)> 1.00]  (or a price threshold to suit you)
and [SMA(20,volume)> 100000]  (or a volume threshold to suit you)
and [group is etf]  (or 'dow30' or 'sp500')
and [optionable is true]  (limit to stocks that trade options)

Learn More: Planning Scans | Writing Scans | Scan Syntax Reference

StockCharts.com makes no claims about the effectiveness of these scans for trading purposes. These scans should only be used for educational purposes; they are intended to help you to develop your own personal trading strategy.



Scans for Conditions and Signals

Crossover Scans

Crossovers are one of the most popular signals to use in scans. Here are several examples of crossover scans, along with one “near cross” where the price comes close to crossing over its moving average, but doesn't quite get there.

Learn More: Writing Crossover Scans | Scanning for "Near Crosses"


The Bullish "Golden Cross"

This scan finds all stocks where the 50-day simple moving average just moved from below the 200-day simple moving average to above the 200-day simple moving average:

[type = stock]
and [today's daily SMA(50) x today's daily SMA(200)]

Note: The “x” is the “crosses above” comparison operator. It means that the first expression was below the second expression 1 period ago and is now above the second expression.


The Bearish "Death Cross"

This scan finds all stocks where the 50-day simple moving average just moved from above the 200-day simple moving average to below the 200-day simple moving average:

[type = stock]
and [today's daily SMA(200) x today's daily SMA(50)]

Note: To create a “crosses below” scan, simply reverse the position of the expressions in a “crosses above” scan.


The Bullish MACD Signal Cross

This scan finds all stocks where today's MACD Line just moved above the MACD Signal Line:

[type = stock]
and [MACD Line(12,26,9) x MACD Signal(12,26,9)]

Note: Using “today's” is optional. Similarly, “daily” is only really required if you are mixing daily, weekly or monthly criteria.


RSI Crossing Above 70

This scan finds all stocks where today's RSI just moved above the 70 threshold:

[type = stock] 
and [RSI(14) x 70]

Note: The “x” comparison operator works with constants.


RSI Crossing Below 30

This scan finds all stocks where today's RSI just moved below the 30 threshold:

[type = stock] 
and [30 x RSI(14)]

Note: It looks a little strange when you use a constant, but, again, to create a “crosses below” clause, use the “crosses above” comparison operator with the expressions reversed.


Short-Term EMA Crossover

This scan finds all stocks where the three-day exponential moving average just moved above the 13-day exponential moving average:

[type = stock] 
and [ema(3,close) x ema(13,close)]

Note: Make sure your scan parameters match your trading timeframe. If you want to capture the very beginning of an uptrend, longer-term EMAs won't work, as it takes several days to turn them; by then, the trend will already be well underway. Use shorter-term EMAs, such as a 3-day crossing a 13-day, to get in early.


Early Crossover

This scan finds all stocks where the price just moved above the 13-day exponential moving average, while the EMA is still falling:

[type = stock] 
and [close x ema(13,close)] 
and [ema(13,close) < 5 days ago ema(13,close)]

Note: This scan can notify you of a possible trend change even before the EMA has started turning around. However, this should be used in conjunction with other clauses to help confirm that a trend change is actually imminent.


"Near Cross" of 50-day SMA

This scan finds all stocks where the price came within 2% above or below the 50-day simple moving average, but didn't necessarily cross over it:

[type = stock] 
and [close >= sma(50,close)*0.98]
and [close <= sma(50,close)*1.02]


Consolidation and Breakout Scans

Breakouts are also popular signals to use in scans; you may wish to scan for stocks that have been consolidating and are now breaking out. Here are several examples of consolidation and breakout scans.

Learn More: Scanning for Consolidation and Breakouts


Stocks Trading in a Narrow Range Over Last Two Weeks

This scan finds stocks that closed within 2% above or below the average closing price of the last two weeks are most likely consolidating.

[type = stock]
and [today's close < today's SMA(10,close) * 1.02]
and [today's close > today's SMA(10,close) * 0.98]

Note: To see if something is less than 2% above the average, compare it to the average multiplied by 1.02 (a.k.a. 1.00 + 2%). To see if something is less than 2% below the average, compare it to the average multiplied by 0.98 (a.k.a. 1.00 - 2%). You can adjust the “1.02”, “10” and “0.98” to meet your specific investing goals.


Stocks Moving Sharply Higher on Large Volume

This scan finds stocks that closed more than 15% above their previous close with volume more than 4 times the 20-day average of volume:

[type = stock]
and [today's close > yesterday's close * 1.15]
and [today's volume > yesterday's SMA(20,volume) * 4]

Note: To see if something moved 15% higher, compare it to yesterday's value multiplied by 1.15 (a.k.a. 1.00 + 15%). You can adjust the “1.15”, “20” and “4” to meet your specific investing goals.


Stocks Moving Sharply Lower on Large Volume

This scan finds stocks that closed more than 15% below their previous close with volume more than 4 times the 20-day average of volume.

[type = stock]
and [today's close < yesterday's close * 0.85]
and [today's volume > yesterday's SMA(20,volume) * 4]

Note: To see if something moved 15% lower, compare it to yesterday's value multiplied by 0.85 (a.k.a. 1.00 - 15%). Use the * operator for multiplication (not 'x'!). You can adjust the “0.85”, “20” and “4” to meet your specific investing goals.


Stocks Moving Sharply Higher on Large Volume after Moving Sideways

This scan finds stocks that closed more than 10% above their previous close after moving sideways for at least 10 days with volume more than 4 times the 20-day average of volume. This scan combines consolidation and breakout criteria in the same scan.

[type = stock]
and [today's close > yesterday's close * 1.10]
and [today's volume > yesterday's SMA(20, volume) * 4]
and [yesterday's max(10, high) < yesterday's min(10, low) * 1.02]

Note: Because this scan is more restrictive, we're using a smaller percentage jump (10%) than the previous examples. We've defined “moving sideways” specifically as having a trading range of less than 2% during the past 10 days.


Stocks Moving Sharply Higher after a Short-Term Downtrend

This scan finds stocks that closed more than 10% above their previous close after being in a short-term downtrend.

[type = stock]
and [today's close > yesterday's close * 1.10]
and [Downtrend is true]

Note: The final clause uses our predefined downtrend criteria from our “Candlestick Building Blocks” area. It is based on simple MAs and cannot be adjusted.


Stocks Moving Sharply Higher after a Long Downtrend

This scan finds stocks that closed more than 10% above their previous close after being in a downtrend for at least 20 days.

[type = stock]
and [today's close> yesterday's close * 1.10]
and [yesterday's max(20,Plus DI(14)) < yesterday's min(20,Minus DI(14))]

Note: The final clause finds stocks where +DI has been below -DI for at least 20 days - a more customizable way to determine if a stock was in a downtrend during that time.


Stocks Having a 52-Week High on Increased Volume

This scan finds stocks that are having a new 52-week high today with volume 50% higher than the 50-day average volume.

[type = stock]
and [today's high > yesterday's max(260,high)]
and [volume > SMA(50,volume) * 1.5]

Stocks Having a New Triple Top Breakout

This scan finds stocks with P&F charts displaying the Triple Top Breakout pattern today.

[type = stock]
and [yesterday's Triple Top Breakout is false]
and [today's Triple Top Breakout is true]

Note: Breakouts are not always defined using price and volume. In this case, a P&F pattern is used to identify a stock that is breaking out.



Divergence Scans

Divergence signals can warn of an impending change in the direction of a stock's price. As divergences can be tricky to scan for, be sure to review the chart for each scan result to ensure that a divergence is present. Below are several examples of divergence scans.

Learn More: Scanning for Divergences


Bearish Divergence: Price Diverging from Chaikin Money Flow

Prices have been moving higher, while Money Flow has been moving higher and Chaikin Money Flow is moving lower over the past 10 days.

[type = stock]
and [close > yesterday's max(10,close)]
and [CMF(20) < yesterday's min(10,CMF(20))]

Note: Negative divergence scans can help identify potential shorts.


Bullish Divergence: Price Diverging from MACD

This scan finds securities where prices are in a downtrend while MACD is rising in this positive divergence scan.

[type = stock]
and [downtrend is true]
and [MACD Line(12,26,9) > yesterday's max(10,MACD Line(12,26,9))]

Bearish Divergence: Price Diverging from RSI

This scan finds securities where prices are in an uptrend, but RSI has been moving lower over the past 10 days in this negative divergence scan.

[type = stock]
and [uptrend is true]
and [PctChange(10,RSI(14)) < -20]

Bullish Divergence Using Slope

In this bullish divergence, the slope of price is negative while the slope of the MACD Histogram is positive.

[type = stock]
and [slope(20) < 0]
and [slope(20,MACD Hist(12,26,9)) > 0.0]

Bearish Divergence Using Slope

In this bearish divergence, the slope of price is positive while the slope of the MACD Histogram is negative.

[type = stock]
and [slope(20) > 0]
and [slope(20,MACD Hist(12,26,9)) < 0.0]


High and Low Scans

Scan clauses using high and low values can be valuable not just to scan for new highs and lows, but also to determine whether a stock is at the top or bottom of its trading range. Here are several examples of high and low scans.


Stocks Near Yearly High

This scan finds securities where today's high is within 5% of the yearly high.

[type = stock]
and [today's high > yesterday's max(260,high) * 0.95]

Note: We use “yesterday's” in the scan so that today's high is not included in the calculation, as today's high could never be higher than a group of values that included today's high.


Stocks Near Yearly Low

This scan finds securities where today's low is within 5% of the yearly low.

[type = stock]
and [today's low < yesterday's min(260,low) * 1.05]

Note: We multiply the lowest low of the year by 1.00 + 5% (i.e. 1.05), to determine the value that is 5% higher than the lowest low. The close must be at least as low as that value to be returned by the scan.


Close Crosses Above Last Month's High

This scan finds securities where today's close has just crossed above last month's high.

[type = stock]
and [close x last month's high]

Note: The “crosses above” operator (“x”) scans for stocks whose closing values were below last month's high yesterday, but are above it today.


Close in Upper Half of Day's Range

This scan finds securities where today's close is nearer to the high than the low.

[type = stock]
and [close > [[high + low] / 2]]

Note: We add the high and low together and divide by two in order to get the average of the two values. This is the midpoint of the day's range. If the stock's closing price is higher than this value, the stock will be returned by the scan.


Close in Upper Half of Weekly Range

This scan finds securities where this week's close is nearer to the weekly high than the weekly low.

[type = stock]
and [weekly close > [[weekly high + weekly low] / 2]]

Note: The weekly close is the last closing value of that week, typically the closing value on Friday.


Close Near the Daily High

This scan finds securities where today's close is within 2% of the daily high.

[type = stock]
and [close > high * 0.98]

Note: This shows that the stock closed very near to the top of the day's trading range, within 2% of the high for the day.


Recent Close Above the 90-Day High Close

This scan finds securities where the close has been at least 3% above the 90-day high close, any time within the last 5 days.

[type = stock]
and [max(5, close) > 6 days ago daily max(90,close) * 1.03 ]

Note: We find the highest closing value in the last 90 days, then multiply it by 1.03 (a.k.a. 1.00 + 3%) to determine the value that is 3% above the high for the last 90 trading days (approximately 4 calendar months). Notice that we used “6 days ago” in the scan, as we want to exclude the last 5 days from that calculation. The clause compares that value to the highest close over the last 5 trading days.



Trend Scans

One of the most basic conditions to scan for is trend; consequently, we offer many ways to scan for stocks in an uptrend or downtrend. Below are just a few examples of trend scans.


Stocks in a Short-Term Uptrend

This scan finds stocks that are in a short-term uptrend.

[type = stock]
and [Uptrend is true]

Note: This simple scan clause uses our predefined uptrend criteria from our “Candlestick Building Blocks” area. It is based on simple moving averages and cannot be adjusted.


Stocks in a Long-Term Downtrend

This scan finds stocks that have been in a downtrend for at least 20 days.

[type = stock]
and [min(20,ADX Line(14)) > 25]
and [max(20,Plus DI(14)) < min(20,Minus DI(14))]

Note: This scan clause determines a long-term downtrend by scanning for stocks where the ADX Line has been above 25 and +DI has been below -DI for at least 20 days. The timeframe can be customized by changing the “20” in the min() and max() functions to a different number of trading periods.


Stocks with Successive Monthly Highs

This scan finds stocks whose monthly high is higher than last month's high, which is in turn higher than the high from two months ago.

[type = stock]
and [monthly high > last month's high]
and [last month's high > 2 months ago high]

Note: This scan can be customized by changing the number of months of highs to check and/or changing the period (e.g. scanning for successive weekly highs).


Emerging Downtrend

This scan finds stocks whose Aroon values are signaling the start of a downtrend.

[type = stock]
and [Aroon Down(25) x Aroon Up(25)]

Note: Aroon Down crossing above Aroon Up is the first stage of an Aroon downtrend signal; this indicates that a new 25-day low has happened more recently than a new 25-day high.



Momentum Scans

Scanning for momentum can help you find stocks that are making a big move, as well as stocks that are slowing down and possibly heading for a reversal. Here are a few examples of momentum scans.


Increasing Rate-of-Change

This scan finds stocks with sharply increasing ROC(12) over the past 5 days.

[type = stock]
and [today's Slope(5,ROC(12))> 10]

Note: In the second clause, “5” controls the number of days to look back through, while “10” controls the “steepness” of the ROC's slope. The higher that number, the steeper the ROC's slope needs to be.


Bullish MACD Turnaround Signal

MACD Line moves above the MACD Signal Line when both are below zero and the MACD Histogram has been moving upwards for at least 3 days.

[type = stock]
and [today's MACD Signal(12,26,9) < 0]
and [today's MACD Line(12,26,9) < 0]
and [today's MACD Line(12,26,9) x today's MACD Signal(12,26,9)]
and [today's MACD Hist(12,26,9) > yesterday's MACD Hist(12,26,9)]
and [yesterday's MACD Hist(12,26,9) > 2 days ago MACD Hist(12,26,9)]
and [2 days ago MACD Hist(12,26,9) > 3 days ago MACD Hist(12,26,9)]
and [3 days ago MACD Hist(12,26,9) > 4 days ago MACD Hist(12,26,9)]

Note: Placing each clause on a separate line starting with “and” allows you to easily rearrange clauses or duplicate clauses using copy and paste. It also allows you to comment out a clause temporarily by adding “#” in front of that specific clause.



Volatility Scans

Volatility is not just for determining risk; scanning for volatility can help you find stocks with unusually high or low performance, as well as stocks that are breaking out after a period of consolidation. Here are a few examples of volatility scans.


Bollinger Band Crossover

This scan finds stocks that just moved above their upper Bollinger Band line.

[type = stock]
and [today's close x today's Upper BB(20,2)]

Note: Bollinger Band crossovers are not necessarily bullish or bearish and do not constitute a signal on their own. Use them in conjunction with other indicators.


Bollinger Band Breakout

This scan finds stocks whose Bollinger Bands just expanded rapidly after being contracted for 5 or more days.

[type = stock]
and [today's BB Width(20,2) > yesterday's max(5, BB Width(20,2)) * 4]

Note: Different securities will have different “average” Bollinger Band widths, so looking for a percentage of the average width is the best approach. In this example, the scan clause looks for a width 4 times larger than normal.



Short Candidate Scans

There's no big secret to scanning for shorting opportunities. They're generally just the opposite of scans for long opportunities. Here are a few examples of short candidate scans.


Stocks Trading in Bottom Half of Range

This scan finds stocks that closed in the lower half of the day's range with heavy volume (twice as much volume as usual).

[type = stock]
and [close < open]
and [close < [ [high + low] / 2] ]
and [volume > SMA(20, volume) * 2] 

Note: In the long candidate version of this scan, you would scan for stocks closing in the top half of their range on heavy volume.


Stocks With New Monthly Low for CMF

This scan finds stocks with the lowest Chaikin Money Flow (CMF) indicator value in a month.

[type = stock]
and [close < open]
and [CMF(20) < 0]
and [CMF(20) < yesterday's min(20,CMF(20))]

Note: It is important to also check that the CMF value is below zero. Otherwise, you may find stocks that have been doing so well in the last month that even the monthly low is a pretty high value.


Stocks With New High on Low Volume

This scan finds stocks that are having a new 52-week high with low volume (half as much volume as usual).

[type = stock]
and [today's high > yesterday's daily max(252,high)]
and [volume < SMA(50,volume) * 0.5]

Note: It may seem counterintuitive for a shorting candidate to be having a new high. When this happens on low volume, though, it can be a signal that the price has peaked and will begin falling.


Stocks With New Low on Heavy Volume

This scan finds stocks that are having a new 52-week low with heavy volume (50% more volume than usual).

[type = stock]
and [today's low < yesterday's min(252,low)]
and [volume > SMA(50,volume) * 1.5]

Note: Reaching a new low on heavy volume can indicate that the sellers are still firmly in control and selling pressure has not yet peaked.



Scans for Patterns and Indicators

SCTR Scans

Scanning for SCTRs can quickly tell you how stocks are doing relative to their peers. Below are several examples of SCTR scans.

Learn More: Scanning for SCTRs


SCTR Crossing Below 30

London stocks with a SCTR value that has just crossed below 30 with heavy volume (50% more than usual).

[type = stock]
and [30 x SCTR.lse] 
and [volume > sma(50,volume) * 1.5]

Note: To indicate crossing below, switch the expressions on either side of the cross operator. If the SCTR is crossing below 30, then 30 is crossing above the SCTR.


SCTR Rising More Than 20 Today

This scan finds large-cap US stocks where the SCTR has gone up at least 20 since yesterday.

[type = stock]
and [ [today's SCTR.large - yesterday's SCTR.large] > 20]

Note: This scans for the difference between today's SCTR value and yesterday's SCTR value. Notice the extra pair of square brackets around the subtraction part of the clause, which ensure that the subtraction is done before the comparison.


SCTR Breaks Into 6-Month High

This scan finds mid-cap US stocks with a SCTR value that has just crossed below 30 with heavy volume (50% more than usual).

[type = stock]
and [today's SCTR.mid > yesterday's max(120,SCTR.mid)]

Note: This scan compares today's SCTR with the highest SCTR value of the last 120 trading days (approximately 6 months).


Consistently High SCTR

This scan finds US ETFs with a SCTR value that has averaged higher than 90 over the last 50 trading days.

[type = stock]
and [SMA(50,SCTR.us.etf) > 90]

Note: The SCTR was not necessarily above 90 every single day of the timeframe, but the average value over that 50 days was above 90.


Rising SCTR

This scan finds securities with a SCTR value that has increased every two days over the last 10 trading days.

[type = stock]
and [8 days ago SCTR > 10 days ago SCTR]
and [6 days ago SCTR > 8 days ago SCTR]
and [4 days ago SCTR > 6 days ago SCTR]
and [2 days ago SCTR > 4 days ago SCTR]
and [today's SCTR > 2 days ago SCTR]

Note: There is no “suffix” on SCTR in these clauses (e.g. SCTR.large). This means the scan will return matching values from any of the available SCTR universes. You may want to add other clauses to narrow down the universe (e.g. [country = US]).



P&F Scans

Unlike subjective candlestick patterns, P&F patterns are totally objective and rules-based, so they lend themselves particularly well to scanning. Below are several examples of P&F scans.

Learn More: Writing P&F Scans


P&F Triple Top Breakout

This scan finds stocks with a triple top breakout pattern on their P&F chart.

[type = stock]
and [PnF Triple Top Breakout = true]

Note: A P&F Pattern can be true for several days, weeks or even months.


New P&F Triple Top Breakout

This scan finds stocks that have just had a new triple top breakout pattern on their P&F chart.

[type = stock]
and [yesterday's PnF Triple Top Breakout = false]
and [today's PnF Triple Top Breakout = true]

Note: To find new P&F patterns, you need to scan for the pattern being false yesterday and true today.


P&F Buy Signal

This scan finds stocks with a P&F buy signal on their P&F chart.

[type = stock]
and [PnF Buy Signal is true]

Note: This is the scan that is used in Bullish Percent calculations.


P&F Long Column of X's

This scan finds stocks with 10 or more X's in the current column of their P&F chart.

[type = stock]
and [PnF Chart In Xs is true]
and [P&F Box Count >= 10]

Note: The box count is not technically a P&F pattern, but it is actually more configurable. You can define how many boxes constitutes a long column (in this case, we chose 10) and, if you're looking for stocks with falling prices, you can configure the scan to search for O's instead (i.e. [PnF Chart in Os is true]).



Candlestick Pattern Scans

Candlestick patterns are somewhat subjective and can be difficult to scan for. It is important to review the charts of all the symbols in your scan results to confirm that the pattern is indeed present. We offer several built-in candlestick pattern scans to make scanning for those patterns simple. You can use candlestick building blocks to create your own custom scans for less commonly-used patterns. Below are several examples of candlestick pattern scans.


Three White Soldiers

This scan finds charts with three tall, hollow candles.

[type = stock]
and [Three White Soldiers is true]

Note: Three White Soldiers is one of our built-in candlestick patterns.


Two White Soldiers

This scan finds charts with two tall, hollow candles.

[type = stock]
and [today's Long Body is true]
and [yesterday's Long Body is true]
and [today's close > yesterday's close * 1.05]
and [yesterday's close > 2 days ago close * 1.05]

Note: Two White Soldiers is not one of our built-in candlestick patterns, but we can construct our own scan for this pattern using the “Long Body” candlestick building block.


Do-It-Yourself Gravestone Doji

This scan finds charts with a gravestone doji for today's candlestick.

[type = stock]
and [open = close]
and [open = low]
and [high > open * 1.05]

Note: You can also scan for gravestone dojis using the built-in scan clause [Gravestone Doji is true], but this custom scan allows you to define the length of the upper shadow. The above example looks for candles with a 5% or more upper shadow. You can change “1.05” to suit your trading style.


Contradictory Candles

This scan finds charts with filled black candles or hollow red candles.

[type = stock]
and [ [Filled Black Candle is true] or [Hollow Red Candle is true] ]

Note: The additional set of square brackets around the OR clause is required. Otherwise, unexpected scan results will occur.



Gap Scans

Scanning for gaps is pretty simple. With these scans, you are looking for stocks where today's high is below yesterday's low (a gap down) or today's low is above yesterday's high (a gap up). Here are a couple of examples of gap scans.


Stocks that Gapped Up Today

This scan finds stocks that gapped up by more than 5% today.

[type = stock]
and [today's low > yesterday's high * 1.05]

Note: To see if something moved 5% higher than something else, compare it to the second value multiplied by 1.05 (a.k.a. 1.00 + 5%). Use the * operator for multiplication (not “x”!). You can change “1.05” to suit your trading style.


Stocks with a 3-Day Island Reversal

This scan finds stocks that gapped up, moved sideways for 3 days and then gapped back down:

[type = stock]
and [yesterday's min(3, low) > today's high * 1.05]
and [3 day's ago low > 4 day's ago high * 1.05]

Note: The second clause find stocks where the previous 3 days were at least 5% higher than today's high (thus having a 5% gap down today). The last clause looks for the 5% gap up happening 3 days ago, thus creating the “island.”



Scans Using Functions and Operators

"OR" Scans

While they can be tricky to master, OR clauses add flexibility to your scans, allowing you to find stocks that meet one of a list of possible scan criteria. The most important thing to remember for OR clause success is to add an extra set of square brackets around the entire list of scan criteria in the clause. Below are several examples of OR clause scans.

Learn More: Writing Scans with OR Clauses


All Stocks Traded on the NYSE or NASDAQ Exchanges

This scan finds all stocks that trade on either the NYSE or the NASDAQ exchange.

[type = stock] 
and [ [exchange is NYSE] or [exchange is NASDAQ] ]

Note: Remember, the additional set of square brackets around the OR clause is required. Otherwise, unexpected scan results will occur.


All Basic Materials and Technology Sector Stocks

This scan finds all stocks that are either in the Materials sector or the Technology sector.

[type = stock]
and [ [group is MaterialsSector] or [group is TechnologySector] ]

Note: The scan title has “and” in it because we're looking for stocks from both sectors, but the scan actually calls for “OR” between the clauses so that it looks for stocks that meet the criteria of being in the Materials sector OR the technology sector. A single stock doesn't need to be in both sectors, so “AND” is not the operator to use here.


All US Stocks Where the SCTR Crossed Above 90

This scan finds all stocks in the US large-cap, mid-cap or small-cap SCTR universe whose SCTR just crossed above 90.

[type = stock] 
and [ [SCTR.large x 90] or [SCTR.mid x 90] or [SCTR.small x 90] ]

Note: In this scan, we have three possible scan criteria on our “OR” list instead of two. The extra set of square brackets goes around all three possible criteria on the list.


Stochastics at Either Extreme

This scan finds all stocks with a Stochastics value of 0 or 100.

[type = stock]
and [ [Full Stoch %D(14,3,3) = 0.0] or [Full Stoch %D(14,3,3) = 100.0] ]

Note: In this scan we are looking for two possible values for the same indicator.


Stocks with Positive Momentum Crossovers

This scan finds all stocks that are having either a MACD Line, ROC or CMF value crossing above zero.

[type = stock]
and [ 
  [MACD Line(12,26,9) x 0] 
  or [ROC(14) x 0] 
  or [CMF(20) x 0] 
]

Note: The criteria in your OR clause don't have to be related to each other. In this case, we're looking for positive crossover signals from any of three different momentum indicators. Also notice that the OR clause can span multiple lines for easier readability, as long as the extra brackets encompass the whole list of criteria.



Min/Max Scans

The versatile min() and max() functions can be used to scan for highs and lows, consolidation, divergences and more. Below are several examples of scans using the min() and max() functions.

Learn More: Writing Min/Max Scans


Stocks Having a 52-Week High

This scan finds stocks that are having a new 52-week high today.

[type = stock]
and [today's close > yesterday's daily max(253,close)]

Note: We use “yesterday's” in the scan so that today's close is not included in the calculation (because today's close could never be higher than a group of values that included today's close).


Stocks Having a 52-Week Low

This scan finds stocks that are having a new 52-week low today.

[type = stock]
and [today's low < yesterday's daily min(253,low)]

Note: While new highs use the max() function to look for prices that are higher than the previous maximum price, new lows use the min() function to look for prices lower than the previous minimum price.


Stocks Consolidating For One Month

This scan finds stocks that have been trading in a tight trading range (plus or minus 2%) over the last 20 trading days.

[type = stock]
and [max(20,close) < SMA(20,close)*1.02]
and [min(20,close) > SMA(20,close)*0.98]

Note: This scan looks for stocks where the highest price for the month is no more than 2% over the monthly average, while the lowest price for the month is no less than 2% below the monthly average. These thresholds can be adjusted to suit your trading style.


Stocks With RSI In an Uptrend

This scan finds stocks with an RSI value above 40 for the last 60 trading days.

[type = stock]
and [min(60,RSI(14)) > 40]

Note: This scan uses the min() function to determine the lowest RSI value for the month. If the lowest value is above 40, then all the other values will also be above 40.



Percent Change Scans

The PctChange() function can be used to scan for the percent change of any numeric value: price, volume, indicator, etc. Below are a few examples of scans using the PctChange() function.

Learn More: Writing Percent Change Scans


Stocks with Large Price Increase

This scan finds securities where price has risen more than 20% over the last 30 trading days.

[type = stock]
and [PctChange(30,close) > 20]

Note: This scan looks for stocks where the percent change over the last 30 days is more than 20%. These timeframe and percentage change parameters can be adjusted to suit your trading style.


Stocks with Large Price Decrease

This scan finds securities where price has dropped more than 15% over the last 20 trading days.

[type = stock]
and [PctChange(20,close) < -15]

Note: A negative percentage change is measured in negative numbers. In the example above, the percent change of -15 means that the price has dropped by 15%.


Stocks with Large Increase in RSI Value

This scan finds securities where the RSI value has risen more than 15% over the last 10 trading days.

[type = stock]
and [PctChange(10,RSI(14)) > 15]

Note: The PctChange() function can be used with any numeric value, not just price values. This scan looks at the percent change in RSI value over time. To determine the percentage change of an indicator, just replace the word “close” in the clause with the indicator syntax (i.e. “RSI(14)”).



Overlay of Indicator Scans

Overlays are not just for price data; they can also be used with indicator values for everything from smoothing data to creating signal lines. Below are a few examples of scans that use overlays of indicators.

Learn More: Scanning for an Overlay of an Indicator


RSI Crossing Its Own EMA

This scan finds securities where today's RSI(14) value is crossing above the 28-day EMA of RSI.

[type = stock]
and [RSI(14) x EMA(28,RSI(14))]

Note: Moving averages are the most commonly-used overlays of indicators. In this example, the EMA is being used to create a signal line; the scan then looks for stocks where RSI has crossed this signal line. The EMA timeframe can be adjusted to suit your trading style.


Double-Smoothed SMA

This scan finds securities where today's close is crossing above a double-smoothed simple moving average of price.

[type = stock]
and [close > SMA(20,SMA(20,close))]

Note: In this scan, the moving average is double-smoothed: a 20-day simple moving average of the 20-day simple moving average of the close. The timeframe for both SMAs can be adjusted to suit your trading style.


Slope of OBV

This scan finds securities where the 10-day slope of On Balance Volume (OBV) is greater than zero.

[type = stock]
and [Slope(10,OBV) > 0.0]

Note: This scan looks for a positive slope of OBV over a 10-day period. The timeframe can be adjusted to suit your trading style.



Additional Resources

Support Center Articles

For more Support Center articles on scan writing topics, be sure to check out the “Learn More” links throughout this page.