PROTECTED SOURCE SCRIPT
Updated JAM ORB Algo

⚡ ORB Strategy + Backtesting (Pine Script v5)
This script implements a complete Opening Range Breakout (ORB) strategy, featuring built-in backtesting, advanced TP/SL visualization, full style customization, and a performance dashboard. It is designed for traders who want to clearly evaluate breakout performance directly on the chart.
🕑 ORB Window Configuration
🔹 Session selection: choose between Market Timezone or Custom Session.
🔹 Timezone support: configurable from UTC-8 to UTC+12.
🔹 Daily limit: option to allow only one trade per day.
🔹 Risk/Reward (RR) settings:
Configurable TP1, TP2, and TP3 levels.
Stop Loss calculated dynamically from the ORB range.
📊 Backtesting Engine
🔹 Interactive dashboard showing trades, wins, losses, and win rate.
🔹 Adjustable partial exits for each TP (TP1, TP2, TP3).
🔹 Automatic calculation of percentage-based profit and loss.
🔹 Tracks total trades, total profit, and average profit per trade.
🎨 Visual Customization
🔹 Fully customizable colors:
ORB high/low lines and range fill.
Buy/Sell entry labels.
TP and SL lines with background zones.
🔹 Line style and thickness options (solid, dotted, dashed).
🔹 Visibility controls for each TP/SL level.
🔹 Clear profit and loss zones drawn directly on the chart.
🚀 Trading Logic
🔹 LONG entries: triggered when price breaks above the ORB high.
🔹 SHORT entries: triggered when price breaks below the ORB low.
🔹 Automatic calculation of Stop Loss and TP1, TP2, TP3 based on ORB range and RR.
🔹 Customizable BUY / SELL labels displayed at entry.
✅ TP / SL Detection
🔹 Real-time detection of TP1, TP2, TP3, and SL hits.
🔹 Prevents double counting of the same level.
🔹 Extended TP/SL lines with shaded zones for better clarity.
📈 Backtesting Dashboard
🔹 Displayed in the top-right corner of the chart.
🔹 Shows:
Total trades
Wins / Losses
Win rate (%)
Total profit (%)
Average profit per trade
🔹 Fully customizable panel color.
✨ Summary
This script combines:
Opening Range detection
Breakout trading logic with advanced risk management
Professional-grade visualizations
Integrated historical performance tracking
High customization for sessions, styles, and colors
💡 Ideal for traders who want to trade ORB setups with clarity, structure, and measurable results.
This script implements a complete Opening Range Breakout (ORB) strategy, featuring built-in backtesting, advanced TP/SL visualization, full style customization, and a performance dashboard. It is designed for traders who want to clearly evaluate breakout performance directly on the chart.
🕑 ORB Window Configuration
🔹 Session selection: choose between Market Timezone or Custom Session.
🔹 Timezone support: configurable from UTC-8 to UTC+12.
🔹 Daily limit: option to allow only one trade per day.
🔹 Risk/Reward (RR) settings:
Configurable TP1, TP2, and TP3 levels.
Stop Loss calculated dynamically from the ORB range.
📊 Backtesting Engine
🔹 Interactive dashboard showing trades, wins, losses, and win rate.
🔹 Adjustable partial exits for each TP (TP1, TP2, TP3).
🔹 Automatic calculation of percentage-based profit and loss.
🔹 Tracks total trades, total profit, and average profit per trade.
🎨 Visual Customization
🔹 Fully customizable colors:
ORB high/low lines and range fill.
Buy/Sell entry labels.
TP and SL lines with background zones.
🔹 Line style and thickness options (solid, dotted, dashed).
🔹 Visibility controls for each TP/SL level.
🔹 Clear profit and loss zones drawn directly on the chart.
🚀 Trading Logic
🔹 LONG entries: triggered when price breaks above the ORB high.
🔹 SHORT entries: triggered when price breaks below the ORB low.
🔹 Automatic calculation of Stop Loss and TP1, TP2, TP3 based on ORB range and RR.
🔹 Customizable BUY / SELL labels displayed at entry.
✅ TP / SL Detection
🔹 Real-time detection of TP1, TP2, TP3, and SL hits.
🔹 Prevents double counting of the same level.
🔹 Extended TP/SL lines with shaded zones for better clarity.
📈 Backtesting Dashboard
🔹 Displayed in the top-right corner of the chart.
🔹 Shows:
Total trades
Wins / Losses
Win rate (%)
Total profit (%)
Average profit per trade
🔹 Fully customizable panel color.
✨ Summary
This script combines:
Opening Range detection
Breakout trading logic with advanced risk management
Professional-grade visualizations
Integrated historical performance tracking
High customization for sessions, styles, and colors
💡 Ideal for traders who want to trade ORB setups with clarity, structure, and measurable results.
Release Notes
Alerts AddedRelease Notes
Alerts AddedBUY Alert
SELL Alert
Release Notes
Recomended R:R addedThis for elevate your trading and improve results.
Given the volatility you can adjust the R:R to use it when the market give you different movements
Release Notes
Final Update V1Release Notes
ORB Strategy – Opening Range Breakout with Monthly DashboardORB Strategy is an Opening Range Breakout (ORB) indicator designed to trade the New York session with clarity, discipline, and strong visual structure. The script identifies the initial market range and generates clear BUY and SELL signals when price breaks out of that range, supported by full risk management visuals and a monthly performance dashboard.
🔹 How it works
Automatically defines the Opening Range between 09:30 and 10:00 (New York time).
Draws ORB High / ORB Low levels and visually fills the range.
Generates one trade per day (configurable).
Detects bullish (BUY) and bearish (SELL) breakouts.
Calculates and plots Stop Loss and up to 3 Take Profit levels using Risk/Reward ratios.
Extends all lines and zones until the New York session close (16:00).
Includes clean BUY / SELL alerts (no emojis), suitable for automation and webhooks.
📊 Monthly Backtest Dashboard (Non-Repainting)
The built-in dashboard displays real-time monthly statistics, including:
Total trades
Winning trades
Losing trades
Win rate (%)
Total profit (%)
Average profit per trade (%)
All statistics are calculated using confirmed bar data only, ensuring no repainting.
🎨 Full Customization
ORB, TP, SL, and zone colors
Line styles and thickness
Signal symbols (▲ ▼ / △ ▽ / text)
Enable or disable visual elements
Stable and fully compatible with 15m and 30m timeframes
🔔 Alerts
Integrated BUY / SELL alerts
Clean text messages
Ideal for:
Notifications
Trading bots
Webhooks
Discretionary trading
⚠️ Notes
Educational and analytical indicator (not an execution strategy)
No repainting
Optimized for indices, stocks, and futures during the NY session
Designed for traders seeking structure, discipline, and transparency
Release Notes
JAM Algo ORB — NY RTH (Opening Range Breakout)This indicator builds an Opening Range Box (ORB) starting at the New York (NYSE) open and works weekdays only. You can select a preset ORB window of 5, 15, or 30 minutes. During that window, the ORB high/low is formed (using wicks or bodies). Once the window ends, the ORB is locked and does not extend into the next day.
Signals
After the ORB locks, the script detects breakouts:
Long when price breaks above the ORB high
Short when price breaks below the ORB low
Breakout detection can be based on Close / Wick / Cross, and optional confirmation modes are available:
None
N consecutive closes
Break + Retest (with tolerance based on ORB width)
Trade Visualization (SL/TP Boxes)
When an entry is confirmed (at the close of the signal bar), the script draws the classic SL/TP boxes:
Stop Loss (SL) = opposite side of the ORB (Long → ORB low, Short → ORB high)
Take Profit (TP) = default 1:1 RR (or fixed-distance TP if selected)
Boxes can be set to last up to 10 bars.
Outcome Logic (First Touch)
The trade result is evaluated starting from the next bar after entry:
The first level touched (TP or SL) determines win/loss
For timeframes above 1 minute, the script uses 1-minute intrabar data when available to resolve “which hit first” more accurately.
Dashboard (Current Month Only)
A compact dashboard shows current NY month performance:
Trades = number of executed entries
Win Rate % and Profit (R) = based only on trades that reached TP or SL
Alerts
Alerts are provided for:
Long entry (▲)
Short entry (▼)
TP
SL
Because Pine requires constant strings in alertcondition(), fixed messages are used there; customizable messages are available via alert() (create alerts using “Any alert() function call”).
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.