Alpha Reversion Pro v2.3 - Safi Edition — Strategy by TriumphOne

By TriumphOne

Performance Metrics

Description

Alpha Reversion Pro v2.3 - Safi Edition is a regime-aware mean-reversion strategy built around controlled aggression.The idea is simple:Do not buy every dip.Buy selected dips only when the broader market regime is supportive.This strategy uses a macro regime filter, defaulted to QQQ versus its 200-period SMA on the daily timeframe. When the macro regime is favorable, the script allows staged dip entries on the chart symbol. When the regime turns defensive, the system stops buying and can exit the position.This is my Safi-style trading workflow:Wait for fear.Buy controlled pullbacks.Scale in with predefined account exposure.Exit when the mean-reversion move matures.Respect cash as a position.Core features:1. Macro regime filterThe strategy checks whether the selected macro symbol is above or below its 200-period SMA.2. Bullish and inverse instrument modesUse Bullish instrument mode for QQQ, SPY, TQQQ, SOXL, NVDA, AMD, and similar bullish instruments.Use Inverse instrument mode for SQQQ, SOXS, and other inverse ETF tests.3. Deep dip entriesThe deep dip model uses a short RSI to identify aggressive downside exhaustion.4. Shallow trend-pullback entriesThe shallow pullback model allows entries while price remains above a trend filter.5. 25% staged allocationThe default setup buys 25% of account value per signal, with up to four total buys. This allows the system to reach a 100% maximum account position in four planned steps.6. Clean BUY and SELL markersBUY markers show the buy signal, the share price, and the percentage of account value currently in the trade.SELL markers show the sell signal, the share price, trade P/L percentage, remaining account percentage still in the trade, and cash percentage.7. Compact trading summaryThe trading summary shows position state, account percentage in trade, cash percentage, buy slots used, macro regime, action, average entry, stop/risk, open P/L, win rate, profit factor, return/drawdown, closed trades, and average bars held.8. Risk controlsThe strategy includes a configurable hard stop and optional macro-regime exit.Suggested use cases:- QQQ daily swing testing- TQQQ daily or 4H aggressive leveraged ETF swing testing- SOXL daily or 4H semiconductor pullback testing- SPY daily or weekly mean-reversion testing- SQQQ or SOXS bearish-regime testing using Inverse instrument modeSuggested starting settings:For TQQQ:- Chart timeframe: Daily or 4H- Instrument Mode: Bullish instrument- Macro Regime Symbol: QQQ- Macro Regime Timeframe: D- Allocation Per Buy: 25%- Maximum Total Buys: 4- Maximum Account Exposure: 100%- Hard Stop: 6% to 10%For SOXL:- Chart timeframe: Daily or 4H- Instrument Mode: Bullish instrument- Macro Regime Symbol: SMH- Macro Regime Timeframe: D- Allocation Per Buy: 10% to 25%- Maximum Total Buys: 2 to 4- Hard Stop: 8% to 12%For SQQQ:- Chart timeframe: Daily or 4H- Instrument Mode: Inverse instrument- Macro Regime Symbol: QQQ- Macro Regime Timeframe: DFor SOXS:- Chart timeframe: Daily or 4H- Instrument Mode: Inverse instrument- Macro Regime Symbol: SMH- Macro Regime Timeframe: DThe chart is intentionally clean by default. Only BUY/SELL markers and the trading summary box are shown. Optional stop, exit SMA, and trend SMA plots can be turned on in settings.Important notes:- This script is for education, research, backtesting, and paper-trading.- It is not financial advice.- Historical results do not guarantee future performance.- Strategy results depend on symbol, timeframe, slippage, spread, commission, liquidity, and settings.- Leveraged ETFs such as TQQQ, SQQQ, SOXL, and SOXS can move quickly and may experience large drawdowns.- Always test the script on your own symbol, timeframe, and cost assumptions.- Use regular candles for Strategy Tester results. Non-standard candles can distort backtests.Signature:Built by Safi for controlled-aggression mean reversion.QQQ is the traffic light. Risk comes first. Cash is a position.Release Notes - v2.3- Converted the strategy to Pine Script v6.- Preserved the original Alpha Reversion Pro regime-aware dip-buying concept.- Added 25% per-buy allocation as the default.- Added four-buy maximum structure for up to 100% account exposure.- Added Maximum Account Exposure input.- Updated BUY markers to show only buy price and total account percentage currently in the trade.- Updated SELL markers to show sell price, P/L percentage, remaining percentage in the trade, and cash percentage.- Removed dollar cost from markers.- Added Bullish instrument and Inverse instrument modes.- Added fail-safe auto-sized trading summary table.- Added table controls for position, text size, colors, transparency, and displayed sections.- Kept the chart clean by default with only BUY/SELL markers and the trading summary box visible.- Kept optional stop line, exit SMA, and trend SMA plots off by default.- Added alert conditions for BUY dip, SELL setup, and hard-stop touch.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView