
The Dynamic ATR Contrarian Trading Strategy is a trading system based on market liquidity sweep identification and CHoCH (Change of Character) signals, designed to capture reversal opportunities in the market. The core concept of this strategy is to identify market liquidity sweep behaviors and enter positions when most traders are forced to close their positions, thereby gaining profits in the direction of “Smart Money.” The strategy utilizes dynamic ATR (Average True Range) to set stop-loss and take-profit levels, and implements strict risk management mechanisms to ensure controllable risk for each trade.
The operating mechanism of this strategy is based on the following key steps:
Liquidity Sweep Identification: The strategy uses a lookback parameter (default is 20 periods) to monitor historical highs and lows. When the current price breaks through the highest point of the past lookback periods, it is identified as a high liquidity sweep (sweepHigh); when the price falls below the lowest point of the past lookback periods, it is identified as a low liquidity sweep (sweepLow).
CHoCH Signal Generation:
Dynamic Risk Management:
Trade Execution:
Contrarian Trading Advantage: The strategy targets market liquidity sweep behaviors and enters positions when most traders are forced to close their positions, potentially capturing larger price movements.
Dynamic Risk Management: Unlike fixed-point stop-loss strategies, this system sets stop-losses based on ATR, adapting to different market conditions and volatility environments, making risk management more scientific.
Clear Entry Signals: Combining liquidity sweep and CHoCH signals provides clear entry conditions, reducing subjective judgment and enhancing the repeatability and consistency of the system.
Controllable Risk: By setting a risk percentage for each trade, it ensures that single trade losses do not have a significant impact on the account, conducive to long-term stable trading.
Flexible Adaptability: The strategy’s parameters (such as risk-reward ratio, risk percentage per trade, lookback period) can be adjusted according to different markets and personal risk preferences.
False Breakout Risk: The market may experience false breakouts, causing liquidity sweep signals to fail. In such cases, the price may quickly move in the opposite direction after triggering the entry signal, resulting in stop-losses being hit. Solutions may include adding confirmation indicators or extending confirmation time.
Risk in High Volatility Environments: In highly volatile market environments, ATR values increase significantly, causing stop-loss positions to be relatively far from entry points, potentially increasing absolute loss amounts for single trades. Consider adjusting the ATR multiplier or reducing the risk percentage per trade in high volatility environments.
Parameter Sensitivity: Strategy performance may be sensitive to parameter settings (especially lookback periods and ATR multipliers). Different markets and timeframes may require different parameter settings for optimal results. Thorough backtesting is recommended to determine the most suitable parameters for specific trading environments.
Money Management Risk: Although the strategy includes risk control mechanisms, consecutive losses may still have a cumulative impact on the account. Implementation of additional money management rules is recommended, such as reducing trading size or pausing trading after consecutive losses.
Add Filtering Conditions: Consider adding trend filters, such as moving average direction or other trend indicators, to only trade in the direction of the main trend, avoiding frequent trading in ranging markets.
Optimize CHoCH Confirmation Mechanism: The current CHoCH signal is based on single candle price action. Consider adding confirmation conditions from multiple candles, or incorporating volume changes as additional confirmation to improve signal reliability.
Dynamic Adjustment of Risk-Reward Ratio: The risk-reward ratio can be dynamically adjusted based on market volatility or other market state indicators, using higher risk-reward ratios in low volatility markets and more conservative settings in high volatility markets.
Add Time Filtering: Some markets may have greater volatility or stronger directionality during specific time periods. Adding time filtering can help avoid trading during unfavorable trading sessions.
Integrate Sentiment Indicators: Combining market sentiment indicators (such as Relative Strength Index RSI, Stochastic, etc.) can help confirm potential reversal points and improve the accuracy of entry signals.
Optimize Take-Profit Strategy: The current strategy uses a fixed risk-reward ratio to set take-profit positions. Consider implementing a staged take-profit strategy, such as moving the stop-loss to breakeven when a 1:1 risk-reward ratio is achieved, allowing partial profits to continue growing.
The Dynamic ATR Contrarian Trading Strategy is a quantitative trading system focused on capturing market reversal opportunities after liquidity sweeps. By combining liquidity sweep identification and CHoCH signals, the strategy attempts to enter positions when most traders are forced to close their positions, following the direction of “Smart Money.” The core advantages of the strategy lie in its dynamic risk management mechanism and clear entry conditions, which allow the system to maintain adaptability in different market environments.
However, the strategy also faces challenges such as false breakout risks and parameter sensitivity. Through adding filtering conditions, optimizing signal confirmation mechanisms, dynamically adjusting risk parameters, and other optimization measures, the stability and profitability of the strategy can be further enhanced.
Overall, this is a trading strategy with clear structure and sound risk management, particularly suitable for traders seeking reversal trading opportunities. As with all trading strategies, thorough backtesting and simulated trading are recommended before live trading, and parameter settings should be adjusted according to individual risk tolerance and trading objectives.
/*backtest
start: 2024-05-28 00:00:00
end: 2025-05-27 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("Contrarian PRO - Smart Money", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=1)
// === INPUTS ===
riskReward = input.float(2.0, title="Risk/Reward Ratio", minval=1.0)
riskPerc = input.float(1.0, title="Risk per Trade (%)", minval=0.1, maxval=5.0)
lookback = input.int(20, title="Liquidity Sweep Lookback", minval=5)
// === PRICE ACTION TOOLS ===
var float entryPrice = na
var float stopLoss = na
var float takeProfit = na
// Detect potential liquidity sweep (high or low taken)
sweepHigh = ta.highest(high, lookback)[1] < high
sweepLow = ta.lowest(low, lookback)[1] > low
// Define CHoCH logic (Change of Character)
bullishCHoCH = sweepLow and close > close[1] and close > open
bearishCHoCH = sweepHigh and close < close[1] and close < open
// Entry logic
longCondition = bullishCHoCH
shortCondition = bearishCHoCH
// Manage risk: dynamic stop and TP
risk = riskPerc / 100 * strategy.equity
atr = ta.atr(14)
slPips = atr * 1.5
if (longCondition)
entryPrice := close
stopLoss := close - slPips
takeProfit := close + slPips * riskReward
strategy.entry("Long", strategy.long)
strategy.exit("TP/SL", from_entry="Long", stop=stopLoss, limit=takeProfit)
if (shortCondition)
entryPrice := close
stopLoss := close + slPips
takeProfit := close - slPips * riskReward
strategy.entry("Short", strategy.short)
strategy.exit("TP/SL", from_entry="Short", stop=stopLoss, limit=takeProfit)
// === PLOT ===
plotshape(longCondition, title="Long Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="LONG")
plotshape(shortCondition, title="Short Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SHORT")