Trend
HyperliquidTrendingPerpetuals (leverage/short)Medium riskEMA fast/slow crossover: long in an uptrend, else flat
Track record
Return
+8.8%
Sharpe
1.65
Max DD
2.3%
AUM
$0
Created
2026-06-13
Investors
0
Pools
0
Settled days
0
Market fit
TrendingOne-directional moves that keep going- ✓Shines when the market has a clear direction and breakouts follow through
- ⚠Gets chopped up by whipsaws and false breakouts in sideways markets
Backtest (deterministic simulator)
Parameters: fast / slow / sizeBacktest curve is an example on a deterministic simulated price path — not real returns.
Core source
Source on GitHub ↗"""趋势跟随(Trend following)—— EMA 快慢线交叉。
思路:快线在慢线之上视为上升趋势(做多目标仓位),否则离场(目标 0)。这是最经典的动量/趋势范式。
参数:fast/slow(EMA 周期)、size(满仓目标数量)。适用:有持续方向的行情(永续合约可对称做空,纸盘仅多/空仓)。
扩展到做空:在真实永续连接器上把离场目标 0 改为 -size 即为多空对称的趋势策略。
"""
from __future__ import annotations
from ..base import StrategyBase
from ..context import StrategyContext
from ..indicators import ema
from ..registry import register
@register("趋势")
class Trend(StrategyBase):
description = "EMA 快慢线交叉:上升趋势做多、否则离场(纸盘多/空仓)。"
params = {"fast": 10, "slow": 30, "size": 5.0}
def __init__(self, fast: int = 10, slow: int = 30, size: float = 5.0) -> None:
self.fast = int(fast)
self.slow = int(slow)
self.size = float(size)
async def on_tick(self, ctx: StrategyContext) -> None:
sym = ctx.conn_symbol()
hist = await ctx.history(sym, self.slow + 2)
if len(hist) < self.slow:
return
fast = ema(hist, self.fast)
slow = ema(hist, self.slow)
if fast is None or slow is None:
return
target = self.size if fast > slow else 0.0
await ctx.target(sym, target, band=self.size * 0.1)
The full SDK and all strategies are MIT-licensed open source — backtest, paper-trade, or fork them directly.
Pools running this strategy
No pools are running this strategy yet — be the first to launch one.