Idea in brief
Mark Minervini buys breakouts only in stocks in stage 2 of the cycle, when the stock is already rising. To avoid judging this by eye, Minervini wrote down eight conditions, the trend template. Jack Corsellis walks through them in a video about VCP and uses them as the first broad filter in the scan: first cut everything that is not in an uptrend, then sort what remains by relative strength.
The filter buys nothing by itself. It decides whether a long setup can be applied to a stock: a base breakout, a pullback to a moving average, a VCP. Seven conditions are calculated on a single chart. Relative strength, condition 7 on Jack's slide, requires a comparison: for Minervini it is the IBD rating across the whole market, and Jack also uses the RS line against the index and a comparison with the group ETF. The card numbers the conditions as on Jack's slide. In Minervini's book "Trade Like a Stock Market Wizard" (2013) the order is different: price above SMA 50 is the fifth condition, relative strength the eighth, and the minimum distance above the 52-week low is 30% rather than 25%. The book's preferred relative strength rating is "in the 80s or 90s", while Jack's slide says only "in the 90s".
weinstein-stages marks four stages by the 30-week average and gives an entry itself, while index-ema-regime allows buys based on the index. The trend template checks an individual stock and adds distance from the 52-week extremes and relative strength.
Why it might work
The authors' logic rests on demand. A stock that holds above rising long averages, near its 52-week high and stronger than the market, is already being bought by large players. Jack explains relative strength through the benchmark: a US fund is measured against the S&P 500, and a manager who lags behind loses client money. So fund money flows into stocks that are stronger than the index, and the RS line shows where it goes. Jack considers the strongest sign to be a new 52-week high of the RS line while price is still in the base: the market is pushing down, but the stock does not fall.
The evidence in the videos is descriptive. The 95% club and O'Neil's average rating of 87 show what winners looked like before their rise. These figures do not show how many stocks with the same traits failed to rise. The template filters out stocks that rarely produce big moves, but it does not promise moves by itself.
Rules
Trend template on a single stock (author)
// daily stock bars, signal at the close; on the slide all averages are simple
// TT1-TT8 numbered as on Jack's slide; in Minervini's book price above SMA 50 is condition 5, RS is condition 8
SMA50 = SMA(Close, 50)
SMA150 = SMA(Close, 150) // author: 150 days = 30 weeks
SMA200 = SMA(Close, 200) // author: 200 days = 40 weeks
Low52 = Lowest(Low, 252) // Finetiq: 52 weeks = 252 bars, based on lows
High52 = Highest(High, 252)
TT1 = Close > SMA150 AND Close > SMA200
TT2 = SMA150 > SMA200
TT3 = SMA200 > SMA200[21] // author: rising for at least a month; Finetiq: month = 21 bars
TT3_strict = TT3 AND SMA200[21] > SMA200[42]
AND SMA200[42] > SMA200[63] AND SMA200[63] > SMA200[84]
// author: 4-5 months is better; Finetiq: 4 steps of 21 bars
TT4 = SMA50 > SMA150 AND SMA50 > SMA200
TT5 = Close >= 1.25 * Low52 // community (Jack, slide): at least 25% above the 52-week low
TT5_book = Close >= 1.30 * Low52 // author (book): at least 30%
TT6 = Close >= 0.75 * High52 // author: no more than 25% below the 52-week high
TT8 = Close > SMA50 // author
TT8_cheat = Close >= 0.92 * SMA50 // author: for cheat and low cheat entries, up to 8% below SMA 50
TemplateOK = TT1 AND TT2 AND TT3 AND TT4 AND TT5 AND TT6 AND TT8
// condition 7, relative strength, is in the separate blocks below
Jack adds that the market must be in stage 2 as well. Take the index filter from index-ema-regime.
Relative strength: rating across the universe (separate rule)
// author (book): IBD relative strength no lower than 70, preferably in the 80s or 90s
// community (Jack's slide): above 70, preferably in the 90s. The IBD formula is not disclosed in the video
// community (Jack): scan on 3-month RS rank above 70, sorted from 99 down
ROC63 = Close / Close[63] - 1 // Finetiq: rating proxy, 3 months = 63 bars
RSRank = percentile of ROC63 among all stocks in the universe on that day, scale 1-99 // Finetiq
RS_OK = RSRank > 70 // author
RS_Pref = RSRank >= 90 // community (Jack's slide): preferably in the 90s
RS_Pref_book = RSRank >= 80 // author (book): preferably in the 80s or 90s
// community (Jack): scan after the close across the whole US universe
Scan = Close > SMA50 AND Close > SMA200 AND TT6
AND Average(Volume, 50) > 50 000 // community (Jack): can be raised to 100-200 thousand
AND RS_OK
// then review the charts by eye, starting from RS 99 (community, Jack)
RS line against the index (community, windows by Finetiq)
Index = S&P 500 // community (Jack): benchmark of US funds; other markets have their own index
RSLine = Close / Close of Index
RSHigh = RSLine >= Highest(RSLine, 252) // community (Jack): 52-week high of the RS line (blue dots)
RS_Line_OK = RSHigh on at least one of the last 20 bars // Finetiq: window 20
RS_InBase = RSHigh AND Close < Highest(High, 40)[1] // community (Jack): RS line high while price is in the base
// Finetiq: "in the base" = below the 40-day high
Variant B. Cascade: index, group, stock (Jack Corsellis)
Jack compares a stock with its group ETF, and the ETF with the index. Example from the video: gold miner AEM versus GDX on July 30, 2024. The way this is formalized and the windows below are ours.
ETF = the stock's sector ETF // community (Jack); Finetiq: the mapping is set manually
GroupStrong = (Close of ETF / Close of Index) >= Highest(ETF / Index, 63)
on at least one of the last 10 bars // Finetiq
// view through the key moving average (community, Jack: EMA 21)
StockHoldsMA = Close > EMA(Close, 21) on each of the last 10 bars // Finetiq: 10 bars
GroupLostMA = Close of ETF < EMA(Close of ETF, 21) on at least 1 of the last 10 bars
// structure (community, Jack): the stock held the broken high on the pullback, the ETF fell below the low of the same bar
RefBar = the stock's high bar in the window from 60 to 20 bars ago // Finetiq
StockHold = Highest(High, 20) > High[RefBar] AND Lowest(Low, 10) > High[RefBar]
GroupFail = Lowest(Low of ETF, 10) < Low of ETF[RefBar]
LeaderInGroup = GroupStrong AND StockHold AND StockHoldsMA AND (GroupFail OR GroupLostMA)
Connecting to other cards in the base (Finetiq)
// example 1: qullamaggie-breakout. Its scan already has price above SMA 50 and 200
Setup_A = Setup // as in the card
Setup_B = Setup AND TemplateOK
Setup_C = Setup AND TemplateOK AND RS_Line_OK
// entry, stop and trade management do not change; compare the three runs
// example 2: weinstein-stages, variant B. Add only what Weinstein does not have
BuyAllowed_TT = BuyAllowed AND TT5 AND TT6 AND RS_Line_OK
// TT5 often filters out a breakout from stage 1, which Weinstein buys
Parameters
| Parameter | Value | Source |
|---|---|---|
| Averages | SMA 50, 150, 200 | author |
| SMA 200 rising | at least a month, preferably 4-5 months | author |
| Month | 21 bars | Finetiq |
| From the 52-week low | at least +25% (30% in the book) | community (Jack's slide), author (book) |
| From the 52-week high | no more than 25% below | author |
| 52 weeks | 252 bars on High and Low | Finetiq |
| Exception for cheat entries | up to 8% below SMA 50 | author |
| Relative strength | rating above 70, preferably in the 90s (Jack's slide) or in the 80s and 90s (book) | author (book), community (Jack's slide) |
| Rating proxy | percentile of 63-bar ROC | Finetiq |
| Average volume in the scan | above 50,000 over 50 days, 100,000-200,000 possible | community (Jack) |
| RS line benchmark | S&P 500 | community (Jack) |
| Fresh RS line high window | 20 bars | Finetiq |
| "In the base" | below the 40-day high | Finetiq |
| Key average in the cascade | EMA 21 | community (Jack) |
| Cascade windows | 10, 20, 60, 63 bars | Finetiq |
What to test
- Does the template add anything beyond two averages. One long setup on a basket of stocks without a filter, with
Close > SMA50 AND Close > SMA200(as in Jack's scan) and with the full template. If the full template is no better, the extra conditions only cut the number of trades. - Which conditions work. Switch off TT3, TT5, TT6 and TT8 one at a time. TT5 filters out early breakouts from stage 1, so watch it especially closely.
- Threshold neighborhood. 25% from the extremes versus 20% and 30%, rating 70 versus 60 and 80, SMA 200 rising over one month versus two and four. A sharp jump in the result means overfitting.
- Universe rating versus RS line. Label trades two ways: RSRank > 70 and RS_Line_OK. If the RS line selects nearly the same stocks, the filter can be moved to platforms without ranking.
- Three months versus twelve. Jack considers 3-month RS more effective than 12-month RS. Run the rating on ROC63 and on ROC252.
- Group cascade. Trades where the stock is stronger than its ETF and the ETF is stronger than the index, versus the rest. Take the stock-to-ETF mapping as of the trade date.
- Survivorship bias. A test on today's market constituents inflates the result, so you need a universe that includes delisted stocks.
Platform notes
TradingView (Pine Script)
- The template conditions, except the rating, are calculated on a single chart:
ta.sma,ta.highest(high, 252),ta.lowest(low, 252). You need at least 300 bars of history. - RS line: the index close via
request.security(indexSymbol, "D", close)and a division. - A rating across the whole universe cannot be calculated in Pine: the number of symbols in
request.securityis limited, and a strategy trades only the chart symbol. Condition 7 can be replaced with the RS line, but that is a different condition (test 4). - There is no portfolio backtest. The filter is tested on a preselected list of stocks, one at a time, and such a list already contains survivorship bias.
MultiCharts and TradeStation (EasyLanguage)
- The index for the RS line is added as a second data stream:
Close / Close of Data2. Check that the bar dates of the stock and the index match, otherwise the line jumps on holidays. - The universe rating and the cascade are calculated in the portfolio module (TradeStation Portfolio Maestro, MultiCharts Portfolio Trader). The group ETF is needed as one more data stream.
Average(Close, 200)with a rising check over 84 bars andHighest(High, 252)require a long warm-up. Set MaxBarsBack to at least 300.- Data not adjusted for splits breaks TT5 and TT6: after a split the 52-week low ends up above the price. Use adjusted series.
MetaTrader 5 (MQL5)
- A broker's stock CFDs usually cover a few hundred large US stocks. A rating among them will not match the rating across the 5,500 stocks in Jack's scan, and small fast-moving stocks are often missing.
- The average volume from the scan cannot be calculated on CFDs: only tick volume is available (
iTickVolume). - Daily history of stock CFDs is often shorter than a few years. SMA 200 rising over 4 months takes more than a year of warm-up.
- The index for the RS line is read via
iCloseon the S&P 500 CFD symbol. Daily bars of the index CFD and the stock CFDs close on server time, so check that the dates line up.
Where the idea can break
- All figures in the videos describe winners in hindsight: the 95% club, O'Neil's rating of 87. They include neither the share of stocks with the same traits that did not rise nor a test of the filter.
- The IBD rating is proprietary. A proxy based on 63-bar ROC selects similar but not identical stocks.
- The template lags. After a market decline a stock needs months to pass TT2, TT3 and TT4 again, and the filter misses the start of a new advance.
- The template is calculated on simple averages, while Jack manages trades with EMA 10 and 21. They are easy to mix up in code.
- The mapping of a stock to a sector ETF changes over time. Using today's group list in a historical test introduces lookahead.
- All three videos are sponsored by one Investor's Business Daily service: MarketSmith, renamed MarketSurge in 2024 (an external fact, not from the videos). That is why the 2023 video names the sponsor MarketSmith and the 2024 videos name it MarketSurge. In the first video Jack shows a personal screener.