This strategy is a trading system based on moving average trend determination and support level false breakout patterns. The strategy uses 50-period and 200-period simple moving averages to determine market trends, combines support level false breakout patterns to generate trading signals, and uses the ATR (Average True Range) indicator to dynamically set stop-loss positions while setting profit targets at breakout points. This strategy fully utilizes market trend characteristics and price movement patterns to capture opportunities for profit through rebounds after false breakouts.
The core logic of the strategy includes the following key elements:
The Multi-SMA Support Level False Breakout Strategy is a complete trading system combining trend following and price patterns. Through trend determination using moving average systems and support level false breakout pattern recognition, coupled with ATR dynamic stop-losses, it constructs a risk-controllable trading strategy. The core advantages of this strategy lie in its systematic operation process and clear risk management methods. Through continuous optimization and improvement, the strategy can better adapt to different market environments and improve trading results. In live trading applications, investors are advised to adjust strategy parameters based on their risk tolerance and market characteristics.
/*backtest start: 2019-12-23 08:00:00 end: 2024-11-26 00:00:00 period: 1d basePeriod: 1d exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("False Break Trading Strategy", overlay=true) // Define inputs for strategy parameters sma50Length = input.int(50, title="SMA 50 Length") sma200Length = input.int(200, title="SMA 200 Length") atrLength = input.int(14, title="ATR Length") lookbackPeriod = input.int(10, title="Swing High Lookback Period") // Calculate SMAs sma50 = ta.sma(close, sma50Length) sma200 = ta.sma(close, sma200Length) // Calculate ATR atr = ta.atr(atrLength) // Check if we are in an uptrend isUptrend = sma50 > sma200 // Calculate Pivot, Support, and Target Profit (Swing High) pivot = (high[1] + low[1] + close[1]) / 3 support = (2 * pivot) - high[1] swingHigh = ta.highest(high, lookbackPeriod) // Create signals for entry var float entryPrice = na var float stopLoss = na var float targetProfit = na longCondition = isUptrend and low[1] < support and close > support if (longCondition) entryPrice := open stopLoss := low - atr targetProfit := swingHigh // Plot signals and lines on chart plotshape(longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY") // Plot levels for entry, stop loss, and target plot(entryPrice, title="Entry Price", color=color.blue, linewidth=2, style=plot.style_linebr) plot(stopLoss, title="Stop Loss", color=color.red, linewidth=2, style=plot.style_linebr) plot(targetProfit, title="Target Profit", color=color.green, linewidth=2, style=plot.style_linebr) // Backtest: Simulate exit points for the strategy if (longCondition) strategy.entry("Long", strategy.long) if (na(stopLoss) == false and na(targetProfit) == false) strategy.exit("Take Profit/Stop Loss", "Long", stop=stopLoss, limit=targetProfit)