Momentum Synchronization Triple-Exit Strategy: RSI-ADX Filtered PSAR Multi-Level Profit Taking Quantitative System

RSI ADX PSAR 三级出场策略 动量过滤 趋势反转 震荡市场
Created on: 2025-08-08 10:47:26 Modified on: 2025-08-08 10:47:26
Copy: 7 Number of hits: 182
avatar of ianzeng123 ianzeng123
2
Follow
319
Followers

 Momentum Synchronization Triple-Exit Strategy: RSI-ADX Filtered PSAR Multi-Level Profit Taking Quantitative System  Momentum Synchronization Triple-Exit Strategy: RSI-ADX Filtered PSAR Multi-Level Profit Taking Quantitative System

Overview

The Momentum Synchronization Triple-Exit Strategy is a precision swing trading system designed to capture early trend reversal signals and protect profits through a three-tier exit mechanism. This strategy uses the Parabolic SAR (PSAR) indicator as the core entry signal, combined with the Relative Strength Index (RSI) and Average Directional Index (ADX) as filtering conditions, ensuring positions are only established during the early stages of trends with sufficient momentum support. Its most distinctive feature is the three-stage exit mechanism, which gradually closes positions over three consecutive trading periods after the PSAR indicator gives a bearish signal, allowing traders to lock in profits while reducing the risk of exiting too early. This balanced trading approach is particularly suitable for traders who want to enter trends early and flexibly control risk.

Strategy Principle

The core logic of this strategy is built on three key components: precise entry timing, momentum confirmation, and a phased exit mechanism.

  1. Entry Signal Determination:

    • The strategy uses the “bullish flip” of the PSAR indicator as the primary entry signal. When the PSAR point moves from above the price to below it, while the PSAR points for the previous two periods were above the price, it is identified as a bullish flip.
    • This judgment is implemented in the code through psarBullishFlip = psar < close and psar[1] > close[1] and psar[2] > close[2].
  2. Momentum Filtering Mechanism:

    • To avoid false signals, the strategy introduces dual filtering with RSI and ADX:
      • RSI must be greater than 40, indicating sufficient upward momentum in the market
      • ADX must be greater than 18, confirming a clear trend direction exists
    • This filtering condition is implemented through rsiAdxOK = rsi > 40 and adx > 18.
  3. Three-Tier Exit Strategy:

    • When the PSAR indicator moves from below the price to above it (bearish flip), the strategy records the trading period when this flip occurs.
    • Subsequently, positions are gradually closed over the next three trading periods:
      • First period (1st period after the flip): Execute the first partial exit
      • Second period (2nd period after the flip): Execute the second partial exit
      • Third period (3rd period after the flip): Complete exit, ending the trade
    • This is implemented by recording when the bearish flip occurs and tracking the number of periods that have passed: barsSinceBearishFlip = na(bearishFlipBar) ? na : bar_index - bearishFlipBar.

Strategy Advantages

  1. Early Trend Capture Capability: The PSAR indicator can sensitively identify early trend reversals, allowing traders to participate in trends during their formative stages, increasing potential profit space.

  2. Dual Confirmation Filtering: The combined use of RSI and ADX significantly reduces the risk of false signals. RSI ensures sufficient momentum support, while ADX ensures the market is in a clear trend state rather than oscillating.

  3. Intelligent Graduated Exit Mechanism: The three-tier exit strategy is the biggest innovation of this system, solving the “when to exit” dilemma that traders often face:

    • Prevents all profits from being given back due to minor market corrections
    • Allows partial positions to continue to be held, capturing potentially larger profits
    • Exits completely after the trend confirms reversal, avoiding deep drawdowns
  4. Adaptive Parameter Design: The strategy allows adjustment of the PSAR’s starting value, increment, and maximum value, as well as the periods for RSI and ADX, enabling traders to optimize according to different market conditions and personal risk preferences.

  5. Visual Assistance Features: The strategy provides rich visual cues, including the display of PSAR points, buy background highlighting, and indicators for RSI and ADX conditions, helping traders intuitively understand market conditions.

Strategy Risks

  1. Lag Risk: Although PSAR is an early trend identification tool, entry points may still be slightly lagged in extremely volatile markets, potentially missing part of the initial price movement. The solution is to appropriately reduce the PSAR starting value and increment value to increase indicator sensitivity.

  2. Overly Strict Filtering Conditions: The dual conditions of RSI>40 and ADX>18 may be too strict in low-volatility markets, causing missed valid signals. The solution is to adjust these thresholds in different market environments or introduce an adaptive mechanism based on market volatility.

  3. Lack of Stop-Loss Mechanism: The current strategy relies on PSAR flips as exit signals without a clear stop-loss mechanism to protect capital safety. It is recommended to add an ATR-based stop-loss line or fixed percentage stop-loss to handle sudden adverse movements.

  4. Slippage Risk During Exit Process: The three-tier exit strategy may face slippage risk in highly volatile markets, especially when the market reverses quickly. It is recommended to consider using limit orders rather than market orders when implementing the exit strategy in live trading.

  5. Parameter Sensitivity: The parameter settings for PSAR, RSI, and ADX have a significant impact on strategy performance. Different parameter combinations perform differently in various market environments, requiring backtesting to find the optimal combination.

Strategy Optimization Directions

  1. Adaptive Parameter Mechanism:

    • Introduce a dynamic adjustment mechanism for PSAR parameters based on market volatility (such as ATR), increasing the PSAR increment value in high-volatility markets and decreasing it in low-volatility markets.
    • Implementation: dynamicSarIncrement = sarIncrement * (ta.atr(14) / ta.sma(ta.atr(14), 100))
    • Principle: This will make PSAR better adapt to different market environments, reducing false signals while improving response speed.
  2. Phased Entry Strategy:

    • Corresponding to the phased exit, introduce a phased entry mechanism, dividing the full position into 2-3 parts to be established gradually under different conditions.
    • For example: First part when PSAR flips, second part when price breaks through previous high, third part when price pulls back to support level.
    • This will reduce entry timing risk, with the average entry price more likely to be better than a single entry point.
  3. Introduction of More Complementary Technical Indicators:

    • Consider adding Bollinger Bands, MACD, or volume indicators as auxiliary confirmation.
    • For example, enter when price breaks through the upper Bollinger Band and PSAR flips, or require the MACD histogram to be positive for entry.
    • This will further reduce false signals and improve strategy robustness.
  4. Dynamic Position Management:

    • Dynamically adjust the position size for each trade based on market volatility and current trend strength.
    • Increase position size in strong trends and decrease it in weak trends.
    • Implementation method: positionSize = basePosSize * (adx / 25) * (rsi / 50)
    • This method can increase risk exposure when high-confidence signals appear, improving overall returns.
  5. Intelligent Exit Ratio Optimization:

    • The current strategy’s three-tier exit assumes equal exit ratios each time, which can be optimized to dynamic exit ratios based on market conditions.
    • For example, when ADX is above 30, the first exit ratio is smaller (e.g., 20%), retaining more positions to capture strong trends; when ADX is below 20, the first exit ratio is larger (e.g., 50%), locking in profits faster.
    • This method can better balance risk and return, adapting to different market environments.

Conclusion

The Momentum Synchronization Triple-Exit Strategy is a quantitative trading system that combines technical precision with risk management. It captures early trend reversal signals through the PSAR indicator, filters out false signals in weak and oscillating markets using RSI and ADX, and employs an innovative three-tier exit mechanism to intelligently manage profits. This strategy is particularly suitable for medium to long-term swing traders, allowing them to enter trends early and maximize returns while controlling risk through phased exits. Through the optimization directions mentioned, especially adaptive parameters and dynamic position management, this strategy has the potential to achieve more stable performance across different market environments. Overall, this is a comprehensive trading system that balances trend capture, momentum confirmation, and precise exit management, providing quantitative traders with a reliable and scalable strategy framework.

Strategy source code
/*backtest
start: 2024-08-08 00:00:00
end: 2025-08-06 08:00:00
period: 3d
basePeriod: 3d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/

//@version=5
strategy("✅ PSAR Early Entry & 3-Step Exit (No Labels)", overlay=true)

// === INPUTS ===
sarStart     = input.float(0.02, "SAR Start", step=0.01)
sarIncrement = input.float(0.02, "SAR Increment", step=0.01)
sarMax       = input.float(0.2,  "SAR Max", step=0.01)
rsiPeriod    = input.int(14, "RSI Period")
adxPeriod    = input.int(14, "ADX Period")

// === INDICATORS ===
psar = ta.sar(sarStart, sarIncrement, sarMax)
rsi  = ta.rsi(close, rsiPeriod)
[_, _, adx] = ta.dmi(adxPeriod, adxPeriod)

// === ENTRY CONDITIONS ===
psarBullishFlip = psar < close and psar[1] > close[1] and psar[2] > close[2]
rsiAdxOK        = rsi > 40 and adx > 18
buyCondition    = psarBullishFlip and rsiAdxOK

// === BUY ENTRY ===
if (buyCondition and strategy.position_size == 0)
    strategy.entry("Buy", strategy.long)

// === EXIT CONDITIONS ===
// Detect PSAR bearish flip AFTER BUY
psarBearishFlip = psar > close and psar[1] < close[1] and psar[2] < close[2]
var int bearishFlipBar = na

if (strategy.position_size > 0 and psarBearishFlip and na(bearishFlipBar))
    bearishFlipBar := bar_index

barsSinceBearishFlip = na(bearishFlipBar) ? na : bar_index - bearishFlipBar

exit1 = strategy.position_size > 0 and barsSinceBearishFlip == 1
exit2 = strategy.position_size > 0 and barsSinceBearishFlip == 2
exit3 = strategy.position_size > 0 and barsSinceBearishFlip == 3

// === EXIT SIGNALS ===
plotshape(exit1, location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small, title="Exit 1")
plotshape(exit2, location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small, title="Exit 2")
plotshape(exit3, location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small, title="Full Exit")

if (exit3)
    strategy.close("Buy")
    bearishFlipBar := na  // Reset for next trade

// === PLOTS ===
plot(psar, title="Parabolic SAR", style=plot.style_cross, color=color.orange)
bgcolor(psar < close ? color.new(color.green, 85) : na, title="Buy Background")

// === HELPER VISUALS ===
plotshape(rsi > 50 and adx > 18, title="RSI>50 & ADX>18", location=location.bottom, style=shape.cross, color=color.green, size=size.small)
plotshape(rsi <= 50 or adx <= 18, title="RSI<=50 or ADX<=18", location=location.bottom, style=shape.cross, color=color.red, size=size.small)