OPEN-SOURCE SCRIPT

CM_VixFix_RSI_HMA200_TrailStop_vFinal

158
📌 CM_VixFix_RSI_HMA200_TrailStop – vFinal | BTC 30-Minute Strategy (Long & Short)

This strategy combines volatility-based market shock detection (Williams Vix Fix), trend confirmation (HMA200), and momentum filtering (RSI) to generate high-probability trade entries. It is engineered for BTC/USDT on the 30-minute timeframe, with carefully tuned parameters through extensive backtesting.

🎯 Core Components:
WVF (Williams Vix Fix): Identifies volatility spikes, acting as a proxy for oversold conditions or panic drops.

RSI (Relative Strength Index): Generates directional momentum signals, with separate thresholds for long and short entries.

HMA200: Filters trades based on the prevailing market trend. Trades are only allowed in the direction of HMA slope and position.

ATR-Based Trailing Stop Engine: Activates after a minimum profit threshold is hit. Combines dynamic trailing logic with a Hard Stop (maximum loss limit) to mitigate risk.

⚠️ Short-Side Challenges & Solutions
During development, the short-side trades exhibited a lower win rate, a common behavior in crypto bull-biased markets. To address this, we implemented:

RSI trigger reduced to 20 to capture only high-momentum sell-offs.

Dual confirmation: RSI must also be below its EMA(21) and price below EMA(100).

MaxBars filter (10 candles): Prevents multiple short entries in tight ranges or low-volatility zones.

As a result:

Short trades now yield a Risk/Reward ratio above 3.4

Average short trade profit is ~3x the average loss, making short entries valuable despite lower hit rate.

📊 Performance Summary (Backtest: BTCUSDT, 30-Min, July 2024–July 2025)
Metric Long Short Overall
Total Trades 401 50 451
Win Rate 49.6% 30.0% 47.4%
Avg PnL 311 USDT 1,229 USDT 413 USDT
Risk/Reward (Avg K/L) 1.05 3.48 1.16

🚨 Disclaimer
This strategy is not a plug-and-play black box. While signals are statistically validated, we strongly recommend using this tool in conjunction with:

Volume and time-of-day filters

Fundamental/macro overlays (especially around Fed announcements or CPI data)

A broader risk management framework

Note: This strategy has been optimized exclusively for BTC/USDT on the 30-minute timeframe. If applied to other assets or timeframes, recalibration is necessary.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。