Multi-band Price Reversal Identification Strategy: Based on Horn Pattern and EMA Trend Filtering Technology
FMZQuant

FMZQuant @fmzquant

Joined:
Apr 25, 2024

Multi-band Price Reversal Identification Strategy: Based on Horn Pattern and EMA Trend Filtering Technology

Publish Date: Jun 26
2 1

Image description

Image description

Overview
The Multi-band Price Reversal Identification Strategy is a price structure-based trading approach that relies on the "Horn Pattern" to capture short-term reversal opportunities in the market. The strategy integrates pattern recognition, trend filtering, and volatility confirmation across three dimensions, identifying specific three-bar combinations and triggering trade signals when the fourth bar (confirmation bar) meets certain conditions. The strategy employs EMA20 as the primary trend filter to ensure trade direction aligns with the medium-term trend, while using the ATR indicator to filter low volatility environments, effectively improving trade quality.

Strategy Principles
The core principle of this strategy is based on the "Horn Pattern" in price structure, which is a specific price pattern formed by three bars:

Bullish Horn Pattern:

  • Requires the middle bar (bar[2]) to have a low higher than the lows of the bars on either side
  • The first and third bars must be bullish (closing price higher than opening price)
  • Forms a "low-higher low-low" W-shaped structure

Bearish Horn Pattern:

  • Requires the middle bar to have a high lower than the highs of the bars on either side
  • The first and third bars must be bearish (closing price lower than opening price)
  • Forms a "high-lower high-high" M-shaped structure

Confirmation Conditions:

  • Bullish signal: The fourth bar (confirmation bar) must close above the highest point of the previous three bars and be bullish
  • Bearish signal: The fourth bar must close below the lowest point of the previous three bars and be bearish

Filtering Conditions:

  • Trend filter: Bullish signals require the confirmation bar to close above EMA20, bearish signals require it to close below EMA20
  • Volatility filter: The confirmation bar or the previous bar's range must be greater than ATR, ensuring avoidance of low volatility environments

The strategy employs precise entry price settings and risk management methods: bullish entries are placed one tick above the confirmation bar's closing price, while bearish entries are placed one tick below. Stop losses are set at the structural extreme of the Horn pattern (lowest point minus one tick for longs, highest point plus one tick for shorts), with profit targets at 1R (risk-reward ratio of 1:1).

Strategy Advantages

  1. Structured Trading Logic: The strategy is based on clear price structures and pattern recognition, reducing subjective judgment and improving trading consistency and repeatability.

  2. Multiple Filtering Mechanisms: Through EMA trend filtering and ATR volatility filtering, signal quality is significantly improved, avoiding erroneous trades in unfavorable market environments.

  3. Precise Entry and Risk Management: The strategy sets clear entry points, stop-loss levels, and profit targets, making risk management simple and effective, with predetermined risk for each trade.

  4. Visual Assistance: The strategy draws structure lines of the Horn pattern, entry price lines, and target price lines on the chart, helping traders intuitively understand trading logic and price movements.

  5. Strong Adaptability: The strategy is applicable to multiple timeframes (5-minute to 1-hour) and high-volatility instruments, offering a wide range of application scenarios.

  6. Parameter Adjustability: Key parameters such as EMA length, ATR length, and volatility threshold can be adjusted according to different market conditions and personal preferences, enhancing strategy flexibility.

Strategy Risks

  1. False Breakout Risk: In highly volatile markets, prices may form false breakouts, triggering signals before quickly reversing, leading to stop-losses being hit. The solution is to add additional confirmation indicators or adjust entry timing, such as waiting for pullbacks before entering.

  2. Trend Transition Point Uncertainty: Near trend transition points, EMA filtering may cause missed initial reversal signals. Consider adding other trend identification tools or setting more sensitive EMA parameters to mitigate this issue.

  3. Low Liquidity Environment Risk: In low liquidity environments, slippage may cause actual entry prices to deviate from ideal prices, affecting risk-reward ratios. It is recommended to use this strategy with highly liquid instruments or during main trading sessions.

  4. Parameter Sensitivity: The choice of EMA and ATR parameters significantly impacts strategy performance, with different market environments potentially requiring different parameter settings. It is advisable to optimize parameters through backtesting under various market conditions.

  5. Consecutive Loss Risk: Any trading strategy can experience consecutive losses, requiring reasonable money management to control single trade risk and avoid significant equity curve drawdowns.

Strategy Optimization Directions

  1. Multiple Timeframe Confirmation: Introduce higher timeframe trend confirmation mechanisms, executing trades only when higher timeframe trend direction is consistent, improving signal quality. This can be implemented by adding longer-period EMAs or other trend indicators.

  2. Dynamic Profit Target Mechanism: The current strategy uses a fixed 1R profit target; consider introducing dynamic profit target mechanisms, such as trailing stops or ATR-based dynamic profit targets, to capture more profit in strong trends.

  3. Volatility Adaptability: The current strategy uses a fixed ATR threshold to filter low volatility environments; consider implementing a volatility adaptive mechanism that automatically adjusts thresholds based on recent market volatility characteristics.

  4. Entry Optimization: Consider adding pullback entry logic, waiting for minor retracements after confirmation signals before entering, potentially achieving better entry prices and risk-reward ratios.

  5. Price Action Confirmation: On top of the basic Horn pattern, add price action confirmation factors, such as volume confirmation, candlestick pattern confirmation, etc., to further improve signal quality.

  6. Machine Learning Integration: Consider introducing machine learning algorithms to train models through historical data to identify Horn patterns most likely to succeed, achieving intelligent filtering of signal quality.

Summary
The Multi-band Price Reversal Identification Strategy is a trading system that combines price structure recognition, trend filtering, and volatility confirmation, capturing specific Horn pattern reversal signals and executing trades in alignment with medium-term trends. The strategy's advantages lie in its clear structured trading logic, precise risk management, and multiple filtering mechanisms, suitable for medium to short-term traders capturing reversal opportunities in the market.

Strategy risks mainly come from false breakouts, uncertainty at trend transition points, and parameter sensitivity, but these risks can be effectively managed through additional confirmation mechanisms, parameter optimization, and improved money management. Future optimization directions include multiple timeframe confirmation, dynamic profit target mechanisms, volatility adaptability, and machine learning integration, which are expected to further enhance the strategy's robustness and profitability.

Overall, this strategy provides traders with a systematic, quantifiable method to identify and trade price reversals, and with reasonable risk management and continuous optimization, it has the potential to become an effective tool in a trader's toolbox.

Strategy source code

/*backtest
start: 2024-06-09 00:00:00
end: 2024-12-03 00:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/

//@version=5
strategy("🦌 Horn Pattern - Horn + FT - Ming Joo", overlay=true, max_lines_count=500)

// Style settings
bullColor = input.color(color.green, "Bullish Horn")
bearColor = input.color(color.red, "Bearish Horn")
showEntry = input.bool(true, "Show Entry")

tightRangeThreshold = input.float(0.5, title="Panda Threshold (×ATR)")
atrLen = input.int(14, title="ATR Length")
atr = ta.atr(atrLen)


// bar type judgment
isBull(i) => close[i] > open[i]
isBear(i) => close[i] < open[i]

// Panda burning incense judgment
//pandaHighRange = math.abs(math.max(high[1], high[2], high[3]) - math.min(high[1], high[2], high[3]))
//pandaLowRange = math.abs(math.max(low[1], low[2], low[3]) - math.min(low[1], low[2], low[3]))



// ========== Bull Horn Condition (bar[3], [2], [1]) ==========
bullHornPattern =  (low[2] > low[3] and    low[2] > low[1])  and  (  isBull(1)  and isBull(3) )


// ========== FT bar onfirmed (bar[0]) ==========
bullFT = bullHornPattern and    close > high[2] and    close > open and    high > math.max(high[3], high[2], high[1])


bearHornPattern =     high[2] < high[3] and    high[2] < high[1] and   (isBear(1)  and isBear(3))

// ========== FT bar confirmed (bar[0])==========
bearFT = bearHornPattern and    close < low[2] and    close < open and    low < math.min(low[3], low[2], low[1])
// ========== execution logic ==========
var bool showBullArrow = false
var bool showBearArrow = false

tick = syminfo.mintick

emaLen = input.int(20, title="EMA Filter Length")
ema20 = ta.ema(close, emaLen)


contextFilter_bull = close > ema20  and  (math.abs(high[1]-low[1]) > atr or math.abs(high-low) > atr)
contextFilter_bear = close < ema20  and (math.abs(high[1]-low[1]) > atr or math.abs(high-low) > atr)

// === Bull Horn execution logic ===
if bullFT and contextFilter_bull
    hornLow = math.min(low[3], low[2], low[1])
    hornHigh = math.max(high[3], high[2], high[1])

    entry = close + tick

    stop = hornLow - tick
    r = entry - stop
    tp = entry + r

    strategy.entry("Long Horn", strategy.long,limit = entry)
    strategy.exit("Exit Long", from_entry="Long Horn", stop=stop, limit=tp)



// === Bear Horn execution logic ===
if bearFT and contextFilter_bear
    hornHigh = math.max(high[3], high[2], high[1])
    hornLow = math.min(low[3], low[2], low[1])

    entry = close - tick
    stop = hornHigh + tick
    r = stop - entry
    tp = entry - r


    strategy.entry("Short Horn", strategy.short,limit = entry)
    strategy.exit("Exit Short", from_entry="Short Horn", stop=stop, limit=tp)



// ========== Global arrow mark ==========
plotshape(showBullArrow, location=location.belowbar, offset=-2, color=bullColor, style=shape.triangleup, size=size.small, title="Bull Arrow")
plotshape(showBearArrow, location=location.abovebar, offset=-2, color=bearColor, style=shape.triangledown, size=size.small, title="Bear Arrow")

// Reset
showBullArrow := false
showBearArrow := false


Enter fullscreen mode Exit fullscreen mode

Strategy parameters

Image description

The original address: Multi-band Price Reversal Identification Strategy: Based on Horn Pattern and EMA Trend Filtering Technology

Comments 1 total

  • Rebecca Chow
    Rebecca ChowJun 26, 2025

    Interesting twist using Horn patterns with EMA trend filtering! The multi-band approach seems great for catching reversals, but how does it handle false breakouts in choppy markets? Have you tested different EMA lengths for the trend filter? Also curious about the stop-loss logic—does it adapt to volatility? Solid concept with clear rules. Would love to see some live trading results!

Add comment