AAPL LEAPS & Swing System v1 · Long-Term Options Entry + Swing Stock Trades · VIX-Filtered · Earnings Blackout · IBKR Execution
AAPL-LSS-V1 is a dual-mode position-building system for Apple Inc. (AAPL) built on the thesis that the AI Siri upgrade cycle will drive price to the $320–$500 range over 6–18 months. The system operates two execution channels simultaneously: a LEAPS channel targeting deep in-the-money calls (Δ 0.70–0.80, 12–18mo DTE) for levered upside exposure, and a Swing channel for direct stock accumulation on technical pullbacks.
All signals are VIX-filtered and subject to a 7-day earnings blackout window. LEAPS and Swing signals route live orders to Interactive Brokers via the AAPL_HANDLER service. Accumulation tiers fire TradingView push/SMS alerts only — no IBKR routing.
LEAPS signals identify conditions where AAPL is oversold relative to its long-term trend — an ideal environment for purchasing deep ITM calls with 12–18 months of time value. Three conditions must align simultaneously.
| Condition | Threshold | Interpretation |
|---|---|---|
| RSI(14) | < 40 | Oversold — momentum exhaustion |
| Distance from 200 EMA | Within ±5% | Price near long-term mean — not extended |
| Earnings blackout | Must be CLEAR | No new entries within 7 days of earnings |
On a LEAPS_ENTRY signal, aapl_handler.py queries the IB option chain and selects
the optimal contract based on delta and expiration constraints.
| Parameter | Value | Notes |
|---|---|---|
| Option type | CALL | Right side only — no puts in this model |
| Delta target | 0.70 – 0.80 | Deep ITM — high intrinsic value, tracks stock closely |
| DTE range | 365 – 540 days | 12–18 months — sufficient runway for thesis to play out |
| Strike selection | 82–95% of spot | Empirical range for Δ 0.70–0.80 on 12–18mo AAPL calls |
| Fallback strike | 88% of spot | Used when no delta match found (≈ Δ 0.75 empirically) |
| Order type | Limit — midpoint | Bid/ask midpoint, DAY order, transmit=True |
| Budget | $5,000 (configurable) | qty = floor($budget / (mid × 100)) |
| Account (paper) | DU3317167 | Port 4002 — IB Paper Gateway |
| Account (live) | U5288143 | Port 4001 — requires IBKR_MODE=LIVE |
| clientId | 20 | Unique — does not conflict with PHANTOM (0-9) or BTC (10-19) |
leaps_entry = leaps_cond and not leaps_cond[1] — it fires only
on the first bar where all three conditions are true, not on every bar while conditions hold.
This prevents duplicate orders from sustained RSI weakness.
The swing channel fires stock orders to IBKR on two distinct technical patterns. Both require price to be clear of the earnings blackout window.
| Condition | Threshold | Interpretation |
|---|---|---|
| EMA 20 crosses above EMA 50 | ta.crossover(e20, e50) | Short-term momentum turning up |
| RSI | > 50 | Confirming bullish momentum — not fading |
| Volume | > 1.3× 20-period SMA | Institutional participation on the cross |
| Earnings blackout | Must be CLEAR | No new entries within 7 days of earnings |
model_id: AAPL_SWING_v1 · signal_type: SWING_EMA_CROSS
| Condition | Threshold | Interpretation |
|---|---|---|
| Price above 200 EMA | close > e200 | Long-term uptrend intact |
| Price near EMA 20 | Within ±1% of EMA 20 | Pulled back to short-term mean |
| Bullish engulfing candle | Current bar engulfs prior bear bar | Buyers absorbing the pullback |
| Earnings blackout | Must be CLEAR | No new entries within 7 days of earnings |
model_id: AAPL_SWING_v1 · signal_type: SWING_PULLBACK
| Parameter | Value |
|---|---|
| Instrument | AAPL stock (SMART routing) |
| Order type | Limit — spot × 1.001 (0.1% above signal price) |
| Budget | $2,000 (configurable) |
| Shares | floor($2,000 / signal_price) |
| TIF | DAY — expires if not filled by close |
Four tiered accumulation signals provide a systematic buying protocol for adding to long-term AAPL positions as price dislocates from fair value. These fire TradingView push/SMS alerts only — they do not route to NIGHTHAWK or IBKR. Manual execution required.
| Tier | Alert Name | Trigger | Deploy |
|---|---|---|---|
| T1 | Accum Tier 1 — 25% Buy | RSI < 40 and above 200 EMA (first bar) | 25% of accumulation budget |
| T2 | Accum Tier 2 — +25% | RSI < 35 and price ≤ lower Bollinger Band (first bar) | Add 25% |
| T3 | Accum Tier 3 — +25% | Price ≤ 90% of 52-week high (first bar) | Add 25% |
| T4 | Accum Tier 4 — Final 25% | VIX > 30 AND RSI < 30 — panic conditions (first bar) | Deploy final 25% |
alertcondition(), not alert() — static text payload
sent via TradingView push notification and SMS. No JSON webhook is generated. These must be
acted on manually in your IBKR account.
The live CBOE VIX is pulled via request.security("CBOE:VIX", "D", close) and
used in two ways: the dashboard table displays the current reading, and Tier 4 accumulation
uses it as a panic-buy trigger.
| VIX Level | Dashboard Color | Meaning |
|---|---|---|
| < 25 | Lime (green) | Low fear — normal market conditions |
| 25 – 30 | Orange | Elevated fear — VIX green light threshold (configurable) |
| > 30 | Red | High fear — Tier 4 accumulation trigger active |
metadata.vix.
This gives NIGHTHAWK and the execution log a snapshot of market fear at signal time — useful
for post-trade analysis and future model training.
A configurable blackout window (default 7 days) suppresses all LEAPS and Swing signals
in the period leading up to each Apple earnings release. The earnings dates are stored as
input.int(timestamp(...)) values and must be updated each quarter.
| Earnings Event | Date | Blackout Starts |
|---|---|---|
| Q3 FY2026 | 2026-07-31 | 2026-07-24 |
| Q4 FY2026 | 2026-10-30 | 2026-10-23 |
| Q1 FY2027 | 2027-01-29 | 2027-01-22 |
| Q2 FY2027 | 2027-04-30 | 2027-04-23 |
A separate earn_warn condition fires on the first bar of the blackout window —
triggering an alertcondition() SMS: "AAPL EARNINGS in 7 days — BLACKOUT ACTIVE."
The chart background turns orange during the entire blackout period.
| Element | Style | Description |
|---|---|---|
| LEAPS ENTRY label | Green triangle (below bar) | Shows RSI value and delta range — fires on edge trigger |
| SWING EMA CROSS label | Aqua triangle (below bar) | EMA 20/50 crossover confirmed |
| SWING PULLBACK label | Blue triangle (below bar) | Pullback to EMA 20 with engulfing |
| T1–T4 accumulation labels | Lime/orange/red (above bar) | Manual accumulation tier triggers |
| EARNINGS BLACKOUT label | Orange (above bar) | First bar of 7-day blackout window |
| $320 line | Yellow dashed | Resistance / first target |
| $350 line | Green dashed | Base case 12-18mo target |
| $400 line | Lime dashed | Bull case |
| $450 line | Teal dotted | Bull+ extended target |
| $500 line | Purple dotted | AI supercycle target |
A 2-column × 9-row table updates on every bar, showing real-time model state.
| Row | When Lime (✓) | When Gray / Other |
|---|---|---|
| RSI(14) | < 40 (lime) | > 70 (red), otherwise white |
| 200 EMA Δ% | |distance| ≤ 5% (lime) | White otherwise |
| VIX | < 25 (lime) | 25–30 orange, > 30 red |
| ZONE | GREEN ✓ (RSI < 35, ±5% EMA, VIX > 25) | RED ✗ or YELLOW — |
| LEAPS | ARMED ✓ (all conditions met) | WAITING — (gray) |
| EARNINGS | CLEAR (lime) | BLACKOUT ⚠ (orange) |
| LEAPS $ | Configured budget in dollars | |
| SWING $ | Configured budget in dollars | |
| Group | Parameter | Default | Notes |
|---|---|---|---|
| Signal Layers | LEAPS Signals | true | Toggle LEAPS entry labels and webhooks |
| Signal Layers | Swing Signals | true | Toggle swing entry labels and webhooks |
| Signal Layers | Accumulation Tier Labels | true | Toggle T1–T4 labels (alertcondition still fires) |
| Display | Zone Background Colors | true | Green / red / orange background tints |
| Display | Price Target Lines | true | $320 / $350 / $400 / $450 / $500 dashed lines |
| Display | Dashboard Table | true | Top-right status table |
| Display | Bollinger Bands | true | 20-period BB overlay (gray, 50% transparent) |
| Position Sizing | LEAPS Budget ($) | 5000 | Max capital deployed per LEAPS signal |
| Position Sizing | Swing Budget ($) | 2000 | Max capital deployed per swing signal |
| Indicators | RSI Length | 14 | Standard RSI lookback |
| Indicators | EMA Fast / Mid / Long | 20 / 50 / 200 | Three-EMA system |
| Indicators | BB Length / Multiplier | 20 / 2.0 | Standard Bollinger Bands |
| Indicators | Volume Multiplier | 1.3 | Minimum volume for EMA cross confirmation |
| VIX | VIX Green Light | 25.0 | VIX above this = low fear, green zone threshold |
| VIX | VIX Tier 4 Fear | 30.0 | VIX above this = T4 accumulation trigger eligible |
| Earnings | Blackout Days Before Earnings | 7 | Days before each earnings date to suppress signals |
| Earnings | Earnings 1–4 | Jul/Oct 2026, Jan/Apr 2027 | Update each quarter — use input.int(timestamp(...)) |
alert() with alert.freq_once_per_bar_close is used for all three
webhook signals. Accumulation tiers use alertcondition() (static text, push/SMS only).
| Alert Name | Event | Payload |
|---|---|---|
| Accum Tier 1 — 25% Buy | RSI < 40 above 200 EMA (first bar) | SMS text — no JSON |
| Accum Tier 2 — +25% | RSI < 35 at lower Bollinger Band (first bar) | SMS text — no JSON |
| Accum Tier 3 — +25% | Price 10% below 52-week high (first bar) | SMS text — no JSON |
| Accum Tier 4 — Final 25% | VIX > 30 AND RSI < 30 (first bar) | SMS text — no JSON |
| Earnings Blackout Start | First bar of 7-day blackout window | SMS text — no JSON |
All three webhook signals (LEAPS_ENTRY, SWING_EMA_CROSS, SWING_PULLBACK) arrive at
http://35.221.12.143/webhook (port 80, iptables → 8080) and are processed by
nighthawk/app.js. The model_id prefix AAPL_ triggers the IBKR forward block.
| model_id prefix | Forward Target | Port | Timeout |
|---|---|---|---|
AAPL_ | aapl_handler.py (FastAPI) | 8084 | 45,000ms (option chain lookup) |
MNQ / MNQ ticker | PHANTOM orchestration | 8081 | 5,000ms |
BTC-ACCUM-v1 | btc_accumulator | 8082 | 5,000ms |
models table before signals will execute live orders.
Status OBSERVATION = logs and SMS only. Status LIVE = full execution.
INSERT INTO models (model_id, status) VALUES ('AAPL_LEAPS_v1', 'OBSERVATION');INSERT INTO models (model_id, status) VALUES ('AAPL_SWING_v1', 'OBSERVATION');
Alt+P), paste aapl_leaps_signal.pine, click Add to chart. The script is an indicator — not a strategy — so no Strategy Tester is available.http://35.221.12.143/webhook.alertcondition() by name. These can route to TradingView email, push, and SMS — no webhook needed.pm2 status AAPL_HANDLER. Confirm /health returns {"status":"ok","mode":"PAPER","account":"DU3317167"}.IBKR_MODE=LIVE in .env → pm2 restart AAPL_HANDLER --update-env. Then update both model records in Sentinel to LIVE.| Field | LEAPS Model | Swing Model |
|---|---|---|
| model_id | AAPL_LEAPS_v1 | AAPL_SWING_v1 |
| status | OBSERVATION | OBSERVATION |
| Signal type | LEAPS_ENTRY | SWING_EMA_CROSS / SWING_PULLBACK |
| Execution | IBKR CALL option — find_leaps() | IBKR STOCK — limit order |
| Deployed | June 2026 | June 2026 |