OPEN-SOURCE SCRIPT
CM_VixFix_RSI_HMA200_TrailStop_vFinal

📌 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.
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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.