
The Adaptive Momentum Swing Trading System is a trend-following strategy designed for high-volatility markets. This strategy identifies entry points at the third swing in a market trend, confirmed by volume-verified engulfing candle patterns, while employing adaptive stop-loss/take-profit mechanisms and risk-based position sizing. The core concept focuses on capturing strong market continuations by only entering trades after a trend has been clearly established and structurally confirmed, avoiding the risks of early entries.
This strategy is built on multiple filters and confirmation mechanisms to ensure entries only occur in high-probability scenarios:
Trend Filter: Uses a 50-period Simple Moving Average (SMA) to determine market direction. Price above SMA indicates an uptrend suitable for buys; price below SMA indicates a downtrend suitable for sells.
Swing Count Logic:
Engulfing Candle Confirmation:
Volume Filter: Current candle volume must exceed the 20-period volume average, ensuring trades only occur with institutional participation.
MA Slope Filter: Requires the slope of the 50 SMA over the last 3 candles to exceed 0.1, avoiding chop or flat trends and adding momentum confirmation.
Session Filter: Trades are only executed within specific time windows to avoid overnight chop and illiquidity.
Adaptive Stop Loss Mechanism:
Risk-Based Position Sizing: Dynamically calculates position size based on risk amount per trade and stop loss size, ensuring risk consistency.
Structured Entries: By waiting for the third swing, the strategy avoids chasing trends and only enters after a trend has been established and confirmed by price structure, significantly improving win rates.
Multiple Confirmation Layers: Combines trend, swing count, candle pattern, volume, and momentum indicators as multiple filters, ensuring entries only when multiple signals align, reducing false signals.
Adaptive Risk Management: Dynamically adjusts stop loss levels based on actual market volatility, automatically reducing stop distance during high-volatility periods to protect capital.
Quantified Risk Control: Through precise calculation of position size for each trade, the strategy ensures that risk amount per trade remains consistent regardless of changing market conditions.
Institutional Money Confirmation: Through the volume filter, trades are only taken when large money is participating, increasing the probability of trend continuation.
Noise-Resistant Design: Time filters and minimum slope requirements help avoid poor-quality trading environments and false signals in directionless markets.
Customizable Parameters: The strategy provides multiple adjustable parameters, allowing traders to optimize according to personal risk preferences and different market environments.
Swing Count Reset Risk: When a signal triggers a trade, the swing counter resets, potentially causing missed subsequent signals at suboptimal times. Consider implementing a more intelligent reset mechanism or adding recognition of secondary signals.
Fixed Lookback Window Limitation: Using a fixed 5-bar lookback window may perform inconsistently across different market environments. Consider implementing an adaptive lookback window that adjusts automatically based on market volatility.
Over-Reliance on Single Timeframe: Operating solely on a 5-minute chart may miss important structures from higher timeframes. Consider adding multi-timeframe analysis to improve entry quality.
Fixed Profit Ratio: The fixed risk-reward ratio (2.2) may not be suitable for all market environments. During low-volatility periods, this might lead to unrealistic targets; during high-volatility periods, it may take profits too early. Consider dynamically adjusting take-profit levels based on ATR or market volatility.
Candle Size Threshold Risk: The large candle handling logic (25-point threshold) is a fixed value that may not adapt to all market environments. Recommend using relative values (such as percentage of ATR) instead of fixed points.
Session Limitation Risk: The fixed session filter may miss important market opportunities. Consider dynamically adjusting trading time windows based on actual volatility and liquidity conditions.
Adaptive Parameter Optimization:
Multi-Timeframe Integration:
Advanced Swing Analysis:
Intelligent Money Management Upgrade:
Statistical Learning Improvements:
Execution Optimization:
The Adaptive Momentum Swing Trading System is a well-designed trend-following strategy that enhances trade quality through multiple filters and confirmation mechanisms. Its core strengths lie in strict entry conditions, adaptive risk management, and structure-based swing identification capabilities. The strategy effectively avoids false breakouts and premature entries by waiting for the third swing and volume-confirmed engulfing patterns, while ensuring risk control through dynamic position sizing.
While already quite refined, there remains room for improvement, particularly in parameter adaptivity, multi-timeframe analysis, and advanced money management. By implementing the suggested optimization measures, especially introducing ATR-based dynamic parameters and multi-timeframe confirmation, the strategy can further improve its robustness and profitability across different market environments.
Most importantly, traders should understand that the philosophy of this strategy is to capture high-probability continuation opportunities in established trends rather than predicting turning points. By patiently waiting for multiple conditions to align and strictly adhering to risk management rules, this strategy can serve as a powerful trading system.
/*backtest
start: 2025-01-01 00:00:00
end: 2025-05-12 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BNB_USDT"}]
*/
// @version=6
strategy("US30 Stealth Strategy", overlay=true)
// === USER INPUTS ===
maLen = input.int(50, "Trend MA Length")
volMaLen = input.int(20, "Volume MA Length")
hlLookback = input.int(5, "Lookback for High/Low Detection")
rrRatio = input.float(2.2, "Risk-to-Reward Ratio", step=0.1)
maxCandleSize = input.float(30.0, "Max Candle Size (pips/points)")
pipValue = input.float(1.0, "Pip Value (USD per pip/point)")
riskAmount = input.float(500.0, "Risk Per Trade (USD)")
largeCandleThreshold = input.float(25.0, "Threshold for large candles")
maSlopeLen = input.int(3, "MA Slope Lookback Bars")
minSlope = input.float(0.1, "Min Slope Threshold")
// === TREND DETECTION ===
ma = ta.sma(close, maLen)
slope = ma - ma[maSlopeLen]
isSlopeUp = slope > minSlope
isSlopeDown = slope < -minSlope
isDownTrend = close < ma and isSlopeDown
isUpTrend = close > ma and isSlopeUp
// === COUNTERS ===
var int lhCount = 0
var int hlCount = 0
// === LOWER HIGH DETECTION ===
isLowerHigh = high < ta.highest(high[1], hlLookback)
if isLowerHigh
lhCount += 1
hlCount := 0
// === HIGHER LOW DETECTION ===
isHigherLow = low > ta.lowest(low[1], hlLookback)
if isHigherLow
hlCount += 1
lhCount := 0
// === ENGULFING DETECTIONS ===
bearEng = (close < open) and (close < open[1]) and (open > close[1]) and (close <= open[1]) and (open >= close[1])
bullEng = (close > open) and (close > open[1]) and (open < close[1]) and (close >= open[1]) and (open <= close[1])
// === VOLUME FILTER ===
volMA = ta.sma(volume, volMaLen)
volOK = volume > volMA
// === TIME FILTER (Oman 2AM–11PM = UTC 22:00–19:00) ===
inSession = (hour >= 22 or hour < 19)
// === CANDLE SIZE & SL LOGIC ===
rawCandleSize = high - low
useHalfCandle = rawCandleSize > largeCandleThreshold
slSize = useHalfCandle ? rawCandleSize / 2 : rawCandleSize
validSize = rawCandleSize <= maxCandleSize
// === SIGNAL CONDITIONS ===
sellSig = inSession and isDownTrend and (lhCount == 3) and bearEng and volOK and validSize
buySig = inSession and isUpTrend and (hlCount == 3) and bullEng and volOK and validSize
// === RISK-CALCULATED POSITION SIZE ===
positionSize = riskAmount / (slSize * pipValue)
// === SL/TP LEVELS ===
bearSL = close + slSize
bearTP = close - rrRatio * slSize
bullSL = close - slSize
bullTP = close + rrRatio * slSize
// === EXECUTIONS ===
if sellSig
strategy.entry("Sell", strategy.short, qty=positionSize)
strategy.exit("TP/SL Sell", from_entry="Sell", stop=bearSL, limit=bearTP)
lhCount := 0
if buySig
strategy.entry("Buy", strategy.long, qty=positionSize)
strategy.exit("TP/SL Buy", from_entry="Buy", stop=bullSL, limit=bullTP)
hlCount := 0