Bidirectional Trading Strategy Based on Candlestick Absorption Pattern Analysis
Overview
This strategy is a bidirectional trading system based on candlestick absorption patterns. It identifies market absorption patterns by analyzing the direction, amplitude, and volume relationships of adjacent candlesticks, executing trades when conditions are met. The strategy employs percentage-based money management with complete entry and exit logic.
Strategy Principle
The core logic is based on three key conditions:
- Adjacent candlesticks have opposite directions: Comparing open and close prices to determine candlestick direction, requiring opposite trends in adjacent candlesticks.
- Amplitude relationship analysis: Calculating and comparing the price amplitude of two candlesticks (absolute difference between close and open prices), requiring the latter candlestick's amplitude to be larger.
- Volume characteristics: Requiring the first candlestick's volume to be larger than the second, while the second candlestick's volume should be smaller than the previous volume.
When these three conditions are met simultaneously, the strategy determines the trading direction based on the latest candlestick: long for bullish candles, short for bearish ones. The strategy uses full position trading and tracks positions through state variables.
Strategy Advantages
- Multi-dimensional analysis: Combines price patterns, amplitude, and volume analysis to improve signal reliability.
- Bidirectional trading: Captures market opportunities in both directions, fully utilizing market volatility.
- Comprehensive risk management: Uses percentage-based money management with flexible stop-loss and take-profit settings.
- Visual support: Provides graphical display of trading signals for analysis and optimization.
- Clear state management: Precisely controls positions through state variables, avoiding duplicate entries.
Strategy Risks
- False breakout risk: False absorption patterns may appear in ranging markets, leading to incorrect signals.
- Slippage impact: May face significant slippage during high market volatility, affecting actual trading results.
- Money management risk: Full position trading may create large risk exposure.
- Signal lag: Signals can only be confirmed after candlestick closure, potentially missing optimal entry points.
Strategy Optimization Directions
- Introduce trend filtering: Recommend adding moving averages or trend indicators for direction filtering to improve signal quality.
- Optimize money management: Position size can be dynamically adjusted based on market volatility.
- Enhance stop-loss mechanism: Recommend implementing dynamic stop-loss using ATR indicator to improve risk control.
- Add time filtering: Can add trading time period filters to avoid inefficient periods.
- Improve signal confirmation: Can add volume indicators or other technical indicators for auxiliary confirmation.
Summary
This strategy constructs a complete trading system through multi-dimensional analysis of candlestick patterns, amplitude, and volume. While certain risks exist, the strategy's stability and reliability can be further enhanced through the suggested optimization directions. The core advantages lie in its multi-dimensional analysis method and comprehensive state management mechanism, making it suitable for application in highly volatile market environments.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-10 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Candle Absorption Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// Условия индикатора- 1

