Hyperliquid Trend Following Strategy: MA Crossover Backtest
Trend following on Hyperliquid tested on 365 days of real data: SMA crossovers on BTC, ETH, SOL and HYPE, long/short vs long-only, with fees and funding.
The short version: we backtested a simple moving average crossover on Hyperliquid 4-hour candles for the last 365 days (snapshot 26 November 2026, 08:17 UTC), on BTC, ETH, SOL and HYPE, at 1x, with the tier-0 taker fee (0.045% per side) and real hourly funding. The fast version (SMA 10/30) lost money on all four coins, long/short, paying 5.1–6.2% of the account in fees over 86–94 trades. The slow version (SMA 50/200) turned a −30% to −48% buy-and-hold year on BTC, ETH and SOL into +38% to +102% by going short, but lost 12.5% on HYPE, the one coin that went up. Long-only trend filters had a smaller maximum drawdown than buy-and-hold in all 12 tests. Trend following on Hyperliquid can work, but only slowly, and the "best" settings change from coin to coin.
Trend following is the oldest systematic strategy in trading: be long when the market is going up, be flat or short when it is going down, and never try to predict the turn. It is also one of the most popular things people try to automate on Hyperliquid, because perps make shorting as easy as buying and the public API gives free candle and funding history. This guide explains how a moving average crossover works, runs it on a full year of real Hyperliquid data with every cost included, and shows what the numbers say about choosing the speed of the system, long/short versus long-only, and how to track a live trend strategy honestly.
What is a trend following strategy?
A trend following system has three parts: a signal that says whether the market is trending up or down, a rule that converts the signal into a position, and a fixed position size. The classic signal is a moving average crossover: compute a fast simple moving average (SMA) and a slow one; when the fast average is above the slow one the trend is "up", when it is below the trend is "down".
- Long/short version: long when fast > slow, short when fast < slow. You are always in the market.
- Long-only version (trend filter): long when fast > slow, flat in USDC otherwise. This is the version most spot investors use.
The edge, when there is one, comes from a few large trends paying for many small losing trades. That is why trend followers usually have a low win rate (often 25–40%) and still can be profitable: the average winner is much larger than the average loser. If that sounds unfamiliar, read our win rate and profit factor guide first.
How we tested it on Hyperliquid
All data comes from Hyperliquid's public info endpoint: candleSnapshot for 4-hour candles and fundingHistory for hourly funding. The rules were fixed before looking at results:
- Period: the last 365 days, 26 Nov 2025 to 26 Nov 2026 (2,189 four-hour bars per coin), with 200 extra bars before the start to warm up the averages.
- Coins: BTC, ETH, SOL and HYPE perps.
- Signals: SMA 10/30, 20/50 and 50/200 on 4h closes. On a 4h chart that is roughly 1.7/5 days, 3.3/8.3 days and 8.3/33 days.
- Execution: the signal is read at the close of each 4h bar and the position changes at that close price. Notional = 100% of equity (1x), compounding.
- Fees: 0.045% taker per side, Hyperliquid's base tier. A flip from long to short pays two sides (0.09% of notional). See the Hyperliquid fees guide.
- Funding: the real hourly funding rate for each coin, paid by longs and received by shorts when positive (and the opposite when negative).
- Not modelled: slippage beyond the fee, and the fact that a real trader may not be at the screen at every 4h close.
The script and its raw output are at the end of this article so anyone can reproduce or extend the test.
The market backdrop: a down year for majors, an up year for HYPE
Context matters more than anything else for a trend strategy. Over the test year BTC went from 86,936 to 60,497 (−30.4%, maximum drawdown 42%), ETH from 2,927.5 to 1,688.9 (−42.3%, drawdown 54%) and SOL from 136.63 to 70.81 (−48.2%, drawdown 58%). HYPE was the exception: 33.84 to 61.22 (+80.9%), with a 43% drawdown along the way. A 1x perp long would also have paid funding of roughly 5.6% (BTC), 6.0% (ETH), 1.1% (SOL) and 9.6% (HYPE) of notional over the year.
Results: long/short moving average crossover
| Coin | Buy & hold | SMA 10/30 | SMA 20/50 | SMA 50/200 |
|---|---|---|---|---|
| BTC | −30.4% (DD 42%) | −43.2% (DD 60%) | +1.3% (DD 35%) | +37.8% (DD 27%) |
| ETH | −42.3% (DD 54%) | −51.5% (DD 67%) | +13.9% (DD 38%) | +67.5% (DD 41%) |
| SOL | −48.2% (DD 58%) | −35.6% (DD 60%) | +24.8% (DD 43%) | +101.6% (DD 31%) |
| HYPE | +80.9% (DD 43%) | −35.1% (DD 61%) | +65.0% (DD 55%) | −12.5% (DD 64%) |
Returns are net of fees and funding, at 1x; DD is the maximum peak-to-trough drawdown of equity.
Three things stand out:
- The fast system was a disaster everywhere. SMA 10/30 lost 35–52% on every coin, worse than buy-and-hold on BTC, ETH and HYPE. Four-hour noise flips the averages constantly, so the strategy keeps buying after small rallies and shorting after small dips.
- Slow systems made money in the down year by shorting. SMA 50/200 caught the big BTC, ETH and SOL declines and finished +38%, +68% and +102%. Most of that is the short side, which a spot investor cannot do.
- The same slow system failed on HYPE. HYPE rose 81% but with sharp, deep pullbacks; SMA 50/200 got short near lows and long near highs often enough to lose 12.5% with a 64% drawdown. On HYPE the medium system (20/50) worked best. No single setting won on all four coins.
Results: long-only trend filter
| Coin | Buy & hold | SMA 10/30 | SMA 20/50 | SMA 50/200 |
|---|---|---|---|---|
| BTC | −30.4% (DD 42%) | −35.6% (DD 39%) | −13.5% (DD 27%) | +1.4% (DD 15%) |
| ETH | −42.3% (DD 54%) | −43.8% (DD 50%) | −13.3% (DD 30%) | +5.9% (DD 21%) |
| SOL | −48.2% (DD 58%) | −36.2% (DD 46%) | −9.7% (DD 28%) | +16.3% (DD 24%) |
| HYPE | +80.9% (DD 43%) | +22.7% (DD 37%) | +95.9% (DD 37%) | +41.0% (DD 32%) |
The long-only filter is the more honest comparison for most people, because it never takes a short. Its main benefit is risk, not return: in all 12 coin/setting combinations the maximum drawdown was lower than buy-and-hold. With SMA 50/200, BTC's worst drawdown fell from 42% to 15% and ETH's from 54% to 21%, while returns were roughly flat instead of −30% and −42%. On HYPE, the 20/50 filter even beat buy-and-hold (+95.9% vs +80.9%) with a smaller drawdown. The cost is visible too: the long-only 50/200 version only captured about half of HYPE's rise (+41%).
If you track drawdowns closely, our drawdown and equity curve guide explains why cutting a 54% drawdown to 21% matters more than it looks: a 54% loss needs +117% to recover, a 21% loss only +27%.
Why fast trend systems lose on Hyperliquid: fees and whipsaw
| Long/short | Trades (BTC / ETH / SOL / HYPE) | Win rate | Fees paid (% of starting equity) |
|---|---|---|---|
| SMA 10/30 | 94 / 92 / 88 / 86 | 25–34% | 5.1–6.2% |
| SMA 20/50 | 49 / 53 / 48 / 47 | 31–36% | 3.3–4.4% |
| SMA 50/200 | 13 / 13 / 13 / 15 | 31–54% | 1.0–1.2% |
A fast crossover on a 4h chart trades almost twice a week. At 0.045% per side, each flip costs 0.09% of notional, and around 90 trades a year add up to 5–6% of the account before any price loss. The bigger cost is whipsaw: in a choppy market every signal arrives after the move is already over, so the system repeatedly buys high and sells low. Win rates of 25–34% are normal for trend following, but only if the winners are large, and fast systems cut their winners short.
Funding was a minor factor for the long/short versions (between −0.2% and +2.6% of starting equity) because time spent long and short roughly offset. For the long-only versions it was a real drag: they paid 1.2–7.1% of starting equity in funding, with HYPE the highest. If you run a long-only trend filter for months, compare the perp with holding the spot asset, as explained in our spot vs perps guide and the funding rate PnL guide.
How to run a trend following strategy on Hyperliquid
Hyperliquid has no built-in "moving average" order, so there are three practical ways to trade the signal:
- Manual, on the 4h close. Put the two SMAs on your chart, check after each 4h close (00:00, 04:00, 08:00 UTC and so on) and change the position only on a confirmed cross. Slow settings (50/200) produced about one trade a month per coin, which is manageable by hand.
- A bot through the API. The same logic as the script below can place orders through the exchange endpoint. Use an API (agent) wallet that cannot withdraw funds, and read our trading bots guide and Python API guide before going live.
- Trailing stops as the exit. Hyperliquid's documentation lists a native trailing stop order for perps: it follows the best mark price since activation and sends a market order when price retraces by a set distance or percentage. Many trend traders combine an entry signal with a trailing stop exit instead of waiting for the opposite cross. Our order types guide covers how it compares with stop market and TP/SL orders.
Practical rules that follow from the test:
- Stay slow. On 4h candles, anything faster than 20/50 was eaten by fees and noise in this year.
- Use low leverage. The test is at 1x. A 41–64% drawdown at 1x would be a liquidation at 2–3x. Size with the position size calculator and read the Kelly criterion guide before adding leverage.
- Diversify across coins, not settings. The best setting was different on HYPE than on the majors. Running one robust setting on several coins is safer than picking the best past setting for each.
- Prefer maker fills when you can. Hyperliquid's base maker fee is 0.015% versus 0.045% taker; on a slow system you can often enter with a limit order near the close.
Limits of this backtest
- One year, one regime. The test year was a strong downtrend for BTC, ETH and SOL, which flatters long/short trend systems. In a sideways year the same rules can lose steadily.
- Picking the best setting after the fact is overfitting. SMA 50/200 looks great on three coins only because we can see the past; on HYPE it was the worst long/short setting.
- Closing prices only. Fills at the exact 4h close and no extra slippage are optimistic, especially for SOL and HYPE in fast markets.
- Not financial advice. This is an educational test of a public method with public data.
For more data to test your own variations, see the Hyperliquid historical data guide. Related strategy backtests: grid trading and DCA.
Track your trend strategy's real PnL with Hyperfolio
A backtest is a hypothesis; your wallet history is the result. Trend strategies are hard to judge by feel because most trades lose and the profit comes from a few big moves. Hyperfolio is a free, read-only portfolio tracker for Hyperliquid: paste a wallet address (no API keys, no wallet connection) and see realized and unrealized PnL, fees and funding paid, open perps and the equity curve, so you can check whether your live system behaves like the backtest. If you are opening a Hyperliquid account, the referral code HYPERFOLIO gives 4% off trading fees, which matters for any strategy that trades often.
FAQ
Does trend following work on Hyperliquid?
In our 365-day test it worked with slow settings and failed with fast ones. SMA 50/200 on 4h candles returned +38% to +102% long/short on BTC, ETH and SOL during a falling year, but −12.5% on HYPE. SMA 10/30 lost on all four coins.
What is the best moving average crossover for crypto?
There is no universal best. In this test 50/200 on 4h was best for BTC, ETH and SOL, and 20/50 was best for HYPE. Choosing a slow, reasonable setting and applying it to several coins is more robust than optimising one.
Should a trend strategy go short?
Shorting added most of the return in this down year, but it also caused the biggest losses on HYPE. The long-only version had a lower drawdown than buy-and-hold in every case, which makes it the more conservative choice.
How much do fees cost a trend following strategy on Hyperliquid?
At 0.045% taker per side, about 1% of starting equity per year for SMA 50/200 (13–15 trades) and 5–6% for SMA 10/30 (86–94 trades), in this test.
Does funding matter?
For long/short systems it mostly cancelled out (−0.2% to +2.6%). For long-only systems held on perps it cost 1.2–7.1% of starting equity over the year.
Can I use a trailing stop instead of the opposite crossover?
Yes. Hyperliquid's docs describe a native trailing stop for perps that follows the best mark price and triggers a market order on a set retracement. We did not backtest that exit here.
Reproduce the test
Python 3 with requests; no API key needed.
#!/usr/bin/env python3
"""Trend following on Hyperliquid with public data: 4h candles (last 365 days) and hourly funding.
SMA crossover, 1x notional, signals on bar close, taker fee 0.045% per side, funding charged hourly."""
import time, math, requests
from datetime import datetime, timezone
HL = "https://api.hyperliquid.xyz/info"
def info(body):
for _ in range(8):
try:
r = requests.post(HL, json=body, timeout=20).json()
if r: return r
except Exception: pass
time.sleep(6)
return []
FEE = 0.00045; H4 = 4*3_600_000
now = datetime.now(timezone.utc); end_ms = int(now.timestamp()*1000)
start_ms = end_ms - 365*86_400_000; warm_ms = start_ms - 200*H4
print("snapshot", now.strftime("%Y-%m-%d %H:%M UTC"), "| 365 days of 4h candles + hourly funding | taker 0.045%/side, 1x notional")
def funding(coin):
out, t = {}, start_ms
while t < end_ms:
page = info({"type": "fundingHistory", "coin": coin, "startTime": t})
if not page: break
for p in page: out[int(p["time"])] = float(p["fundingRate"])
nt = int(page[-1]["time"]) + 1
if nt <= t or len(page) < 2: break
t = nt
return out
def sma(x, n, i): return sum(x[i-n+1:i+1]) / n
def run(t, c, fbar, fast, slow, mode):
# mode: "ls" long/short, "long" long-only; position decided at close of bar i, held over bar i+1
eq, pos, peak, mdd = 1.0, 0, 1.0, 0.0
fees = fund = 0.0; trades = []; entry_eq = None; i0 = next(k for k in range(len(t)) if t[k] >= start_ms)
for i in range(i0, len(c)):
if pos:
r = c[i]/c[i-1]-1
eq *= 1 + pos*r
f = fbar.get(t[i], 0.0) * pos * eq; eq -= f; fund += f
peak = max(peak, eq); mdd = max(mdd, 1-eq/peak)
if i == len(c)-1: break
up = sma(c, fast, i) > sma(c, slow, i)
want = 1 if up else (-1 if mode == "ls" else 0)
if want != pos:
sides = abs(want-pos)
if pos and entry_eq is not None: trades.append(eq*(1-FEE)/entry_eq-1) # closing side's fee belongs to the trade
cost = FEE*sides*eq; eq -= cost; fees += cost
pos = want; entry_eq = eq if pos else None
if pos and entry_eq: trades.append(eq/entry_eq-1) # open position marked at last close
wins = sum(1 for x in trades if x > 0)
return eq-1, mdd, len(trades), wins, fees, fund
for coin in ["BTC", "ETH", "SOL", "HYPE"]:
bars = info({"type": "candleSnapshot", "req": {"coin": coin, "interval": "4h", "startTime": warm_ms, "endTime": end_ms}})
bars = [b for b in bars if int(b["t"]) + H4 <= end_ms]
t = [int(b["t"]) for b in bars]; c = [float(b["c"]) for b in bars]
fr = funding(coin); fbar = {}
for ts, r in fr.items():
k = ts - (ts % H4) # funding paid during the bar that opened at k, applied at that bar's close
fbar[k] = fbar.get(k, 0.0) + r
i0 = next(k for k in range(len(t)) if t[k] >= start_ms)
bh = c[-1]/c[i0]-1; pk = c[i0]; bdd = 0
for x in c[i0:]: pk = max(pk, x); bdd = max(bdd, 1-x/pk)
bhf = sum(r for ts, r in fr.items() if ts >= t[i0])
print(f"\n{coin}: {len(c)-i0} 4h bars {datetime.fromtimestamp(t[i0]/1000, timezone.utc):%Y-%m-%d} -> {datetime.fromtimestamp(t[-1]/1000, timezone.utc):%Y-%m-%d}: {c[i0]:,.5g} -> {c[-1]:,.5g}")
print(f" buy & hold (spot-like, no funding) {bh*100:+.1f}% maxDD {bdd*100:.0f}% | 1x perp long funding paid ~{bhf*100:+.1f}% of notional")
for fast, slow in [(10, 30), (20, 50), (50, 200)]:
for mode in ["ls", "long"]:
ret, mdd, n, w, fees, fund = run(t, c, fbar, fast, slow, mode)
print(f" SMA {fast}/{slow} {'long/short' if mode=='ls' else 'long-only '}: {ret*100:+6.1f}% maxDD {mdd*100:3.0f}% trades {n:3d} win {w/n*100 if n else 0:3.0f}% fees {fees*100:5.1f}% funding {fund*100:+5.1f}% (of start equity)")
Output at the snapshot time:
snapshot 2026-11-26 08:17 UTC | 365 days of 4h candles + hourly funding | taker 0.045%/side, 1x notional
BTC: 2189 4h bars 2025-11-26 -> 2026-11-26: 86,936 -> 60,497
buy & hold (spot-like, no funding) -30.4% maxDD 42% | 1x perp long funding paid ~+5.6% of notional
SMA 10/30 long/short: -43.2% maxDD 60% trades 94 win 33% fees 6.2% funding -0.0% (of start equity)
SMA 10/30 long-only : -35.6% maxDD 39% trades 47 win 30% fees 3.4% funding +2.2% (of start equity)
SMA 20/50 long/short: +1.3% maxDD 35% trades 49 win 31% fees 3.7% funding +0.2% (of start equity)
SMA 20/50 long-only : -13.5% maxDD 27% trades 24 win 38% fees 1.9% funding +2.7% (of start equity)
SMA 50/200 long/short: +37.8% maxDD 27% trades 13 win 38% fees 1.1% funding -0.2% (of start equity)
SMA 50/200 long-only : +1.4% maxDD 15% trades 6 win 33% fees 0.5% funding +2.7% (of start equity)
ETH: 2189 4h bars 2025-11-26 -> 2026-11-26: 2,927.5 -> 1,688.9
buy & hold (spot-like, no funding) -42.3% maxDD 54% | 1x perp long funding paid ~+6.0% of notional
SMA 10/30 long/short: -51.5% maxDD 67% trades 92 win 25% fees 5.1% funding +0.4% (of start equity)
SMA 10/30 long-only : -43.8% maxDD 50% trades 46 win 22% fees 3.0% funding +2.4% (of start equity)
SMA 20/50 long/short: +13.9% maxDD 38% trades 53 win 34% fees 4.4% funding +0.9% (of start equity)
SMA 20/50 long-only : -13.3% maxDD 30% trades 26 win 35% fees 2.1% funding +3.2% (of start equity)
SMA 50/200 long/short: +67.5% maxDD 41% trades 13 win 54% fees 1.0% funding +1.1% (of start equity)
SMA 50/200 long-only : +5.9% maxDD 21% trades 6 win 67% fees 0.5% funding +3.4% (of start equity)
SOL: 2189 4h bars 2025-11-26 -> 2026-11-26: 136.63 -> 70.808
buy & hold (spot-like, no funding) -48.2% maxDD 58% | 1x perp long funding paid ~+1.1% of notional
SMA 10/30 long/short: -35.6% maxDD 60% trades 88 win 32% fees 6.0% funding +1.5% (of start equity)
SMA 10/30 long-only : -36.2% maxDD 46% trades 44 win 27% fees 3.0% funding +1.2% (of start equity)
SMA 20/50 long/short: +24.8% maxDD 43% trades 48 win 33% fees 4.2% funding +2.2% (of start equity)
SMA 20/50 long-only : -9.7% maxDD 28% trades 24 win 38% fees 1.9% funding +1.4% (of start equity)
SMA 50/200 long/short: +101.6% maxDD 31% trades 13 win 31% fees 1.2% funding +2.6% (of start equity)
SMA 50/200 long-only : +16.3% maxDD 24% trades 6 win 17% fees 0.5% funding +1.8% (of start equity)
HYPE: 2189 4h bars 2025-11-26 -> 2026-11-26: 33.84 -> 61.215
buy & hold (spot-like, no funding) +80.9% maxDD 43% | 1x perp long funding paid ~+9.6% of notional
SMA 10/30 long/short: -35.1% maxDD 61% trades 86 win 34% fees 5.1% funding +0.1% (of start equity)
SMA 10/30 long-only : +22.7% maxDD 37% trades 43 win 28% fees 4.1% funding +5.6% (of start equity)
SMA 20/50 long/short: +65.0% maxDD 55% trades 47 win 36% fees 3.3% funding -0.0% (of start equity)
SMA 20/50 long-only : +95.9% maxDD 37% trades 23 win 39% fees 2.3% funding +6.4% (of start equity)
SMA 50/200 long/short: -12.5% maxDD 64% trades 15 win 40% fees 1.0% funding +0.3% (of start equity)
SMA 50/200 long-only : +41.0% maxDD 32% trades 7 win 57% fees 0.7% funding +7.1% (of start equity)
Try Hyperfolio for free
Track your Hyperliquid portfolio in real time with PnL, Smart Money, Markets, Perp Calculator, multi-venue portfolio and push alerts.
HYPERLIQUID
-4% feesTrade on Hyperliquid · 4% off fees
Hyperfolio is an independent app, free to use with no subscription. We're funded by Hyperliquid referrals, ad space and donations; we truly appreciate you trading through our link.
Free for you · keeps Hyperfolio running
Related articles
Hyperliquid Pairs Trading Strategy: 365-Day Test (2026)
Does pairs trading work on Hyperliquid? A z-score test on five perp pairs over 365 days with real fees and hourly funding: only ETH/BTC made money, and pairs with HYPE lost up to 82% (snapshot 2026-12-02).
GuideHyperliquid Scalping Strategy: Fees & Win Rate (2026)
Can you scalp profitably on Hyperliquid? Real round-trip costs at tier-0 fees, live spreads and depth, 1-minute volatility and a baseline bracket test on BTC, ETH, SOL and HYPE (snapshot 2026-12-01).
GuideHyperliquid Momentum Strategy: Rotation Backtest (2026)
Does crypto momentum work on Hyperliquid? A 365-day backtest of a weekly rotation across 20 high-volume perps: buy the top 3 (long-only) or long top 3 / short bottom 3, with 7, 28 and 90-day lookbacks, real fees and funding (snapshot 2026-11-30).
GuideHyperliquid Breakout Trading Strategy: Donchian Backtest (2026)
Do breakout strategies work on Hyperliquid? A 365-day backtest of Turtle-style Donchian channel breakouts (20/10 and 55/20) on BTC, ETH, SOL and HYPE, 4h and daily, long/short and long-only, with real fees and funding (snapshot 2026-11-29).
GuideHyperliquid Portfolio Rebalancing: Calendar vs Threshold Backtest
Does rebalancing a crypto portfolio pay off? A 365-day Hyperliquid backtest of buy-and-hold vs monthly, weekly and 5/10-point threshold rebalancing for BTC, ETH, SOL, HYPE and USDC portfolios, with real spot fees (snapshot 2026-11-28).
GuideHyperliquid Mean Reversion Strategy: RSI & Bollinger Backtest
Does mean reversion work on Hyperliquid? A 365-day backtest of RSI(14), RSI(2) and Bollinger Band (20, 2) rules on BTC, ETH, SOL and HYPE 4h candles, long/short and long-only, with real fees and funding (snapshot 2026-11-27).