
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: 1. Trend Determination: Uses the relative position of 50-period and 200-period moving averages to determine market trends, confirming an uptrend when the short-term moving average is above the long-term moving average. 2. Support Level Calculation: Calculates support levels using pivot point formula, utilizing weighted averages of the previous period’s high, low, and closing prices. 3. False Breakout Confirmation: Generates long signals when price briefly breaks below support during an uptrend and then closes above it. 4. Risk Management: Uses 14-period ATR to calculate dynamic stop-loss positions, ensuring wider stops during increased market volatility. 5. Profit Targets: Calculates profit targets using the highest price of the previous 10 periods to ensure adequate profit potential.
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)