Formula Patterns
Building blocks you can copy, tweak, and combine. Click any pattern to load it as a row.
Price comparisons
Up day
C > C[-1]
Up > 5% in a day
C > C[-1] * 1.05
Close above 20-day MA
C > avg(C, 20)
Above 20MA and 20MA above 50MA
(C > avg(C, 20)) and (avg(C, 20) > avg(C, 50))
Breakouts
20-bar high (excl. today)
C > ref(max(C, 20), -1)
52-bar high (intraday)
C > ref(max(H, 52), -1)
20-bar high on 1.5× volume
(C > ref(max(C, 20), -1)) and (V > 1.5 * avg(V, 20))
Reversals & exhaustion
3 down then 2% bounce
(C[-1] < C[-2]) and (C[-2] < C[-3]) and (C > C[-1] * 1.02)
10-bar low broken intraday but green close
(L < ref(min(L, 10), -1)) and (C > O)
Volatility & range
Range > 2× avg 20-day range
(H - L) > 2 * avg(H - L, 20)
Inside day
(H < H[-1]) and (L > L[-1])
Volume
Volume > 2× 20-day avg
V > 2 * avg(V, 20)
Volume blow-off (3× 50-day)
V > 3 * avg(V, 50)
Combining with and / or
Above 20MA on rising volume
(C > avg(C, 20)) and (V > 1.5 * avg(V, 10))
Big move day (5% either direction)
(C > C[-1] * 1.05) or (C < C[-1] * 0.95)
Calendar & seasonality
Pick a calendar window, run it over an index or watchlist, then read the Per-Symbol tab to rank the best/worst responders.
December (best stocks in December)
month() == 12
January effect
month() == 1
Turn of the month (first 5 days)
dom() <= 5
Monday effect
dow() == 1
Friday effect
dow() == 5
Q4 strength
quarter() == 4
December up-days (1%+)
(month() == 12) and (((C - C[-1]) / C[-1]) * 100 > 1)