OPEN-SOURCE SCRIPT
Gecko ORB Small Range Breakout Strategy v1.4

**ORB Small Range Breakout Strategy**
This strategy trades breakouts of the opening range, but only when that range is small or medium relative to price — the idea being that a tight, low-volatility opening range has more room left to run than one that has already made a large move.
**How it works**
1. **Opening Range (ORB):** The script builds a high/low range over a configurable start and end time (default 08:00–08:25, exchange-local time). This window is fully configurable, so the script works on any market/session — LSE, JSE, or otherwise — without modification.
2. **Classification:** Once the opening range closes, its size is measured as a percentage of the opening price and classified as SMALL, MEDIUM, or LARGE based on two adjustable thresholds. Only SMALL and MEDIUM ranges are considered tradeable; LARGE ranges are skipped for that session.
3. **Entry:** Within a configurable entry window after the opening range closes (default cutoff 11:00), a long is triggered on a close above the range high, and a short on a close below the range low — one trade per session, first breakout only.
4. **Stop/Target:** The stop is placed at the opposite side of the opening range. Take-profit can be set to a fixed R-multiple, a projection of the opening range's size, or disabled entirely (stop-only).
5. **Session close:** Optionally, any open position is force-closed at a configurable time of day.
**Inputs**
- Opening Range start/end time
- Entry cutoff time
- SMALL/LARGE classification thresholds (%)
- Take-profit mode (R-multiple, ORB projection, or none) and multiplier
- Optional end-of-session exit time
**Notes**
- The opening range and entry window are drawn on the chart (box + lines) each session so you can visually verify what the strategy is reacting to.
- This script does not use repainting logic — all decisions are based on confirmed price action within the defined windows.
- Backtest results shown in the Strategy Tester do not account for slippage or commissions unless configured in the strategy properties; please set these to match your broker before drawing conclusions from the equity curve.
- This script is provided for educational and informational purposes only. Past performance, whether real or simulated, is not indicative of future results. Nothing here constitutes financial advice — always test thoroughly and understand the logic before using any strategy with real capital.
This strategy trades breakouts of the opening range, but only when that range is small or medium relative to price — the idea being that a tight, low-volatility opening range has more room left to run than one that has already made a large move.
**How it works**
1. **Opening Range (ORB):** The script builds a high/low range over a configurable start and end time (default 08:00–08:25, exchange-local time). This window is fully configurable, so the script works on any market/session — LSE, JSE, or otherwise — without modification.
2. **Classification:** Once the opening range closes, its size is measured as a percentage of the opening price and classified as SMALL, MEDIUM, or LARGE based on two adjustable thresholds. Only SMALL and MEDIUM ranges are considered tradeable; LARGE ranges are skipped for that session.
3. **Entry:** Within a configurable entry window after the opening range closes (default cutoff 11:00), a long is triggered on a close above the range high, and a short on a close below the range low — one trade per session, first breakout only.
4. **Stop/Target:** The stop is placed at the opposite side of the opening range. Take-profit can be set to a fixed R-multiple, a projection of the opening range's size, or disabled entirely (stop-only).
5. **Session close:** Optionally, any open position is force-closed at a configurable time of day.
**Inputs**
- Opening Range start/end time
- Entry cutoff time
- SMALL/LARGE classification thresholds (%)
- Take-profit mode (R-multiple, ORB projection, or none) and multiplier
- Optional end-of-session exit time
**Notes**
- The opening range and entry window are drawn on the chart (box + lines) each session so you can visually verify what the strategy is reacting to.
- This script does not use repainting logic — all decisions are based on confirmed price action within the defined windows.
- Backtest results shown in the Strategy Tester do not account for slippage or commissions unless configured in the strategy properties; please set these to match your broker before drawing conclusions from the equity curve.
- This script is provided for educational and informational purposes only. Past performance, whether real or simulated, is not indicative of future results. Nothing here constitutes financial advice — always test thoroughly and understand the logic before using any strategy with real capital.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.