AlgoIndex - All Stages (AM & Mid-Day Long/Short) v3.9.2

ES1! only (E-mini S&P 500 continuous). 5-minute timeframe only. Alerts emit entry/exit signals for SPY options only. No built-in stop-loss; exits are TP-based with internal emergency flattening. This script does not place orders.
What this is
A single closed-source, invite-only intraday strategy for ES that consolidates four production presets behind one Stage selector:
- Stage 1 — NY AM Long
- Stage 2 — NY AM Short
- Stage 3 — Mid-Day Long
- Stage 4 — Mid-Day Short
Method (high level)
The model frames the session with an Opening-Range (OR) scaffold and uses VWAP alignment to filter directional bias. Entries trigger only on confirmed closes with directional bias in place. Position scaling is rule-based and handled internally; an emergency-exit routine flattens positions when ES take-profit conditions are met. No lookahead; no repaint.
Execution caveat
In fast markets, broker-side SPY option TP orders may fill before the strategy’s ES-based emergency-exit alert; alerts reflect strategy state, not broker fills.
Why a single “All Stages”
Publishing as one invite-only script avoids a fragmented “suite.” Users choose the Stage that matches their session and directional mandate.
Preset behavior (summary)
- S1 — 09:30–11:20 NY, long-only, morning impulse/continuation.
- S2 — 09:30–11:30 NY, short-only, gap-aware filters with dynamic backstops.
- S3 — 11:15–15:15 NY, long-only, conservative continuation with controlled extension.
- S4 — 11:30–14:30 NY, short-only, alternative logic on; averaging off for tighter risk.
Public inputs (what you can adjust)
- Take-profit level
- Trade limiter (max trades per session)
- Session window (select from predefined options)
Visual overlays (OR, VWAP, status) are toggle-only and do not change trade logic.
Sizing and adds (Public)
Base size = the contract quantity you set. Where averaging is active (by preset), the strategy may place up to two additional entries (Add-1, Add-2); each add matches the base size (e.g., size=1 -> +1, +1; size=2 -> +2, +2). Maximum exposure = 3x base size when both adds are filled. Stage 4 disables averaging by design.
What you will see
- Session framing and VWAP to communicate bias
- Confirmations on closed bars only
- Clear on-chart entries/exits consistent with alert states
Alerts
Signals derive from ES1! conditions and are routed as SPY option alerts. Alerts communicate side, context, and exits consistent with the strategy state. This script emits signals only and compatible with webhook-based automation via third-party platforms.
Keeping results separate
Use four TradingView tabs (or panes)—one per Stage—so each preset builds its own statistics. Switching Stages on a single chart will mix/reset results.
Automation
Create one alert per Stage (S1–S4). Do not reuse a single alert across multiple Stages.
Backtest baseline and account context
Initial capital in Properties is for statistics scaling only and does not change signals.
- Margin/PDT baseline: $25,000 is a common baseline for active day trading in margin accounts (PDT applies to margin accounts).
- Cash accounts: PDT does not apply; you must use settled T+1 funds. Set Initial capital to your planned cash size.
- Practical guide: For 1-contract SPY (typical premium ~$300–$500), $8k–$10k keeps per-trade risk near or under ~5% (max loss ≈ premium). Smaller balances are possible but increase % risk and reduce daily trade capacity under T+1.
Backtest notes and interpretation
- Engine and data: TradingView Pine v6 on ES1! 5-minute bars; US session windows per Stage; no lookahead/repaint.
- Window: ~1 - 3 years of ES1! 5m data used for validation.
- Assumptions: 1 tick slippage, $2.00 round-turn commission, base size=1; no built-in stop-loss; adds per preset (Add-1/Add-2 equal to base size where enabled).
- Scope: The backtest simulates ES futures executions only; SPY option pricing (IV, DTE, spreads, slippage, partial fills) is not modeled.
- Interpretation for options users: Treat ES backtest PnL/drawdowns as directional validation. Because live execution uses SPY options, prioritize signal-quality metrics such as win rate and average time-in-trade; actual options PnL will vary with contract selection (strike/DTE), implied volatility, spreads, and execution quality.
- Sensitivity: Changing inputs or session windows can materially alter behavior and outcomes.
Operating notes
- ES1! symbol only; 5-minute resolution only. Other symbols/timeframes are unsupported in this Public version.
- Adds/averaging thresholds are embedded in the Public version.
- Baseline includes session/holiday handling and VWAP alignment consistent with the method.
Disclosures
This is an educational research tool and not financial advice. Past or hypothetical performance does not guarantee future results. Trading involves risk, including the risk of loss. Test thoroughly and use at your own discretion.
Script que requiere invitación
Solo los usuarios autorizados por el autor pueden acceder a este script. Tendrá que solicitar y obtener permiso para utilizarlo. Normalmente se concede previo pago. Para obtener más información, siga las instrucciones del autor o póngase en contacto directamente con MyAlgoIndex.
TradingView NO recomienda pagar o utilizar un script a menos que confíe plenamente en su autor y entienda cómo funciona. También puede encontrar alternativas gratuitas de código abierto en nuestros scripts de la comunidad.
Instrucciones del autor
Email: info@algoindex.com
Exención de responsabilidad
Script que requiere invitación
Solo los usuarios autorizados por el autor pueden acceder a este script. Tendrá que solicitar y obtener permiso para utilizarlo. Normalmente se concede previo pago. Para obtener más información, siga las instrucciones del autor o póngase en contacto directamente con MyAlgoIndex.
TradingView NO recomienda pagar o utilizar un script a menos que confíe plenamente en su autor y entienda cómo funciona. También puede encontrar alternativas gratuitas de código abierto en nuestros scripts de la comunidad.
Instrucciones del autor
Email: info@algoindex.com