MARGINPAD

The open library of trading strategies

Sixty-six rules tested on crypto, stocks, forex, commodities and indices, after fees and funding. See the full result, read the exact rule, try it on live candles and download it. Nothing is hidden, the losers included.

Strategies66
Markets55
Backtests6,795
Data since2000
66 strategies on Crypto. Growth of $1, log scale, after fees. Against simply holding: 1 returned more, 0 had a better Sharpe, 61 had a smaller drawdown.
Ended upEnded down

Every line is a real backtest on an equal-weight basket of that market class. Point at one to see which strategy drew it. Results to 2026-10-31.

Every strategy, every result

Pick a market above and the whole library re-reads itself. A headline is always the whole basket on the timeframe the rule declared in advance, never the coin it happened to suit.

Showing 66 strategies
S014h

Long while the 9 EMA is above the 21 EMA.

EMA 9/21 Cross

Trend following
Return
+203%
Holding
+518%
Sharpe
0.58
Max DD
-63.1%
Win rate
27.3%
Trades
6,564
S024h

Always in the market, on the side of the 9/21 EMA cross.

EMA 9/21 Long & Short

Trend following
Return
+23.7%
Holding
+518%
Sharpe
0.32
Max DD
-65.7%
Win rate
28.3%
Trades
13,120
S031d

A slower cross that sits out more of the chop.

EMA 20/50 Cross

Trend following
Return
+67.7%
Holding
+602%
Sharpe
0.42
Max DD
-72.8%
Win rate
25.9%
Trades
437
S041d

Long while the 50 SMA is above the 200 SMA.

Golden Cross

Trend following
Return
-29.5%
Holding
+602%
Sharpe
0.06
Max DD
-66.8%
Win rate
18.5%
Trades
135
S051d

The classic moving-average cross on simple averages.

SMA 20/50 Cross

Trend following
Return
+172%
Holding
+602%
Sharpe
0.56
Max DD
-61.8%
Win rate
34.2%
Trades
506
S061d

Long while price closes above the 50-day average.

Price Above SMA 50

Trend following
Return
+156%
Holding
+602%
Sharpe
0.54
Max DD
-61.6%
Win rate
18.8%
Trades
1,659
S071d

The simplest trend filter there is: above the 200-day average or in cash.

Price Above SMA 200

Trend following
Return
-44.9%
Holding
+602%
Sharpe
0.00
Max DD
-76.4%
Win rate
9.8%
Trades
787
S084h

Long only while three averages are stacked in order.

EMA Ribbon 8/21/50

Trend following
Return
+205%
Holding
+518%
Sharpe
0.61
Max DD
-45.0%
Win rate
29.4%
Trades
4,613
S094h

Long while the Hull moving average is rising.

Hull Trend

Trend following
Return
-44.2%
Holding
+518%
Sharpe
0.03
Max DD
-86.5%
Win rate
33.2%
Trades
16,286
S101d

Long from the MACD crossing its signal line until it crosses back.

MACD Cross

Trend following
Return
+108%
Holding
+602%
Sharpe
0.47
Max DD
-60.5%
Win rate
33.9%
Trades
1,796
S111d

Long while MACD is above zero, a slower read of the same idea.

MACD Zero Line

Trend following
Return
+135%
Holding
+602%
Sharpe
0.52
Max DD
-60.5%
Win rate
29.6%
Trades
811
S124h

Long while Supertrend is green.

Supertrend 10/3

Trend following
Return
+162%
Holding
+518%
Sharpe
0.53
Max DD
-51.3%
Win rate
33.8%
Trades
3,227
S134h

Always in the market, on the side Supertrend shows.

Supertrend Long & Short

Trend following
Return
-2.5%
Holding
+518%
Sharpe
0.26
Max DD
-57.9%
Win rate
36.2%
Trades
6,416
S141d

A wide Supertrend that aims to hold the big moves.

Supertrend 20/5

Trend following
Return
+24.6%
Holding
+602%
Sharpe
0.32
Max DD
-75.0%
Win rate
29.9%
Trades
251
S151d

An EMA trend, taken only when ADX says a trend exists.

ADX Trend Filter

Trend following
Return
+89.2%
Holding
+602%
Sharpe
0.45
Max DD
-66.5%
Win rate
32.0%
Trades
297
S161d

Long while +DI leads -DI.

DI Cross

Trend following
Return
+258%
Holding
+602%
Sharpe
0.67
Max DD
-63.8%
Win rate
27.0%
Trades
1,886
S171d

Long while price is above where it was ten bars ago.

Momentum 10

Momentum
Return
+145%
Holding
+602%
Sharpe
0.53
Max DD
-62.5%
Win rate
31.9%
Trades
3,641
S181d

Absolute momentum: long while the last three months are positive.

Momentum 90

Momentum
Return
-9.1%
Holding
+602%
Sharpe
0.22
Max DD
-79.6%
Win rate
25.6%
Trades
1,053
S191d

MACD entries, allowed only above the 200 SMA.

Trend + MACD

Trend following
Return
+21.7%
Holding
+602%
Sharpe
0.25
Max DD
-54.4%
Win rate
29.2%
Trades
806
S201d

Long while On-Balance Volume is above its own average.

OBV Trend

Momentum
Return
+48.0%
Holding
+602%
Sharpe
0.36
Max DD
-73.0%
Win rate
23.9%
Trades
3,814
S211d

Buy a new 20-bar high, sell a new 10-bar low.

Donchian Breakout 20

Breakout
Return
+157%
Holding
+602%
Sharpe
0.56
Max DD
-57.6%
Win rate
38.2%
Trades
644
S221d

The Turtle system: a 55-day high in, a 20-day low out.

Donchian 55 (Turtle)

Breakout
Return
+41.7%
Holding
+602%
Sharpe
0.34
Max DD
-66.5%
Win rate
33.4%
Trades
293
S234h

Goes with whichever side breaks a 20-bar range.

Donchian Long & Short

Breakout
Return
+0.7%
Holding
+518%
Sharpe
0.27
Max DD
-68.7%
Win rate
36.1%
Trades
6,149
S241d

Buy a close above the upper band, exit at the mid-line.

Bollinger Breakout

Breakout
Return
+201%
Holding
+602%
Sharpe
0.66
Max DD
-48.3%
Win rate
34.4%
Trades
921
S251d

Buy a close above the Keltner channel, exit at its mid-line.

Keltner Breakout

Breakout
Return
+135%
Holding
+602%
Sharpe
0.60
Max DD
-34.5%
Win rate
38.6%
Trades
536
S264h

A 20-bar high on twice the normal volume.

Volume Breakout

Breakout
Return
+149%
Holding
+518%
Sharpe
0.70
Max DD
-39.8%
Win rate
32.6%
Trades
2,728
S274h

A 20-bar high with a 2 ATR stop and a target three times the risk.

Breakout With 3R Target

Breakout
Return
-26.0%
Holding
+518%
Sharpe
0.07
Max DD
-77.4%
Win rate
27.1%
Trades
5,030
S284h

A 20-bar high, then a 3 ATR trailing stop rides the move.

Breakout With ATR Trail

Breakout
Return
-48.7%
Holding
+518%
Sharpe
-0.09
Max DD
-77.0%
Win rate
32.5%
Trades
4,147
S291d

Bollinger bands inside Keltner, then the first close above the band.

Squeeze Breakout

Breakout
Return
+98.5%
Holding
+602%
Sharpe
0.52
Max DD
-39.1%
Win rate
32.0%
Trades
753
S301d

Takes whichever comes first: an RSI dip or a 20-day high.

Dip or Breakout

Breakout
Return
-8.6%
Holding
+602%
Sharpe
0.05
Max DD
-45.0%
Win rate
40.8%
Trades
2,599
S311d

Buy RSI under 30, sell over 70.

RSI Reversion 30/70

Mean reversion
Return
+124%
Holding
+602%
Sharpe
0.53
Max DD
-49.1%
Win rate
66.0%
Trades
188
S321d

Buy a two-period RSI under 10, sell over 60.

RSI-2 Scalp

Mean reversion
Return
+174%
Holding
+602%
Sharpe
0.62
Max DD
-35.4%
Win rate
65.9%
Trades
2,455
S331d

The same dip, bought only above the 200 SMA.

RSI-2 With Trend Filter

Mean reversion
Return
+66.0%
Holding
+602%
Sharpe
0.47
Max DD
-31.4%
Win rate
63.7%
Trades
818
S341d

Short RSI over 75, cover under 50.

RSI Fade Short

Mean reversion
Return
-
Holding
+602%
Sharpe
0.00
Max DD
-30.9%
Win rate
43.8%
Trades
258
S351d

Buy the stochastic under 20, sell over 80.

Stochastic 20/80

Mean reversion
Return
+109%
Holding
+602%
Sharpe
0.48
Max DD
-65.4%
Win rate
62.7%
Trades
1,083
S361d

Buy a close under the lower band, exit at the mid-line.

Bollinger Dip

Mean reversion
Return
+147%
Holding
+602%
Sharpe
0.58
Max DD
-43.5%
Win rate
67.2%
Trades
829
S374h

Fades both bands back to the mid-line.

Bollinger Fade Long & Short

Mean reversion
Return
-
Holding
+518%
Sharpe
0.00
Max DD
-67.1%
Win rate
43.5%
Trades
10,704
S381d

Buy 2% below the 20 SMA, sell back at it.

Stretch Below SMA 20

Mean reversion
Return
+35.2%
Holding
+602%
Sharpe
0.34
Max DD
-67.2%
Win rate
69.0%
Trades
1,967
S391d

Buy CCI crossing back above -100, sell over +100.

CCI Reversion

Mean reversion
Return
-3.7%
Holding
+602%
Sharpe
0.18
Max DD
-56.4%
Win rate
64.3%
Trades
882
S401d

Buy the Money Flow Index under 20, sell over 80.

Money Flow Reversion

Mean reversion
Return
+170%
Holding
+602%
Sharpe
0.66
Max DD
-34.9%
Win rate
58.6%
Trades
181
S411d

Buy two standard deviations under the mean, sell back at it.

Z-Score Reversion

Mean reversion
Return
+147%
Holding
+602%
Sharpe
0.58
Max DD
-43.5%
Win rate
67.2%
Trades
829
S421d

Buy after three lower closes in a row, hold five bars.

Three Down Closes

Mean reversion
Return
+77.9%
Holding
+602%
Sharpe
0.44
Max DD
-57.2%
Win rate
52.8%
Trades
2,689
S431d

Buy a close in the bottom fifth of the bar, in an uptrend.

Close Near The Low

Mean reversion
Return
+29.7%
Holding
+602%
Sharpe
0.29
Max DD
-38.0%
Win rate
58.5%
Trades
1,753
S441d

Buy a heavy down bar on three times the volume, hold five bars.

Volume Climax Reversal

Mean reversion
Return
+25.6%
Holding
+602%
Sharpe
0.61
Max DD
-6.1%
Win rate
74.3%
Trades
109
S451h

Short a 60-bar high with RSI stretched: 3 ATR stop, 2R target, 48 bars at most.

Range High Fade

Mean reversion
Return
-92.5%
Holding
+413%
Sharpe
-1.23
Max DD
-93.1%
Win rate
39.0%
Trades
11,546
S464h

In an uptrend, buy the dip to the 21 EMA: 1.5 ATR stop, 3R target.

EMA 21 Pullback

Pullback
Return
+7.6%
Holding
+518%
Sharpe
0.18
Max DD
-48.9%
Win rate
30.4%
Trades
5,327
S471d

In an uptrend, buy RSI under 40 and sell over 60.

RSI Pullback

Pullback
Return
+4.5%
Holding
+602%
Sharpe
0.17
Max DD
-41.4%
Win rate
55.8%
Trades
197
S481d

A five-period RSI under 30, above the 200 SMA.

Dip Above SMA 200

Pullback
Return
+58.8%
Holding
+602%
Sharpe
0.43
Max DD
-33.2%
Win rate
63.7%
Trades
714
S491d

In an uptrend, buy a 1% dip under the 20 EMA.

Trend Pullback 1%

Pullback
Return
+6.0%
Holding
+602%
Sharpe
0.23
Max DD
-68.5%
Win rate
28.9%
Trades
440
S504h

In a downtrend, short the bounce to the 21 EMA: 1.5 ATR stop, 3R target.

Short The Rally

Pullback
Return
-57.3%
Holding
+518%
Sharpe
-0.29
Max DD
-70.4%
Win rate
29.9%
Trades
5,084
S511d

A trend entry with a fixed +6% target and -3% stop.

Bracket Trend

Risk managed
Return
-98.5%
Holding
+602%
Sharpe
-2.23
Max DD
-98.8%
Win rate
28.6%
Trades
13,249
S521d

An RSI dip with a fixed +4% target and -2% stop.

Bracket RSI

Risk managed
Return
-25.8%
Holding
+602%
Sharpe
-1.13
Max DD
-26.1%
Win rate
26.9%
Trades
1,310
S531d

A 20/50 trend entry; a 3 ATR trail decides the exit.

Trailing Stop Trend

Risk managed
Return
+65.5%
Holding
+602%
Sharpe
0.43
Max DD
-50.1%
Win rate
32.9%
Trades
413
S541d

A 20/50 cross with a 5% hard stop behind it.

Protective Stop

Risk managed
Return
+33.4%
Holding
+602%
Sharpe
0.31
Max DD
-32.9%
Win rate
12.2%
Trades
442
S551d

Above the 200 SMA, held until a 4 ATR trail is hit.

Chandelier Exit

Risk managed
Return
-5.6%
Holding
+602%
Sharpe
0.15
Max DD
-59.0%
Win rate
31.7%
Trades
319
S561d

Buy a 20-bar high and simply leave after ten bars.

Time Exit Momentum

Risk managed
Return
+224%
Holding
+602%
Sharpe
0.77
Max DD
-37.8%
Win rate
47.3%
Trades
1,099
S574h

Trend flips with a 2 ATR stop on every position.

ATR Stop Long & Short

Risk managed
Return
+44.1%
Holding
+518%
Sharpe
0.34
Max DD
-56.1%
Win rate
24.5%
Trades
5,635
S581d

Hold one day from the Sunday close. A test of a well-known crypto folk rule.

Sunday Close To Monday

Calendar
Return
-47.1%
Holding
+602%
Sharpe
-0.14
Max DD
-74.7%
Win rate
49.0%
Trades
6,964
S591d

Hold over the weekend only. Nothing but the calendar decides.

Friday To Monday

Calendar
Return
+37.9%
Holding
+602%
Sharpe
0.33
Max DD
-70.3%
Win rate
49.4%
Trades
6,963
S601h

Short a 60-bar high at market: 3 ATR stop, 2R target. The most stable row of our October study.

Hourly Edge Fade

Mean reversion
Return
-96.4%
Holding
+413%
Sharpe
-1.10
Max DD
-96.8%
Win rate
40.0%
Trades
18,076
S614h

Short when funding is two deviations above its own recent mean. The crowd is paying up to stay long.

Crowded Longs Fade

MarginPad data
Return
-30.2%
Holding
+1,034%
Sharpe
-0.32
Max DD
-38.6%
Win rate
52.7%
Trades
2,717
S624h

Long when funding is two deviations below its own recent mean. Shorts are paying to stay in.

Crowded Shorts Fade

MarginPad data
Return
+11.2%
Holding
+1,034%
Sharpe
0.18
Max DD
-35.5%
Win rate
51.6%
Trades
5,929
S634h

Long above the 200 SMA while funding is negative, so longs collect instead of paying.

Paid To Hold The Trend

MarginPad data
Return
+80.6%
Holding
+1,034%
Sharpe
0.58
Max DD
-26.1%
Win rate
19.7%
Trades
2,178
S641h

Buy after long liquidations hit four times their two-week hourly average: 3 ATR stop, 2R target.

Long Flush Bounce

MarginPad data
Return
-1.8%
Holding
+25.7%
Sharpe
-0.10
Max DD
-15.9%
Win rate
47.0%
Trades
521
S651h

Short after short liquidations hit four times their two-week hourly average: 3 ATR stop, 2R target.

Short Squeeze Fade

MarginPad data
Return
-16.8%
Holding
+25.7%
Sharpe
-2.06
Max DD
-25.0%
Win rate
40.7%
Trades
494
S661hbeat holding

Buy when open contracts drop 5% in four hours and price fell with them: leverage has just been cleared.

Open Interest Washout

MarginPad data
Return
-6.2%
Holding
-29.1%
Sharpe
-0.53
Max DD
-12.0%
Win rate
42.6%
Trades
371

Reading the numbers

Every card shows the same figures. Here is what each one tells you, and what it does not.

Return and Holding

Total gain over the test, beside what buying the same basket and doing nothing returned. The second number is the one to beat.

Sharpe

Return per unit of volatility. It lets you compare a calm strategy with a wild one. Below zero means holding cash did better.

Max drawdown

The largest fall from a peak. This is the loss you would have had to sit through to earn the return.

Win rate

The share of closed trades that made money. A high figure often hides small wins and the occasional large loss.

Profit factor

Gross profit divided by gross loss. 1.0 is breakeven. 2.0 means winners earned twice what losers lost.

Last 30%

The history is split in two. A rule that only worked in the first part did not work.

How the tests are run

Fills we would accept

A signal is read on a closed bar and fills at the next open, with slippage against the trade. A stop that gaps fills at the open. When one bar touches stop and target, the stop counts.

Real costs

The fee and slippage Paper Trade charges for that market, on both sides. Crypto also pays or earns the actual funding prints.

Picked winners, stated

The crypto basket is the first twenty perpetuals Binance ever listed, including the ones that faded. The stock basket is ten of today's large companies, so it carries that bias: read stock results relative to holding them, not as absolute returns.

No tuning

Textbook parameters, and a timeframe declared before the test. Change a number until the curve looks good and you have measured nothing.

Three implementations, one result

The engine and the Python download are compared trade by trade on every rule. Pine runs on TradingView's own fills, so its figures will differ a little.

What it leaves out

No leverage, no liquidation, no market impact, and no swap outside crypto. Forex and commodities come from daily public data. Treat small edges as noise.

These are research examples, not recommendations. Past results do not predict future ones, and nothing here is investment advice.

Questions

Where do these strategies come from?

Sixty-six readable rules: the textbook trend, breakout and mean-reversion systems, written in the same form, plus rules that read our own funding, liquidation and open interest data. Parameters are the textbook defaults, not values tuned to this history.

Are these results after costs?

Yes. Every fill pays the fee and slippage Paper Trade charges for that market, and crypto positions also pay or earn the real funding prints. Crypto is 0.055% a side plus 0.02% slippage.

Why does so little beat buy and hold?

Simple rules sit in cash for much of a rising market, so on total return holding is hard to beat. What a rule can offer is a smaller drawdown, which is why Sharpe and maximum drawdown sit beside the return. Every rule stays on the page whatever it did.

Can I run one on 3Commas?

Yes, for crypto, through TradingView: download the Pine file, add it to a chart, and point its alert at a 3Commas Signal Bot. The automate guide walks through it. There is no one-click import.

Is this investment advice?

No. This is research on past data. A backtest is evidence that an idea once worked, never a promise that it will again.