ETH/BTC ZScore MR Backtest (Simple)ETH / BTC 相对价值策略简明使用说明(Quick Guide)
一、这是个什么策略?
这是一个 ETH 与 BTC 的相对价值(均值回归)策略。不赌市场涨跌,只判断 ETH 相对 BTC 是否“偏强或偏弱”,当偏离足够大但还没失控时,押一次相对价格回归。以下是信号含义
S —— Short ETH / Long BTC(开仓信号)
L —— Long ETH / Short BTC(开仓信号)
X —— 回归完成,平仓
SLZ —— 极端止损(非常重要)
COOL —— 冷却期(禁止交易)
二、核心指标
策略只用一个指标:Z-score
Z = (当前 ETH/BTC − 最近均值) / 最近标准差
均值 / 标准差:最近 4 天(1H × 96 根)
Z 表示当前相对定价偏离“正常区间”多少倍
三、开仓条件(最重要)
只在下面这个区间才允许开仓:
1.5 ≤ |Z| < 3.5
含义:
|Z| < 1.5 → 正常波动,不交易
|Z| ≥ 3.5 → 极端状态,不交易
只做中间“可回归区间”
四、方向逻辑
Z ≥ +1.5
→ ETH 相对 BTC 过强
→ 空 ETH / 多 BTC
Z ≤ −1.5
→ ETH 相对 BTC 过弱
→ 多 ETH / 空 BTC
五、离场规则
1️⃣ 回归离场(盈利)
当 |Z| ≤ 0.45,相对定价修复,直接平仓
2️⃣ 极端止损(SLZ)
当 |Z| ≥ 3.5,认为进入结构性行情,立刻止损,不硬扛
六、冷却规则(风控核心)
每次触发 SLZ,强制冷却 24 小时,冷却期间 不允许任何新开仓,避免在趋势或高波动环境中连续亏损。
七、使用建议(非常重要)
这是统计策略,不是预测工具,不适合加仓、摊平。更适合:对冲执行、低手续费 / DEX 环境或刷交易量场景
八、一句话总结
当 ETH/BTC 的相对定价明显异常但尚未失控时,押一次它回到正常区间。
1. What is this strategy?
This is an ETH vs BTC relative value (mean reversion) strategy.
It does not speculate on overall market direction.Instead, it focuses solely on whether ETH is relatively too strong or too weak versus BTC.When the relative deviation is large enough—but not yet out of control—the strategy bets on a reversion back to normal.
Signal meanings:
S — Short ETH / Long BTC (entry)
L — Long ETH / Short BTC (entry)
X — Mean reversion completed, exit
SLZ — Extreme stop-loss (critical)
COOL — Cooldown period (no trading allowed)
2. Core indicator
The strategy uses only one indicator: Z-score
Z = (Current ETH/BTC − Recent Mean) / Recent Standard Deviation
Mean / standard deviation are calculated over the last 4 days (96 × 1H bars)
Z measures how many “normal volatility units” the current relative price has deviated from its recent equilibrium
3. Entry conditions (most important)
Positions are opened only within the following range:
1.5 ≤ |Z| < 3.5
Meaning:
|Z| < 1.5 → normal noise, no trade
|Z| ≥ 3.5 → extreme regime, no trade
Only trade the middle zone where mean reversion is statistically plausible
4. Direction logic
Z ≥ +1.5
→ ETH is relatively overvalued vs BTC
→ Short ETH / Long BTC
Z ≤ −1.5
→ ETH is relatively undervalued vs BTC
→ Long ETH / Short BTC
5. Exit rules
There are only two exits:
1️⃣ Mean reversion exit (profit-taking)
When |Z| ≤ 0.45
Relative pricing has normalized → exit both legs
2️⃣ Extreme stop-loss (SLZ)
When |Z| ≥ 3.5
Indicates a potential structural or trending regime
Exit immediately; do not average down
6. Cooldown rule (risk control core)
Every time SLZ is triggered
A mandatory 24-hour cooldown starts
No new positions are allowed during cooldown
This prevents repeated losses in trending or high-volatility regimes.
7. Usage notes (very important)
This is a statistical strategy, not a prediction tool
Not suitable for martingale, averaging down, or discretionary overrides
Best suited for:
Hedged execution
Low-fee / DEX environments
Volume or point-farming scenarios
8. One-sentence summary
When ETH/BTC relative pricing becomes clearly abnormal—but not yet extreme—
the strategy takes a measured bet on reversion back to equilibrium.
Pine Script® strategy






















