PROTECTED SOURCE SCRIPT

US Market ORB Atlas Strategy

93
US Market ORB Atlas Strategy

Version and compatibility

• Pine Script v6 used
• request.security uses lookahead off everywhere
• Strategy execution uses standard candles only
• UI text is English

Summary in one paragraph

Opening Range Breakout strategy for liquid US index futures, large cap equities, and major US ETFs on intraday timeframes. It helps you act only when the opening range is completed, volatility context is acceptable, and optional direction gating is aligned. It is original because it treats the opening range as a session state machine and uses an ATR normalized range quality gate plus an optional higher timeframe EMA slope gate for direction instead of a simple price above or below MA check. Add it to a clean chart, read the compact table, and use the visuals or alerts. Shapes can move while the bar is open and settle on close. For conservative alerts select on bar close.

Scope and intent

• Markets. US index futures, liquid US ETFs, large cap equities
• Timeframes. Intraday only, from one minute up to hourly charts
• Default demo used in the publication. NQ/MNQ on 5 minutes
• Purpose. Provide a disciplined ORB framework that avoids trading before the range exists and avoids low quality opening ranges relative to current volatility
• Limits. This is a strategy. Orders are simulated on standard candles only

Originality and usefulness

• Unique concept or fusion. ORB plus an ATR normalized opening range gate plus optional higher timeframe EMA slope direction gating, all coordinated by explicit session state and a compact table audit trail
• What failure mode it addresses. Reduces false starts from trading inside an unfinished opening range and filters sessions where the opening range is disproportionately small or large relative to ATR, which can degrade breakout reliability
• Testability. Inputs expose each gate, and the table prints the live state so users can see what is blocking entries and tune thresholds
• Portable yardstick. OR size is measured in ATR units for cross symbol portability
• Protected scripts. The implementation is published in protected mode to reduce direct copy paste cloning of the exact execution details and UI wiring while the full method, parameters, and usage are disclosed so traders can evaluate behavior and reproduce the logic conceptually

Method overview in plain language

Base measures

• Opening range. During the configured RTH session, the model records the high and low of the first N minutes. Once N minutes completes, OR High, OR Low, and OR Mid are fixed for that day.
• Volatility unit. ATR on the chart timeframe is used to normalize the OR size and optionally to set stop and target distances.

Components

• Session state machine. The script detects when the chart is inside the RTH window and resets daily counters at the first RTH bar. It then builds the opening range for a fixed number of bars derived from “Opening range minutes” and the chart timeframe.
• Breakout triggers. Long trigger is OR High plus optional padding expressed as a fraction of ATR. Short trigger is OR Low minus the same padding.
• Volatility gate. Once the range is built, OR size is divided by ATR. Trades are only allowed when this value is between “Min OR size (ATR fraction)” and “Max OR size (ATR fraction)”.
• Direction gate optional. If enabled, the model uses a higher timeframe EMA and its slope. Rising EMA slope allows longs. Falling EMA slope allows shorts. This is intentionally symmetric and avoids blocking shorts simply because price is above a slow MA.
• Risk guardrails. A max trades per day counter limits participation. Optional daily loss cap stops new entries and can flatten any open position if the drawdown from the day equity peak breaches the threshold.
• Exits. Stop can be either the opposite OR boundary or an ATR multiple. Take profit can be RR, range multiple, ATR multiple, or none. A time stop can close positions after a fixed number of minutes. Optional exit before RTH close closes positions a set number of minutes before the session ends.

Fusion rule

A trade is eligible only when all required gates are true simultaneously:
• Session is ON and opening range is READY
• Daily lockout is not active
• Volatility gate passes if enabled
• Trend gate passes for the respective direction if enabled
• Trade count for the day is below the max

Signal rule

• Long suggestion appears when the OR is ready and price confirms above the long trigger using the selected entry mode
• Short suggestion appears when the OR is ready and price confirms below the short trigger using the selected entry mode
• WAIT is implied whenever any required gate is missing, which you can diagnose via the table fields
• IN LONG or IN SHORT is defined by an open strategy position

What you will see on the chart

• Markers on suggestion bars. L for long and S for short
• Reference levels. OR High, OR Low, OR Mid, and trigger lines when enabled
• Optional background shading for the RTH session
• Compact table in the top right with state, session status, OR stats, ATR, gate outcomes, and daily counters

Table fields and quick reading guide

• State. BUILD while opening range is forming, READY after it is fixed, LOCKED when daily loss cap is active
• In RTH. Yes when inside the configured RTH window
• OR bars. How many chart bars are used to build the OR for the chosen minutes
• OR range. OR High minus OR Low
• ATR. Current ATR value on the chart timeframe
• Vol OK. Whether OR size in ATR units is within the min and max
• TrendSlope. Higher timeframe EMA slope used by the optional trend gate
• Trades. Trades taken today versus max
• Day DD percent. Current drawdown from the day equity peak if the daily cap is enabled

Inputs with guidance

Setup

• RTH Session (New York). Typical 0930 to 1600. Verify symbol exchange timezone
• Enable longs, Enable shorts. Turn off a side to isolate behavior

Logic

• Opening range minutes. Typical 5 to 60. Larger ranges trade less and can reduce noise
• Entry mode. Stop on break enters on a stop trigger. Close confirmation waits for a candle close beyond the trigger
• Breakout padding (ATR fraction). Typical 0 to 0.50. Raising it demands cleaner expansion beyond the OR boundary

Filters

• Trend filter. Optional higher timeframe context. Use only if you want directional gating
• Trend timeframe. Typical 1D for intraday. Higher values make the gate slower
• Trend EMA length. Typical 50 to 200
• Volatility filter. ATR normalized OR size gate. Raises consistency across symbols
• Min OR size (ATR fraction). Typical 0.5 to 1.5. Raising it avoids very small OR days
• Max OR size (ATR fraction). Typical 2 to 4. Lowering it avoids already expanded opens

Risk

• Max trades per day. Typical 1 to 2 for ORB
• Daily loss cap. When enabled, locks new entries and can flatten positions on breach
• Position sizing. Fixed qty or risk percent sizing using point value where available

Exits

• Stop mode. Opposite OR for structure based stops, ATR for volatility scaled stops
• Stop ATR multiple. Typical 1.0 to 2.0
• Take profit mode. RR, range multiple, ATR multiple, or none
• RR multiple. Typical 1.5 to 4
• TP range multiple. Typical 1.0 to 3.0
• TP ATR multiple. Typical 1.0 to 4.0
• Use time stop. Closes positions after a fixed time in minutes
• Exit before RTH close. Optional flattening before session end

UI

• Show OR levels. Plots OR boundaries and trigger lines
• Shade RTH. Adds subtle session shading
• Show dashboard. Table with state and gate diagnostics

Usage recipes

Intraday trend focus

• Trend filter ON
• Trend timeframe 1D
• Entry mode Close confirmation
• Breakout padding 0.25
• Volatility filter ON with Min OR size 1.0 and Max OR size 3.0
• Stop mode ATR with 1.5 and TP ATR multiple 2.0

Intraday mean reversion focus

This script is built for breakouts. Mean reversion use is limited to selecting tighter OR minutes and stricter volatility gating to avoid noisy chop rather than inverting the logic.

• Trend filter OFF
• Opening range minutes 15 to 30
• Breakout padding 0.0 to 0.15
• Volatility filter ON and raise Min OR size slightly to avoid micro ranges


Properties visible in this publication

• Initial capital 25000
• Base currency USD
• request.security uses lookahead off everywhere
• Strategy only. Default order size method Quantity with value 1. Pyramiding 0. Commission cash per contract 3. Slippage 4 ticks. Process orders on close ON. Bar magnifier ON. Recalculate after order is filled OFF. Calc on every tick OFF.

Realism and responsible publication

• No performance claims. Past results never guarantee future outcomes
• Shapes can move while a bar forms and settle on close
• Strategies use standard candles for signals and orders. Non standard chart types are not supported for strategies
• If stop and target can be hit within one bar, fills depend on TradingView engine assumptions and venue conditions

Honest limitations and failure modes

• News releases and thin liquidity can produce gap or spike behavior that violates OR assumptions
• Gap heavy symbols may behave better with ATR based stops rather than opposite OR stops
• Very quiet regimes can reduce signal contrast even if volatility gating passes. Consider longer OR minutes or tighter min OR size
• Session windows use the exchange time of the chart. Verify when changing symbol or venue
• If both stop and target can be hit within one bar, results depend on intrabar path assumptions. Use bar magnifier for higher fidelity when available

Open source reuse and credits

None

Legal

Education and research only. Not investment advice. You are responsible for your decisions. Test on historical data and in simulation before any live use. Use realistic costs.

Strategy notice

Orders are simulated by the TradingView engine on standard candles. request.security uses lookahead off everywhere. Non standard chart types are not supported for strategies.


免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。