PROTECTED SOURCE SCRIPT

JFX Smart ORB

53
JFX Smart ORB is a complete visual trading framework built around the classic
Opening Range Breakout (ORB) concept, enhanced with:

Fixed position sizing (lots)

Automatic Martingale-style size increase after full SL only

A full, event-based alert system for entries, targets, stops, and break-even exits

All of that, plus a clean dual-language HUD (AR/EN) directly on your chart.

What JFX Smart ORB Does
🔹 Smart Opening Range (ORB)

Automatically defines the opening range via:

Fixed timeframe (e.g., 30 minutes), or

Custom session window (e.g., 09:30–09:45) with configurable time zone (UTC-5, etc.).

Plots ORH / ORL and the midline, and shades the OR building zone for visual clarity.

🔹 Regime Detection (Context)

Background shading tells you where price is trading:

📈 Green: Above ORH (bullish regime)

📉 Red: Below ORL (bearish regime)

🔵 Neutral: Inside the OR range

This gives you an instant read on context before you even think about entries.

🔹 Trade Logic & Multi-Target Management

Automatic entry when:

Price breaks ORH for long trades

Price breaks ORL for short trades

Stop loss on the opposite side of the range.

Targets calculated in R-multiples:

TP1 = 0.5R

TP2 = 1R

TP3 = 2R

Position is split across TP1 / TP2 / TP3 according to user-defined percentages, normalized automatically.

💰 Fixed Size + Martingale After Loss Only

Inputs:

Capital ($) – for display/analysis

Base Position Size (lots) – your standard trade size

Contract per 1.00 lot – to convert price movement to P/L in dollars

If a trade hits a full stop loss before TP1, the indicator:

Doubles the position size for the next trade (Martingale factor).

If the trade hits any profit (TP1, TP2, TP3) or closes at Break-Even, the:

Martingale factor resets back to 1× (base size).

Everything is tracked and shown on the chart: current trade size, P/L per trade, and net P/L.

🧠 Session Protection & Inner-Range Logic

Optional session block:

After a strong winning trade (e.g., TP2 or TP3), you can block any further trades for the rest of the ORB session to avoid overtrading.

Inner-range logic after TP1:

Prevents immediate re-entry in the same direction after a BE exit from TP1.

Waits for price to return into a defined inner range around the OR midline, filtering out random noise.

📊 On-Chart HUD / Stats (AR & EN)

The built-in info panel shows in real time:

Session status:

✅ Trading enabled

🚫 Trading disabled until a new ORB

⏳ Waiting for two bars back inside the range

Current price regime (Above ORH / Below ORL / Inside OR).

Entry price, stop loss, TP1, TP2.

Total trades, losing trades, and win rate.

Counts of TP1 / TP2 / TP3 hits.

Reported capital, current position size (lots).

Current trade P/L and total net P/L in dollars.

🔔 Full Alert System (Ready for Webhooks/Bots)

The indicator generates per-bar event flags that feed into alertcondition() so you can build any alert setup you want (pop-up, email, SMS, webhook, bot, EA, etc.).

Available alerts:

Buy Entry: JFX_ORB_BUY_ENTRY

Sell Entry: JFX_ORB_SELL_ENTRY

Stop Loss Hit: JFX_ORB_SL_HIT

TP1 Hit: JFX_ORB_TP1

TP2 Hit: JFX_ORB_TP2

TP3 Hit: JFX_ORB_TP3

Break-Even Exit: JFX_ORB_BE_EXIT

Simply create alerts in TradingView based on these conditions and messages, or plug them into your automation via webhooks.

Who Is JFX Smart ORB For?

Day traders and scalpers who like structured ORB strategies instead of random entries.

Traders who want clear, rule-based entries, well-defined stops and multi-target exits.

Anyone looking to combine ORB + position management + Martingale logic + Alerts in a single, professional tool.

Disclaimer:
This indicator is a professional analysis and trade-management tool, not a guarantee of profit.
Always test on demo first and adapt the position sizing and Martingale behavior to your own risk management and trading plan.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.