OPEN-SOURCE SCRIPT
Telah dikemas kini Supertrend EMA Vol Strategy V5

### Supertrend EMA Strategy V5
**Overview**
This is a trend-following strategy designed for cryptocurrency markets like BTC/USD on daily timeframes, combining the Supertrend indicator for dynamic trailing stops with an EMA filter for trend confirmation. It aims to capture strong uptrends while avoiding counter-trend trades, with optional volume filtering for high-conviction entries and ATR-based stop-loss to manage risk. Ideal for long-only setups in bullish assets, it visually highlights trends with green/red bands and fills for easy interpretation. Backtested on BTC from 2024-2025, it shows potential for outperforming buy-and-hold in trending markets, but always use with proper risk management—past performance isn't indicative of future results.
**Key Features**
- **Supertrend Core**: Uses ATR to plot adaptive uptrend (green) and downtrend (red) lines, flipping on closes beyond prior bands for buy/sell signals.
- **EMA Trend Filter**: Entries require price above the EMA (default 21-period) for longs, ensuring alignment with the broader trend.
- **Volume Confirmation**: Optional filter only allows entries when volume exceeds its EMA (default 20-period), reducing false signals in low-activity periods.
- **Risk Controls**: Built-in ATR-multiplier stop-loss (default 2x) to cap losses; exits on Supertrend flips for trailing profits.
- **Visuals**: Green/red lines and highlighter fills for up/down trends, plus buy/sell labels and circles for signals.
- **Customizable Inputs**: Tweak ATR period (default 10), multiplier (default 3), EMA length, start date, long/short toggles, SL, and volume filter.
- **Alerts**: Built-in for buy/sell and direction changes.
**How to Use**
1. Add to your TradingView chart (e.g., BTC/USD 1D).
2. Adjust inputs: Start with defaults for trend-following; increase multiplier for fewer trades/higher win rate. Enable volume filter for volatile assets.
3. Monitor signals: Green "Buy" for long entries (if close > EMA and conditions met); red "Sell" for exits.
4. Backtest in Strategy Tester: Focus on equity curve, win rate (~50-60% in tests), and drawdown (<15% with SL).
5. Live Trading: Use small position sizes (1-2% risk per trade); combine with your analysis. Shorts disabled by default for bull-biased markets.
**Overview**
This is a trend-following strategy designed for cryptocurrency markets like BTC/USD on daily timeframes, combining the Supertrend indicator for dynamic trailing stops with an EMA filter for trend confirmation. It aims to capture strong uptrends while avoiding counter-trend trades, with optional volume filtering for high-conviction entries and ATR-based stop-loss to manage risk. Ideal for long-only setups in bullish assets, it visually highlights trends with green/red bands and fills for easy interpretation. Backtested on BTC from 2024-2025, it shows potential for outperforming buy-and-hold in trending markets, but always use with proper risk management—past performance isn't indicative of future results.
**Key Features**
- **Supertrend Core**: Uses ATR to plot adaptive uptrend (green) and downtrend (red) lines, flipping on closes beyond prior bands for buy/sell signals.
- **EMA Trend Filter**: Entries require price above the EMA (default 21-period) for longs, ensuring alignment with the broader trend.
- **Volume Confirmation**: Optional filter only allows entries when volume exceeds its EMA (default 20-period), reducing false signals in low-activity periods.
- **Risk Controls**: Built-in ATR-multiplier stop-loss (default 2x) to cap losses; exits on Supertrend flips for trailing profits.
- **Visuals**: Green/red lines and highlighter fills for up/down trends, plus buy/sell labels and circles for signals.
- **Customizable Inputs**: Tweak ATR period (default 10), multiplier (default 3), EMA length, start date, long/short toggles, SL, and volume filter.
- **Alerts**: Built-in for buy/sell and direction changes.
**How to Use**
1. Add to your TradingView chart (e.g., BTC/USD 1D).
2. Adjust inputs: Start with defaults for trend-following; increase multiplier for fewer trades/higher win rate. Enable volume filter for volatile assets.
3. Monitor signals: Green "Buy" for long entries (if close > EMA and conditions met); red "Sell" for exits.
4. Backtest in Strategy Tester: Focus on equity curve, win rate (~50-60% in tests), and drawdown (<15% with SL).
5. Live Trading: Use small position sizes (1-2% risk per trade); combine with your analysis. Shorts disabled by default for bull-biased markets.
Nota Keluaran
<h1>Supertrend EMA Strategy V29 - Trend-Following with Momentum Filters</h1><p>This strategy combines the Supertrend indicator for trend detection with EMA and DEMA for momentum filtering, RSI and volume for entry conviction. It's designed for trend-following trades, with built-in risk management via ATR-based stop-loss (SL) and take-profit (TP) levels, plus trailing stops. Long and short trades are optional, but the default is long-only for bullish bias.</p>
<h2>Key Features:</h2>
<ul>
<li><strong>Supertrend as Core Signal</strong>: Uses ATR to create dynamic trend bands. Buy on up-flip (close above lower band), sell on down-flip (close below upper band). Multiplier and ATR period adjustable for sensitivity.</li>
<li><strong>Momentum Filters</strong>: Entries require close above EMA (short-term, default 21) and DEMA (long-term, default 200) to avoid counter-trend trades.</li>
<li><strong>Conviction Checks</strong>: RSI (> default 50) for momentum, volume > EMA (default 20) for high-conviction.</li>
<li><strong>Re-Entry Logic</strong>: During uptrends, re-enter on pullbacks crossing above EMA if conditions met, to capture continuation rallies (e.g., Nov/Dec 2024 BTC pump).</li>
<li><strong>Risk Management</strong>: SL at 1 ATR below entry (default), TP at 3 ATR above (optional), trailing to Supertrend band after 1 ATR profit for locking gains.</li>
<li><strong>Timeframe Presets</strong>: Auto-adjusts for TF:
<ul>
<li>"Auto-1H/4H": ATR 10, multi 3 (swing trades).</li>
<li>"Auto-1D": ATR 14, multi 3 (daily trends, best for BTC).</li>
<li>"Auto-1W": ATR 20, multi 4 (long-term).</li>
<li>"Manual": Custom inputs.</li>
</ul>
</li>
<li><strong>Start Date Filter</strong>: User-selectable (default Jan 1, 2024) to focus backtests on recent data.</li>
</ul>
<h2>Backtesting Notes:</h2>
<p>Primarily backtested on BTCUSD (BITSTAMP or BINANCE), showing strong performance on daily TF with ~60% win rate, profit factor >4, but high DD on full sizing (use fractional in real trading). Less tested on other coins – adapt multi for volatility (e.g., higher for altcoins). Example: On BTC daily (2024-2025), ~+40% net (normalized), but DD ~100%+ on $1k full positions; aim 1-2% risk per trade.</p>
<p>Works best on trending assets like BTC in bull markets; choppy periods increase SL hits.</p>
<h2>Usage Tips:</h2>
<ul>
<li>For automation/bots: Integrate with alerts on buy/sell signals.</li>
<li>Customize: Disable RSI/vol for more trades, but test DD.</li>
<li>Risk: Always use proper sizing; backtest your TF/asset. Not financial advice – consult a professional.</li>
</ul>
Nota Keluaran
<h1>Supertrend EMA Strategy V29 - Trend-Following with Momentum Filters</h1><p>This strategy combines the Supertrend indicator for trend detection with EMA and DEMA for momentum filtering, RSI and volume for entry conviction. It's designed for trend-following trades, with built-in risk management via ATR-based stop-loss (SL) and take-profit (TP) levels, plus trailing stops. Long and short trades are optional, but the default is long-only for bullish bias.</p>
<h2>Key Features:</h2>
<ul>
<li><strong>Supertrend as Core Signal</strong>: Uses ATR to create dynamic trend bands. Buy on up-flip (close above lower band), sell on down-flip (close below upper band). Multiplier and ATR period adjustable for sensitivity.</li>
<li><strong>Momentum Filters</strong>: Entries require close above EMA (short-term, default 21) and DEMA (long-term, default 200) to avoid counter-trend trades.</li>
<li><strong>Conviction Checks</strong>: RSI (> default 50) for momentum, volume > EMA (default 20) for high-conviction.</li>
<li><strong>Re-Entry Logic</strong>: During uptrends, re-enter on pullbacks crossing above EMA if conditions met, to capture continuation rallies (e.g., Nov/Dec 2024 BTC pump).</li>
<li><strong>Risk Management</strong>: SL at 1 ATR below entry (default), TP at 3 ATR above (optional), trailing to Supertrend band after 1 ATR profit for locking gains.</li>
<li><strong>Timeframe Presets</strong>: Auto-adjusts for TF:
<ul>
<li>"Auto-1H/4H": ATR 10, multi 3 (swing trades).</li>
<li>"Auto-1D": ATR 14, multi 3 (daily trends, best for BTC).</li>
<li>"Auto-1W": ATR 20, multi 4 (long-term).</li>
<li>"Manual": Custom inputs.</li>
</ul>
</li>
<li><strong>Start Date Filter</strong>: User-selectable (default Jan 1, 2024) to focus backtests on recent data.</li>
</ul>
<h2>Backtesting Notes:</h2>
<p>Primarily backtested on BTCUSD (BITSTAMP or BINANCE), showing strong performance on daily TF with ~60% win rate, profit factor >4, but high DD on full sizing (use fractional in real trading). Less tested on other coins – adapt multi for volatility (e.g., higher for altcoins). Example: On BTC daily (2024-2025), ~+40% net (normalized), but DD ~100%+ on $1k full positions; aim 1-2% risk per trade.</p>
<p>Works best on trending assets like BTC in bull markets; choppy periods increase SL hits.</p>
<h2>Usage Tips:</h2>
<ul>
<li>For automation/bots: Integrate with alerts on buy/sell signals.</li>
<li>Customize: Disable RSI/vol for more trades, but test DD.</li>
<li>Risk: Always use proper sizing; backtest your TF/asset. Not financial advice – consult a professional.</li>
</ul>
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.