A free ThinkScript study for ThinkorSwim, built from our own research rather than from folklore.
Most chart patterns are discussed far more often than they are measured. We measured them: 12,050,609 occurrences of sixteen classic formations across 7,993 US stocks between 1994 and 2026, each one's outcome measured against the S&P 500 over the following 21 trading days, day-clustered, outliers capped.
Then we split the sample in half — everything before 2018, and everything since — and asked one question of each formation: did it do the same thing in both halves? Most did not. A pattern that only works in one era is a pattern that was fitted to that era.
| Formation | Occurrences | Before 2018 | Since 2018 | All years | Verdict |
|---|---|---|---|---|---|
| Pullback in an uptrend | 1,087,083 | +0.39% | -0.43% | +0.18% | Led the market, both eras |
| One-day pop: +10% on volume | 48,992 | -1.30% | -6.88% | -4.50% | Lagged the market, both eras |
| Vertical run: +20% in 2 weeks | 527,370 | -1.15% | -3.71% | -1.85% | Lagged the market, both eras |
| Overbought: RSI above 70 | 2,595,192 | -0.09% | -1.26% | -0.39% | Lagged the market, both eras |
| 2 sigma above its band | 1,098,962 | -0.22% | -1.40% | -0.53% | Lagged the market, both eras |
| Oversold: RSI below 30 | 1,744,974 | +0.52% | -1.32% | +0.05% | Flipped sign after 2018 |
| 2 sigma below its band | 891,449 | +0.57% | -1.04% | +0.15% | Flipped sign after 2018 |
| Three red days | 1,821,708 | +0.62% | -1.16% | +0.16% | Flipped sign after 2018 |
| New 52-week high | 877,324 | -0.15% | -0.73% | -0.30% | Faded after 2018 |
| Golden cross | 47,325 | -0.08% | -1.19% | -0.60% | Noise — no reliable edge |
| Death cross | 49,334 | -0.27% | -0.66% | -0.45% | Noise — no reliable edge |
| Breakout on volume | 228,020 | +0.10% | -2.59% | -0.66% | Noise — no reliable edge |
| Quiet squeeze, then breakout | 182,562 | +0.32% | -0.73% | -0.02% | Noise — no reliable edge |
| Crash: down 15%+ in a week | 383,970 | +0.19% | -4.11% | -1.09% | Noise — no reliable edge |
| New 52-week low | 433,558 | +0.23% | -3.10% | -0.68% | Noise — no reliable edge |
| One-day drop: -10% on volume | 32,786 | +0.60% | -2.90% | -1.42% | Noise — no reliable edge |
Percentages are the average return relative to the market over the 21 trading days after the formation fired. A verdict of led or lagged means the sign was the same before and since 2018; flipped means it reversed; noise means there was no reliable tilt in either direction. These are averages across enormous samples — the spread of individual outcomes dwarfs every number in this table.
One condition, the only one in the table that led the market in both eras: a stock closing at or below its previous 10-day low while still above its 200-day average — a pullback inside an uptrend. Copy it, paste it into ThinkorSwim, and it marks those days on any daily chart.
# ============================================================================
# IFD Pullback - a free ThinkScript study from insiderfilingsdata.com
#
# Plots one condition: the stock closes at or below its previous 10-day low
# while still trading above its 200-day average. A pullback inside an uptrend.
#
# Why this one: across 1,087,083 occurrences on 7,993 US stocks from 1994 to
# 2026, it is the only classic formation we tested that LED the market over
# the following 21 trading days in BOTH halves of the sample - before 2018
# and since. The tilt is small. The spread of individual outcomes is enormous.
# It is context, not a signal.
#
# The full study - five formations, colour-coded, with the measured outcome
# printed on the chart - is at insiderfilingsdata.com/members/thinkscript
#
# Use on DAILY charts. The statistics were measured on daily bars.
# ============================================================================
declare upper;
input showLabel = yes;
def dailyChart = GetAggregationPeriod() == AggregationPeriod.DAY;
def avg200 = Average(close, 200);
def low10prev = Lowest(close, 10)[1];
def pull = dailyChart
and !IsNaN(avg200)
and close <= low10prev
and close > avg200;
plot PullMark = pull;
PullMark.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
PullMark.SetDefaultColor(Color.GREEN);
PullMark.SetLineWeight(2);
AddLabel(showLabel and pull,
"PULL: 10-day low, still above the 200-day average", Color.GREEN);
AddLabel(showLabel and !dailyChart,
"IFD Pullback: use a DAILY chart - the stats were measured on daily bars",
Color.YELLOW);
In ThinkorSwim, click Studies on the chart toolbar, then Edit Studies…, then the Create button at the bottom left.
Delete the placeholder code in the editor, paste the script in, and give it a name — IFD_Pullback works.
Click OK, then add the study to a chart set to a daily aggregation. On intraday charts the condition fires on the wrong bars and the measured statistics do not apply.
The members version plots all five formations that survived testing, colour-coded by direction, with the measured 21-day outcome printed on the chart as each one fires — so you can see at a glance whether what just happened historically led or lagged the market. It comes with the rest of the members area: insider cluster buys, the Trader Atlas, the backtester and daily alerts.
Get the five-signal versionSee what membership includesIf you want to go further with the platform itself, two of our books cover it directly — one on which studies experienced ThinkorSwim users actually keep, one on writing your own in ThinkScript.
