Aftershock Playbook: Stock Earnings Drift Engine — Strategy by exlux
By exlux
Performance Metrics
- Author: exlux
- Symbol: NASDAQ:MSFT
- Timeframe: 1 hour
- Net P&L: +1,212.47 USD (+12.06%)
- Win Rate: 70.7%
- Profit Factor: 4.179
- Max Drawdown: 114.01 USD (1.04%)
- Total Trades: 82
- Sharpe Ratio: −0.345
Description
Strategy typeEvent-driven post-earnings momentum engine (long/short) built for single-stock charts or ADRs that publish quarterly results.What it doesDetects the exact earnings bar (request.earnings, lookahead_off).Scores the surprise and launches a position on that candle’s close.Tracks PnL: if the first leg closes green, the engine automatically re-enters on the very next bar, milking residual drift.Blocks mid-cycle trades after a loss until the next earnings release—keeping the risk contained to one cycle.Think of it as a sniper that fires on the earnings pop, reloads once if the shot lands, then goes silent until the next report.Core signal inputsComponent Default PurposeEPS Surprise % +0 % / –5 % Minimum positive / negative shock to trigger longs/shorts.Reverse signals? Off Quick flip for mean-reversion experiments.Time Risk Mgt. Off Optional hard exit after 45 calendar days (auto-scaled to any TF).Risk engineATR-based stop (ATR × 2 by default, editable).Bar time stop (15-min → Daily: Have to select the bar value ).No pyramiding beyond the built-in “double-tap”.All positions sized as % of equity via Strategy Properties.Visual aidsYellow triangle marks the earnings bar.Diagnostics table (top-right) shows last Actual, Estimate, and Surprise %.Status-line tool-tips on every input.Default inputsSetting ValuePositive surprise ≥ 0 %Negative surprise ≤ –5 %ATR stop × 2ATR length 50Hold horizon 350 ( 1h timeframe chart bars)Back-test propertiesInitial capital 10 000Order size 5 % of equityPyramiding 1 (internal re-entry only)Commission 0.03 %Slippage 5 ticksFills Bar magnifier ✔ · On bar close ✔ · Standard OHLC ✔How to useAdd the script to any earnings-driven stock (AAPL, MSFT, TSLA…).Turn on Time Risk Management if you want stricter risk managementBack-test different ATR multipliers to fit the stock’s volatility.Sync commission & slippage with your broker before forward-testing.Important notesWorks on every timeframe from 15 min to 1 D. Sweet spot around 30min/1hAll request.earnings() & request.security() calls use lookahead_off—zero repaint.The “double-tap” re-entry occurs once per winning cycle to avoid drift-chasing loops.Historical stats ≠ future performance. Size positions responsibly.