OPEN-SOURCE SCRIPT

BTC/USD Enhanced High-Growth Impulse Strategy for 30-Min Chart

Overview:
This script combines trend-following and momentum-based entry/exit signals, optimized for BTC/USD on a 30-minute timeframe. It integrates Exponential Moving Averages (EMAs), Supertrend, and Average True Range (ATR) to identify potential trade opportunities with volatility-adjusted risk management.

Indicators Explained:
Exponential Moving Averages (EMAs):

21 EMA (Short-term): Identifies fast-moving price trends.
50 EMA (Medium-term): Captures broader momentum.
200 EMA (Long-term): Filters major market direction.
These EMAs work together to signal trend crossovers, indicating shifts between bullish and bearish phases.

Supertrend:
This indicator highlights momentum and volatility. A positive Supertrend indicates strong upward momentum, while a negative Supertrend signals bearish momentum.

Average True Range (ATR):
ATR helps calculate dynamic stop loss and take profit levels. By adjusting exits to match market volatility, the strategy can respond to both fast-moving and consolidating conditions.

Entry & Exit Conditions:

Long Entry:
The 21 EMA crosses above the 50 EMA.
The price is above the Supertrend line, confirming bullish momentum.
ATR volatility is above its 50-period moving average to filter out low-volatility conditions.

Trade Exit:
A stop loss is set at 2 ATR below the entry price, and the take profit is set at 6 ATR above.
Short Entry:

The 21 EMA crosses below the 50 EMA.
The price is below the Supertrend line, confirming bearish momentum.
ATR volatility exceeds the 50-period moving average.

Trade Exit:
A stop loss is set at 2 ATR above the entry price, and take profit at 6 ATR below.
Default Strategy Settings:
Position Size: 2% of equity per trade (configurable)
Risk Management: Dynamic ATR-based stop loss and take profit
Indicators:
EMA 21, 50, and 200 for trend detection
Supertrend (factor: 3, ATR period: 10) for momentum confirmation
ATR for volatility-based risk control
Performance Metrics:
Optimal Timeframe: 30-minute chart
Backtesting Results:
Percent Profitable: 62%
Profit Factor: 1.136
Average Trade Return: 0.14%
Max Drawdown: 0.58% of equity
Total Trades: 35
The strategy demonstrates stable performance across both trending and volatile market conditions. Keep in mind that past performance does not guarantee future results.

Notes for Traders:
Test this strategy with realistic commission and slippage to ensure results are accurate for your trading environment.
While the strategy is designed for BTC/USD on the 30-minute timeframe, it may also perform well on other high-liquidity cryptocurrencies and timeframes with additional optimization.
Avoid over-leveraging. We recommend allocating 1-2% equity per trade for risk control.

Plot Information:
The script visualizes key indicators:
EMA 21 (blue), EMA 50 (red), EMA 200 (green)
Supertrend (orange)
Green/red background shading highlights bullish and bearish entry conditions.

Disclaimer:
This script is for educational purposes only. Use it as part of a comprehensive trading plan that includes proper risk management. Trading involves significant risk, and no strategy can predict future price movements with certainty.

Disclaimer