SPX ORB 60m → 0DTE Credit Spreads (Signals & Webhooks)

This indicator implements a 60-minute Opening Range Breakout (ORB) workflow for SPX and maps the first breakout during a monitoring window to a same-day options credit-spread idea. It’s signal-only (no backtesting) and includes both visual planning tools and automation hooks (webhooks/alerts).
How it works
ORB window: 09:30–10:30 New York. The script builds ORB High/Low and fixes them at 10:30.
Monitoring window: 10:31–12:00 New York.
The first wick break picks direction:
Break above ORB High → bullish bias → PUT credit spread idea (short strike below ORB Low − offset).
Break below ORB Low → bearish bias → CALL credit spread idea (short strike above ORB High + offset).
One signal per day. The bar is tagged “Fired PUT/CALL”.
Key inputs
Spread width ($), strike step ($), and independent short-strike offsets for PUT/CALL.
Eligibility thresholds by % of 09:30 open or points (separate minima for PUT vs CALL), plus an “ignore thresholds” test mode.
Day-of-week filters per side.
Preview before fire: show gray dotted “hypothetical” strikes only when eligible (or always), or hide until the actual trigger.
If the chosen side is blocked by weekday filter, you can still display it disabled (gray).
Visuals
ORB Rectangle: from 10:30 to 16:00 NY spanning ORB High/Low; updates intraday and then stays fixed. Optional label shows the range in pts and %.
Executed lines & labels: customizable style and width; colorized after the first trigger.
“NOT ELIGIBLE” gray label (optional) when thresholds/day filters are not met.
Outcome tag at session close (informational): WIN/LOSE relative to the short strike.
ORB High/Low plotted with plot.style_linebr for clean session edges.
Probability box (informational)
Optional box displayed at the breakout with a 0–100% composite score from:
ORB/ATR size (capped),
ADX (Wilder calculation inside the script),
ATR regime vs a long SMA baseline.
All lengths, caps, weights, colors and opacity are configurable, including a time offset to place the box.
Automation
Two backends supported: DigitalOcean server.js or SignalStack (Tastytrade).
Optional limit_price per leg and time_in_force (day/gtc) for SignalStack.
Alertconditions provided for PUT / CALL signals so you can create alerts from the TradingView dialog.
Additionally, the script can emit alert() payloads on trigger (enable in settings) to drive your webhook.
Notes
Designed for intraday NY session; 1–15m charts are typical.
Signals are for automation/planning, not recommendations. Validate risk, fills, and routing.
Disclaimer
For educational/informational purposes only. Not financial advice. Options trading involves substantial risk.
Tập lệnh chỉ hiển thị cho người được mời
Chỉ những người dùng được tác giả đồng ý mới có thể truy cập tập lệnh này. Bạn cần yêu cầu và xin phép sử dụng tập lệnh này. Quyền truy cập thường được cấp sau khi thanh toán. Để biết thêm chi tiết, hãy làm theo hướng dẫn của tác giả bên dưới hoặc liên hệ trực tiếp với mauricio_a_morales.
TradingView KHÔNG khuyến khích trả tiền hoặc sử dụng tập lệnh trừ khi bạn hoàn toàn tin tưởng tác giả và hiểu cách hoạt động của tập lệnh. Bạn cũng có thể tìm thấy các giải pháp thay thế miễn phí, mã nguồn mở trong mục tập lệnh cộng đồng của chúng tôi.
Hướng dẫn của tác giả
Cảnh báo: vui lòng đọc hướng dẫn của chúng tôi về các tập lệnh chỉ dành cho người được mời trước khi yêu cầu quyền truy cập.
Thông báo miễn trừ trách nhiệm
Tập lệnh chỉ hiển thị cho người được mời
Chỉ những người dùng được tác giả đồng ý mới có thể truy cập tập lệnh này. Bạn cần yêu cầu và xin phép sử dụng tập lệnh này. Quyền truy cập thường được cấp sau khi thanh toán. Để biết thêm chi tiết, hãy làm theo hướng dẫn của tác giả bên dưới hoặc liên hệ trực tiếp với mauricio_a_morales.
TradingView KHÔNG khuyến khích trả tiền hoặc sử dụng tập lệnh trừ khi bạn hoàn toàn tin tưởng tác giả và hiểu cách hoạt động của tập lệnh. Bạn cũng có thể tìm thấy các giải pháp thay thế miễn phí, mã nguồn mở trong mục tập lệnh cộng đồng của chúng tôi.
Hướng dẫn của tác giả
Cảnh báo: vui lòng đọc hướng dẫn của chúng tôi về các tập lệnh chỉ dành cho người được mời trước khi yêu cầu quyền truy cập.