Backtested

200 EMA strategy: does it work? Backtested on the top 10 coins

OK. We ran the 200 EMA rule on the top 10 coins at once, each with an equal share of the account, as Hyperliquid perpetuals with fees, slippage and funding paid, and it cleared our bar on the portfolio in at least one run, or did well enough across all of them. The textbook version, 4h, long and short, returned +109.1% with a Sharpe of 0.95, against -7.7% for holding all 10 coins. Its best single coin was ETH 4h, long and short, with a Sharpe of 1.22.

By Keel Research Team
Updated November 17, 2026

Data through 2026-09-29 on Hyperliquid perpetuals, net of fees, slippage and funding

GradeOK

The rule run across the top 10 coins, equal weight (a pinned list): BTC, ETH, SOL, XRP, NEAR, ENA, UNI, DOGE, SUI and TAO.

Sharpe of the 200 EMA rule on the portfolio, by timeframe and direction
long onlylong and short
4h1.140.95
1d0.00-0.20

Sharpe of each portfolio run. Green cleared our bar, amber came close, and the outlined square is the textbook rule. Holding all 10 coins had a Sharpe of 0.42. Net of fees, slippage and funding.

The 200 EMA rules we tested

The 200 EMA is an exponential moving average of closing prices over the last 200 bars, and it is the line many traders use to split a chart into an uptrend and a downtrend. The rule here trades that split as written: long while a bar closes above the line, short while it closes below, and flip sides on the close that crosses it. On the daily chart the line spans the last 200 days, so it is the exponential cousin of the 200 day moving average, which most charts draw as a simple average. Below are the exact rules the backtest ran. Signals are read when a bar closes and orders fill at that close. The grade is over the long and short version, and the results show the other direction too. Every portfolio run trades the top 10 coins at once, each with 10% of the account. The coins are a fixed list (BTC, ETH, SOL, XRP, NEAR, ENA, UNI, DOGE, SUI and TAO), pinned for the whole test and the same on every page. The list is pinned rather than picked at each point in time because some large coins listed partway through the window and have no data for its start. Under the rules is the strategy itself, block by block. Fork it to change it and run your own backtest.

Entry
EMA 200 on closes (a 200-bar exponential moving average). Go long when the close is above the EMA 200. Go short when the close is below it.
Exit
Stop and reverse: a close on the other side of the EMA 200 closes the trade and opens the other side on the same bar.
Sizing
Each of the ten coins trades its own signal with 1/10 of the account and is always in the market once its first signal fires: each flip closes the trade and opens the other side. While a trade is open, if its share of the account drifts more than 25% from its tenth, it is trimmed or topped up back to the edge of that range. No stop.

The coins: The 10 Hyperliquid perps with the most traded dollar volume in the 90 days to 2026-09-29, among perps that traded for the whole test window, pinned: the same 10 coins are held for the whole test.

Not tested: a stop loss; a buffer or a second close to confirm a cross; the 200-day simple moving average: on the 1d chart this rule reads a 200-day EMA, and the 200-day SMA appears only as the trend filter fix.

The strategy behind the portfolio at 4h, long and short, block by block.

Fork this strategy

Opens it in Keel as your own draft, to change and backtest.

Configuration

Globalsconfig
target_timeframe4h
UniverseassetsManual · HL Perps · 10 symbols10 resolved
Executionorders
rebalanceBufferedbuffer_threshold0.25buffer_moderelative+1
Pipeline14 steps
PriceDataLoaderData Loader
ohlcvstore
Parallel2 branches
fast
ExtractSeriesSignal Transform
series_nameclose
slow
EWMAIndicator
window200
CrossoverSignal Composer
spreadstore
Parallel4 branches
long_in
spreadload
AboveThresholdFilterSignal Transform
threshold0
long_instore
short_in
spreadload
BelowThresholdFilterSignal Transform
threshold0
short_instore
long_out
spreadload
BelowThresholdFilterSignal Transform
threshold0
long_outstore
short_out
spreadload
AboveThresholdFilterSignal Transform
threshold0
short_outstore
Parallel2 branches
fast
long_inload
slow
short_inload
CrossoverSignal Composer
ThresholdCrossSignal Transform
upper0.5lower-0.5modesymmetric
entriesstore
TradeManagerPosition Manager
entriesentriespricesohlcv
Parallel2 branches
long_exit
Parallel2 branches
a
IsLongPosition Manager
b
long_outload
MaskAndSignal Composer
ExitPosition Manager
short_exit
Parallel2 branches
a
IsShortPosition Manager
b
short_outload
MaskAndSignal Composer
ExitPosition Manager
ExposurePosition Manager
EqualWeightSizerPosition Sizer
target_leverage1max_weight0.1

Results on the top 10 coins, equal weight

The rule ran on all 10 coins at once, each with an equal share of the account, on the 4h and 1d charts, in both directions. A portfolio of 10 coins is a better test than one coin. It trades many more times, so one lucky or unlucky coin cannot decide the result, and its drawdowns are usually smaller because each coin's bad stretch hits only its share of the account. It lifts a result only when the rule works across coins; a rule that works on one or two coins looks no better here. Running one rule over a whole portfolio in a single backtest is what Keel is built for. The long and short rows set the grade; the other direction shows whether any edge came from one side only. A run clears our bar when its Sharpe is clearly positive and it made enough round trips to trust. One slow average is a patient trend rule. It does well when a coin trends for months and stays on one side of the line, and it pays for that in sideways stretches, where price crosses the line again and again and every flip costs fees and slippage. Holding all 10 coins in equal weight is the bar to beat: over the same window it returned -7.7%. The textbook run made +109.1%, more than holding. Round trips count whole trades from entry to exit across every coin, fills count every order, and fees and funding are shown as a share of starting capital. Funding is what the positions paid: a positive figure is a cost, like fees, and a negative one means they received more funding than they paid.

Timeframe, sideSharpeTotal returnYearly returnWorst drawdownWin rateRound tripsFillsTime in marketFeesFunding paid
4h, long only1.14+107.1%+41.0%-39.2%15.0%7522,83577.7%7.7%+21.4%
4h, long and shorttextbook0.95+109.1%+41.6%-37.5%13.8%1,4997,38895.7%14.7%+14.4%
1d, long only0.00-6.0%-2.9%-33.5%10.8%9330553.3%0.5%+4.7%
1d, long and short-0.20-31.5%-16.4%-61.2%12.1%1831,03674.3%1.0%+0.5%

Holding all 10 coins instead

PortfolioSharpeTotal returnYearly returnWorst drawdown
Hold all 10, equal weight0.42-7.7%-3.6%-85.7%

Holding means a long perpetual position on each coin for the whole window, not spot. Like any perp long it pays funding out of the account while it is open, and these hold figures include that cost, so a hold can end near flat after a deep drawdown.

Coin by coin

The same rule on each coin alone, with the whole account on that one coin, at 4h and 1d, long and short. Read this if you trade one coin. Expect more spread here than in the portfolio: fewer trades per coin means more room for luck either way. The best single coin was ETH 4h, long and short, with a Sharpe of 1.22. On its own, the rule beat holding the coin on half of them at 4h.

The 200 EMA rule on each coin alone, long and short
Coin4h Sharpe4h return4h round trips1d Sharpe1d return1d round tripsHold the coin
BTC0.22+3.8%1490.17+1.4%19+6.6%
ETH1.22+188.5%1200.11-16.8%12-22.7%
SOL0.61+47.9%1520.01-24.9%18-36.7%
XRP0.52+29.6%175-0.32-45.4%17+98.3%
NEAR0.18-31.7%168-0.09-54.8%22+0.9%
ENA0.87+117.0%1420.53+7.6%4-5.1%
UNI0.20-31.1%177-0.10-62.6%18+3.8%
DOGE0.98+157.4%132-0.38-59.6%18-65.5%
SUI0.87+121.5%133-0.20-57.7%17-22.1%
TAO0.14-43.2%151lost more than 80%-87.9%38-34.0%

Holding means a long perpetual position on each coin for the whole window, not spot. Like any perp long it pays funding out of the account while it is open, and these hold figures include that cost, so a hold can end near flat after a deep drawdown.

Equity curve

The first chart is the textbook run, the portfolio at 4h, long and short; the second is the best portfolio run, the portfolio at 4h, long only. Each line starts from the same balance as holding all 10 coins in equal weight, and the drawdown underneath shows how far the rule fell from its last high. A rule can end ahead and still be hard to hold through its worst stretch.

The textbook rule: the portfolio at 4h, long and short

200 EMA rule, 10 coinsHold all 10 coinsDrawdown

The best run: the portfolio at 4h, long only

200 EMA rule, 10 coinsHold all 10 coinsDrawdown

Does a simple fix help?

Two of the most common changes traders make to a rule like this, each run on the same portfolio at 4h and 1d, long and short. Each fix gets its own grade by the same rules as the page grade. Neither fix lifts the grade above OK. A fix that helps on one window is a lead to test further, not a finding.

Vol-targeted sizing

OK

Vol-targeted sizing keeps the rule's entries and exits and changes only the size. Each trade is sized from the coin's average true range, so that a move of one average true range costs the same small share of the account on every coin. A calm coin gets a bigger position and a wild one a smaller one, with a cap on any one coin. It raised the Sharpe on one timeframe and not the other. With it, the rule grades OK.

RunSharpeAs writtenTotal returnWorst drawdownRound trips
4h, long and short1.210.95+124.2%-27.3%1,499
1d, long and short-0.21-0.20-19.7%-47.6%183

200-day trend filter

OK

The 200-day trend filter keeps the rule's entries but lets a long through only while the coin closes above its 200-day simple moving average, and a short only while it closes below. Sizing stays the same. It follows the old rule of not trading against the big trend. The average needs that much price history before its first reading, so the filter sits out the start of the window and its runs trade over a shorter period than the rule as written. Keep that in mind when you compare the two. It did not raise the Sharpe on either timeframe. With it, the rule grades OK.

RunSharpeAs writtenTotal returnWorst drawdownRound trips
4h, long and short0.480.95+26.5%-41.8%656
1d, long and short-0.23-0.20-34.0%-62.2%146

Best 200 EMA settings for crypto

We ran every combination of EMA period (50, 100, 200, 300) on the portfolio, on the 4h chart, long and short, and kept everything else the same. Each square is one full backtest of all 10 coins, coloured by Sharpe, and the outlined square is the textbook setting. The setting to trust is one whose neighbours also did well. A lone bright square in a dark grid is usually luck, and a grid run on a whole portfolio is harder to fool than one run on a single coin.

Sharpe, from losing (red) to strong (green)“works” and “partly” mark settings that cleared the bar, or nearly didthe default settingwiped out

Top 10 coins, 4h, long and short

On the portfolio, the good results sit on a plateau: settings near the best one did about as well, so the result does not hinge on one exact choice. The textbook setting ranks 2nd of 4 by Sharpe. The best square was EMA period 300, with a Sharpe of 0.98, and the worst was EMA period 50, at 0.01.

200 EMA settings on the top 10 coins: Sharpe for each combination
EMA periodSharpe
500.01
1000.80
2000.95partly
3000.98partly · best

Settings that held up in this test

These settings kept a positive Sharpe after costs and sit next to each other in the grid, so the result does not rest on one exact choice.

Every setting in the grid had a positive Sharpe, so in this test the rule did not depend on its settings.

The textbook setting is one of them.

This grid ran over one window on the portfolio, on the 4h chart, long and short. What held up there is evidence about this test, not a promise about the next one, and the picture can differ on another timeframe or coin.

SettingSharpeReturnMax drawdown
EMA period 3000.98+116.5%-39.9%
EMA period 2000.95+109.1%-37.5%

What this test does not tell you

A backtest answers a narrow question: what this exact rule did on these coins over this window. Read these before you trust any number on this page.

  • The test covers 2024-08-15 to 2026-09-29, one stretch of the crypto market. A rule that worked here can fail in the next stretch, so every result on this page is "in this test", not a forecast.
  • These are Hyperliquid perpetual futures, not spot coins. Every open position paid or earned funding, and the results include it, which most published backtests leave out.
  • Costs: every fill pays a 4.5 bp fee and 4.5 bp of slippage, so a round trip costs 18 bp, and every open position pays or earns funding each hour. A rule that trades often pays these many times over, which is why the fee column matters as much as the Sharpe.
  • Orders fill at the close of the bar that gives the signal. Intrabar stops, limit orders and wicks that touch a level and come back are not modelled.
  • The textbook portfolio run made 1499 round trips across its coins: enough trades for the result to mean something, though one window is still one window. A single coin makes far fewer, so read the coin-by-coin table with more caution.
  • The coin list is fixed for the whole window. Coins that were large at the end of the window may have been smaller at the start, so a pinned list leans a little toward coins that did well.
  • Sizing: Each of the ten coins trades its own signal with 1/10 of the account and is always in the market once its first signal fires: each flip closes the trade and opens the other side. While a trade is open, if its share of the account drifts more than 25% from its tenth, it is trimmed or topped up back to the edge of that range. No stop. This tests the rule on its own. A trader who adds judgment, other filters or a different position size is running a different strategy.

How Sharpe and drawdown are measured: the Sharpe calculator and the drawdown calculator. Why the best square in a grid flatters itself: overfitting in crypto backtests.

Test it yourself

Take the rule into Keel, or hand it to your AI assistant, and change the coins, the timeframe or the settings. A result you reproduce and then break on purpose is worth more than any single table.

Fork this strategy in Keel

Opens the textbook rule on all 10 coins, 4h, long and short, as your own draft, ready to change and backtest.

Fork this strategy in Keel

Ask your agent

Add Keel to Claude or ChatGPT from its listing, or connect another assistant, then paste:

Backtest the 200 EMA strategy from usekeel.io/strategies/backtested/200-ema on an equal-weight basket of BTC, ETH, SOL, XRP, NEAR, ENA, UNI, DOGE, SUI and TAO at 4h with Keel

200 EMA trading bot: run this rule live

A bot trades the rule exactly as written, so it inherits this test's result: the 200 EMA rule graded OK here. Running it as a bot takes three steps in Keel, and you can stop after any of them.

  1. Fork it

    Fork the textbook rule into Keel as your own draft. Change the coins, the timeframe or the settings, and backtest your version with fees, slippage and funding before you trust it.

    Fork this strategy
  2. Paper trade it

    Run it forward on live Hyperliquid prices with simulated money, with fees and funding charged. You need no wallet for this, and no money is at risk, so you can see whether your version trades the way its backtest did.

    How paper trading works
  3. Run it from your own Hyperliquid account

    Connect the wallet you use on Hyperliquid and approve an agent wallet: a separate key that can place trades for you but can never withdraw or transfer funds. Your money stays in your own account. Keel runs the strategy on its servers and it decides after each candle closes, so nothing has to stay open on your computer. One strategy runs per account and trades all of it, and Keel shows the amount it needs before you go live. Pause it or revoke the agent wallet whenever you like; that never moves your money.

    How a Keel trading bot works

Building, backtesting and paper trading are free to start, and the free plan can also run a strategy live. The pricing page has the fees and limits.

FAQ

200 EMA strategy questions

Does the 200 EMA strategy work in crypto?

OK, in this test. Run on the top 10 coins in equal weight, after fees, slippage and funding, it cleared our bar on the portfolio in at least one run, or did well enough across all of them. The textbook version, 4h, long and short, returned +109.1% with a Sharpe of 0.95, against -7.7% for holding all 10 coins. The best portfolio run was 4h, long only, with a Sharpe of 1.14 and a total return of +107.1%. Whether that is worth trading depends on the timeframe and the coin: the results show every run, and the settings grid shows whether the good runs depend on one exact setting.

What are the best 200 EMA settings for crypto?

On the portfolio, on the 4h chart, the settings that held up in this test were EMA period 300; EMA period 200. Each kept a positive Sharpe after costs and sits next to others that did. The best was EMA period 300, with a Sharpe of 0.98. The textbook setting ranked 2nd of 4 by Sharpe. The textbook setting is one of the settings that held up. One window is still one window, so treat them as a place to start testing, not the settings to use.

Does the 200 EMA strategy work on Bitcoin?

On BTC 4h, long and short, with the whole account on Bitcoin, the rule had a Sharpe of 0.22 and returned +3.8%, against +6.6% for holding BTC over the same window, net of fees, slippage and funding. One coin is a small sample, so the portfolio result above is the better guide; the coin-by-coin table shows BTC next to the other coins.

Is the 200 EMA the same as the 200 day moving average?

Only on a daily chart, and only roughly. The number counts bars, so on a four-hour chart the 200 EMA covers about a month of trading, not 200 days. The 200 day moving average that markets quote is usually a simple average, which weights every day the same and turns later than the exponential line. This page tests the exponential line on four-hour and daily bars, and its trend filter fix uses the simple daily average, so you can see both readings on the same coins.

How realistic is this backtest?

Closer than most published backtests. Every fill pays fees and slippage, and every open position pays or earns funding, as a real perpetual futures position does. Orders fill at the close of the signal bar, so the test never buys at a price the chart only touched. It covers one window, so treat the result as evidence, not a promise. How it works explains the engine in depth.