ETH/BTC ZScore MR Backtest (Simple)

一、这是个什么策略?
这是一个 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.
一、这是个什么策略?
这是一个 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.
一、这是个什么策略?
这是一个 ETH 与 BTC 的相对价值(均值回归)策略。不赌市场涨跌,只判断 ETH 相对 BTC 是否“偏强或偏弱”,当偏离足够大但还没失控时,押一次相对价格回归。以下是信号含义
S —— Short ETH / Long BTC(开仓信号)
L —— Long ETH / Short BTC(开仓信号)
X —— 回归完成,平仓
ADV——方向性止损(判断方向错误)
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️⃣ 回归离场(盈利)
做多(L):当 Z ≥ −0.45 → 平仓
做空(S):当 Z ≤ +0.45 → 平仓
2️⃣ 方向性止损(ADV)
做多后,Z 比开仓时更负 1.6 → ADV
做空后,Z 比开仓时更正 1.6 → ADV
2️⃣ 极端止损(SLZ)
当 |Z| ≥ 3.5,认为进入结构性行情,立刻止损,不硬扛
六、冷却规则(风控核心)
每次触发 SLZ或 ADV,强制冷却 24 小时,冷却期间 不允许任何新开仓,避免在趋势或高波动环境中连续亏损。
七、使用建议(非常重要)
这是统计策略,不是预测工具,不适合加仓、摊平。更适合:对冲执行、低手续费 / DEX 环境或刷交易量场景
八、一句话总结
当 ETH/BTC 的相对定价明显异常但尚未失控时,押一次它回到正常区间。
ETH / BTC Relative Value Strategy – Quick Guide
1. What is this strategy?
This is a relative value (mean-reversion) strategy between ETH and BTC.
It does not predict market direction or bet on overall price trends.
Instead, it focuses purely on whether ETH is relatively overvalued or undervalued versus BTC.
When the deviation is large but not structurally broken, the strategy takes a position expecting relative prices to revert.
Signal legend:
S — Short ETH / Long BTC (entry)
L — Long ETH / Short BTC (entry)
X — Mean reversion completed, exit
ADV — Directional stop (thesis invalidated)
SLZ — Extreme stop (structural regime shift)
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
Lookback window: 4 days (96 bars on 1H)
Z represents how many “standard deviations” the current relative price is away from its normal range.
3. Entry conditions (most important)
Trades are allowed only in 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 mean-revertible zone in between
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
1️⃣ Mean-reversion exit (profit taking)
Directional exits:
Long (L): exit when Z ≥ −0.45
Short (S): exit when Z ≤ +0.45
This indicates the relative mispricing has largely normalized.
2️⃣ Directional stop (ADV)
Used to cut losses when the original thesis is clearly wrong:
Long: Z moves 1.6 units more negative than the entry Z
Short: Z moves 1.6 units more positive than the entry Z
This is not a volatility stop — it is a thesis failure stop.
3️⃣ Extreme stop (SLZ)
When:
|Z| ≥ 3.5
The market is considered to have entered a structural / trend-dominated regime.
Positions are closed immediately. No averaging down.
6. Cooldown rule (risk control core)
After any ADV or SLZ, the strategy enforces a 24-hour cooldown:
No new positions allowed
Prevents repeated losses during trending or high-volatility regimes
7. Usage notes (important)
This is a statistical strategy, not a predictive one.
No averaging down
No martingale
Best suited for:
Hedged execution
Low-fee or DEX environments
Volume-based or incentive-driven trading setups
8. One-line summary
When ETH/BTC becomes meaningfully mispriced but not structurally broken,
take one controlled bet on mean reversion — and step aside when the regime is wrong.
Skrip jemputan sahaja
Hanya pengguna disahkan oleh penulis boleh mengakses skrip ini. Anda perlu memohon dan mendapatkan kebenaran untuk menggunakannya. Keizinan selalunya diberikan selepas pembayaran. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi xxky9536 secara terus.
TradingView TIDAK menyarankan pembayaran atau penggunaan skrip kecuali anda mempercayai sepenuhnya penulis dan memahami bagaimana ia berfungsi. Anda juga boleh menjumpai alternatif sumber terbuka dan percuma yang lain di dalam skrip komuniti kami.
Arahan penulis
Penafian
Skrip jemputan sahaja
Hanya pengguna disahkan oleh penulis boleh mengakses skrip ini. Anda perlu memohon dan mendapatkan kebenaran untuk menggunakannya. Keizinan selalunya diberikan selepas pembayaran. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi xxky9536 secara terus.
TradingView TIDAK menyarankan pembayaran atau penggunaan skrip kecuali anda mempercayai sepenuhnya penulis dan memahami bagaimana ia berfungsi. Anda juga boleh menjumpai alternatif sumber terbuka dan percuma yang lain di dalam skrip komuniti kami.