This strategy is an adaptive trading system that integrates multiple trading methods, combining trend following, range trading, and breakout trading strategies to adapt to different market conditions. The system uses technical indicators such as EMA, RSI, and OBV for market state determination, combines ADX indicator for trend strength confirmation, and implements ATR-based dynamic stop-loss for risk control. The strategy’s uniqueness lies in allowing users to freely select which trading strategies to enable and precisely control risk for each trade through money management parameters.
The strategy contains three main trading modules:
Each module employs ATR-based dynamic stop-loss and sets profit targets based on user-defined risk-reward ratios. The system uses a volume filter to ensure trades occur in adequately liquid conditions.
Recommended risk control measures:
Enhance Market Volatility Adaptation:
Improve Strategy Switching Mechanism:
Strengthen Money Management System:
Optimize Signal Filtering:
This strategy achieves adaptive trading across different market environments through multi-strategy combination and strict risk control systems. The modular design allows flexible configuration, while comprehensive money management mechanisms ensure trading safety. Through continuous optimization and improvement, the strategy shows promise for stable performance across various market conditions. For enhanced robustness in live trading, it is recommended to adopt conservative money management approaches and regularly evaluate and adjust strategy parameters.
/*backtest start: 2024-01-01 00:00:00 end: 2024-11-11 00:00:00 period: 1d basePeriod: 1d exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("Ceulemans Trading Bot met ADX, Trendfilter en Selecteerbare Strategieën", overlay=true) // Parameters voor indicatoren emaLength = input.int(50, title="EMA Lengte") rsiLength = input.int(14, title="RSI Lengte") obvLength = input.int(20, title="OBV Lengte") rsiOverbought = input.int(65, title="RSI Overbought") rsiOversold = input.int(35, title="RSI Oversold") atrLength = input.int(14, title="ATR Lengte") adxLength = input.int(14, title="ADX Lengte") adxSmoothing = input.int(14, title="ADX Smoothing") // Voeg de smoothing parameter toe // Money Management Parameters capitalRisk = input.float(1.0, title="Percentage van kapitaal per trade", step=0.1) riskReward = input.float(3.0, title="Risk/Reward ratio", step=0.1) stopLossMultiplier = input.float(1.2, title="ATR Stop-Loss Multiplier", step=0.1) // Strategieën selecteren (aan/uit schakelaars) useTrendTrading = input.bool(true, title="Gebruik Trend Trading") useRangeTrading = input.bool(true, title="Gebruik Range Trading") useBreakoutTrading = input.bool(true, title="Gebruik Breakout Trading") // Berekening indicatoren ema = ta.ema(close, emaLength) rsi = ta.rsi(close, rsiLength) obv = ta.cum(ta.change(close) * volume) atr = ta.atr(atrLength) [diplus, diminus, adx] = ta.dmi(adxLength, adxSmoothing) // ADX berekening met smoothing avgVolume = ta.sma(volume, obvLength) // Huidige marktsituatie analyseren isTrending = close > ema and adx > 25 // Trend is sterk als ADX boven 25 is isOversold = rsi < rsiOversold isOverbought = rsi > rsiOverbought isBreakout = close > ta.highest(close[1], obvLength) and obv > ta.cum(ta.change(close[obvLength]) * volume) isRange = not isTrending and (close < ta.highest(close, obvLength) and close > ta.lowest(close, obvLength)) volumeFilter = volume > avgVolume // Strategie logica // 1. Trend Trading met tight stop-loss en ADX filter if (useTrendTrading and isTrending and isOversold and volumeFilter) strategy.entry("Koop Trend", strategy.long) strategy.exit("Exit Trend", stop=strategy.position_avg_price - stopLossMultiplier * atr, limit=strategy.position_avg_price + riskReward * stopLossMultiplier * atr) // 2. Range Trading if (useRangeTrading and isRange and rsi < rsiOversold and volumeFilter) strategy.entry("Koop Range", strategy.long) strategy.exit("Verkoop Range", stop=strategy.position_avg_price - stopLossMultiplier * atr, limit=strategy.position_avg_price + riskReward * stopLossMultiplier * atr) if (useRangeTrading and isRange and rsi > rsiOverbought and volumeFilter) strategy.entry("Short Range", strategy.short) strategy.exit("Exit Short Range", stop=strategy.position_avg_price + stopLossMultiplier * atr, limit=strategy.position_avg_price - riskReward * stopLossMultiplier * atr) // 3. Breakout Trading met volume if (useBreakoutTrading and isBreakout and volumeFilter) strategy.entry("Koop Breakout", strategy.long) strategy.exit("Exit Breakout", stop=strategy.position_avg_price - stopLossMultiplier * atr, limit=strategy.position_avg_price + riskReward * stopLossMultiplier * atr) // Indicatoren plotten plot(ema, title="EMA", color=color.blue, linewidth=2) hline(rsiOverbought, "RSI Overbought", color=color.red) hline(rsiOversold, "RSI Oversold", color=color.green) plot(rsi, title="RSI", color=color.purple) plot(adx, title="ADX", color=color.orange)