Xer0's Dual Engine Ladder AllocatorOverview
This indicator is designed for long-term investors using a "Dual Engine" portfolio strategy on M1 Finance — mixing a broad-market index fund with a leveraged counterpart in the same Pie. Instead of guessing when to buy the dip, this script provides a systematic, step-by-step roadmap for increasing your leveraged allocation as the market falls, and resetting it as the market recovers.
How It Works
The strategy is built on "Sticky All-Time High" logic. It tracks the highest close price and calculates the current drawdown from that peak, then responds with one of three scenarios:
Ladder Down (Risk On): For every defined drop step (e.g. every -5%), the indicator signals a RISK UP event — automatically calculating your new target allocation to the leveraged slice of your Pie. This forces systematic, disciplined buying at lower prices.
Recovery Reset (Risk Off): Once the market recovers by a set percentage from the bottom, the script signals a RESET — returning your allocation to the base level and locking in the gains from the dip-buying phase.
Bull Step: When the market pushes into new high territory, the script tracks each new leg up and keeps your reference point current.
Key Features
Sticky ATH Tracking: Automatically calculates true drawdown from the cycle peak
Customizable Ladder Steps: Define your own drop trigger percentage and leverage increase per step
Max Cap: Hard ceiling on leverage exposure to protect against catastrophic drawdowns
Bar Confirmation: All signals fire on daily close to avoid intraday false triggers
Visual Dashboard: Bottom-right table showing current mode, target leverage, drawdown, and recovery price target
Alert Conditions: Built-in RISK UP and RESET alerts compatible with TradingView's "Once Per Bar Close" setting
Backtested Performance (Simulated — Read Carefully)
The following results are from a Python backtest covering approximately 30 years (1996–2026), using $923/week in contributions every Friday. The strategy used two M1 Pies: Pie 1 (S&P 500 index fund / 3× S&P 500 ETF, base leverage 35%) and Pie 2 (Nasdaq-100 index fund / 3× Nasdaq-100 ETF, base leverage 25%). Tax assumptions reflect California state + federal rates for a $47K–$100K income bracket. Data prior to 2010 is synthetic, modeled from underlying index returns.
Results are hypothetical and do not represent actual trading. Past performance does not guarantee future results.
Ladder Strategy | VOO Benchmark
Total Contributed $1,395,576 | $1,395,576
Final Value (after-tax) $25,286,879 | $9,025,443
Total Return 1,711.9% | 546.7%
CAGR (on contributions) 10.1% | 6.4%
Max Drawdown -91.8% | -50.5%
Taxes Paid (CA) $5,358,907 | N/A (buy & hold)
Cash After Full Liquidation $23,500,189 | $7,171,385
The ladder strategy produced approximately 227.7% more after-tax cash than buy-and-hold VOO after full liquidation. However, the strategy experienced a maximum drawdown of -91.8% — meaning at its worst point, the portfolio lost nearly all of its value on paper. This level of volatility is not suitable for most investors and requires strong conviction and a long time horizon to hold through.
How to Use
Add this indicator to a Daily (1D) chart of your chosen index. Configure the inputs to match your risk tolerance — Base Leverage %, Drop Step %, and Max Cap %. Enter your M1 Pie name in the input field so alerts reference it by name. Set alerts using "Once Per Bar Close" and adjust your Pie allocation whenever a signal fires.
Disclaimer
This script is for informational and educational purposes only. It does not constitute financial advice. Backtested results are simulated and hypothetical — they do not account for all real-world frictions and should not be interpreted as a guarantee of future performance. Trading leveraged instruments involves significant risk, including the potential loss of your entire investment, and is not suitable for all investors.
Indicador Pine Script®



















