
ORB Strategy Fixed – Advanced Breakout Robot
This is a highly sophisticated automated trading robot for cTrader designed to trade the Opening Range Breakout (ORB) strategy with professional-grade precision. Unlike basic bots, this algorithm uses Retrospective Range Calculation to ensure 100% accurate top/bottom wick detection and features a dual-mode entry system (Stop or Limit) to adapt to different market conditions.
It includes advanced risk management handles like Dynamic Slippage Correction, Immediate Reversal Logic, and Smart PDH/PDL Filtering.
1. Core Strategy & Entry Modes
- Retrospective Range Calculation: The bot does not rely on live ticks to find the range. Once the ORB period ends, it scans historical bar data to detect the absolute Highest Wick and Lowest Wick with zero error, even if the robot was started late.
- Dual Entry Modes:
- Stop Orders (Aggressive): Places a Buy Stop at the High and Sell Stop at the Low immediately when the range closes. Designed to catch fast momentum breakouts.
- Limit Orders (Conservative): Waits for price to break out and then places a Limit Order at the breakout level, waiting for a "break-and-retest" to improve Risk-to-Reward.
- Retracement Logic: For both modes, if a trade is closed, the bot prevents "chasing" by waiting for price to retrace to the ORB Mid-Line before enabling new pending orders.
2. Advanced Trade Filters
To ensure high-quality entries, the bot applies two major filters before placing any order:
- EMA Trend Filter: Checks if the price is on the correct side of a specific Exponential Moving Average (e.g., 200 EMA on H1).
- Buy: Price must be > EMA.
- Sell: Price must be < EMA.
- PDH/PDL Obstruction Filter: A "Smart Logic" feature that scans the path to your Take Profit. If the Previous Day’s High (PDH) or Low (PDL) is sitting between your entry and your TP, the bot cancels the trade to avoid buying into major resistance.
3. Professional Risk & Trade Management
- Dynamic Slippage Correction: In high volatility, if a Stop Order is filled with slippage, the bot immediately recalculates the SL and TP based on the actual fill price versus the opposite ORB level. This ensures your Stop Loss is always anchored to market structure, not an arbitrary pip distance.
- Immediate Reversal (Stop & Reverse): Specific to Stop Orders—if a Buy Stop is triggered, the bot immediately places a Sell Stop at the opposite end of the range. If the breakout fails and reverses, the bot automatically switches sides to catch the reversal.
- Auto-BreakEven: Automatically moves the Stop Loss to the entry price (plus a configurable pip offset) once the trade moves into profit by a specific Ratio.
- Order Cancellation: (For Limit Orders) If price runs to a certain profit level without filling the Limit Order, the pending order is cancelled to prevent entering a stale setup.
4. Visuals & Operational Control
- Chart Visuals: Automatically draws the ORB High (Red), ORB Mid (Yellow), ORB Low (Green), and Previous Day High/Low (Blue Dots) accurately on the chart.
- Session Hard Stop: Configurable option to forcefully close all open positions and delete pending orders precisely at the session end time.
- Daily Limits & Schedule: Includes a "Max Trades Per Session" cap and specific Day-of-Week toggles to avoid trading on specific days.
Logic Flow Summary
- Wait for Session Start.
- Scan History to find the exact Top/Bottom wicks of the ORB period.
- Check Filters (EMA + PDH/PDL Clearance).
- Place Orders:
- Stop Mode: Places Bracket Orders immediately.
- Limit Mode: Waits for a break, places Limit at retest level.
- Monitor Execution: If filled, instantly adjust SL/TP for slippage.
- Reversal: If Stop Mode, place opposite pending order immediately.
- Re-Entry: If trade closes, wait for price to touch Mid-Line before resetting.
- Clean Up at Session End.
Details about parameters
1. Strategy Setup
- Entry Order Type: Defines the entry logic.
- Stop: Places a Buy Stop at the ORB High and Sell Stop at the ORB Low immediately after the range closes. Best for capturing strong momentum breakouts. Includes Immediate Reversal logic (if Buy Stop fills, a Sell Stop is placed at the Low).
- Limit: Waits for the price to break out first, then places a Limit Order at the breakout level. Best for "Break-and-Retest" strategies to improve Risk-to-Reward.
- ORB Period (Minutes): The duration of the "Opening Range" in minutes.
- Example: If set to
15, the bot calculates the High/Low of the first 15 minutes after the Start Time.
- Example: If set to
2. Risk Management
- Risk Percent: The percentage of your account balance you are willing to lose per trade.
- The bot automatically calculates the lot size so that if the Stop Loss is hit, you lose exactly this percentage (e.g., 1.0%).
3. Time Settings
- Session Start (HH:mm UTC): The specific Server Time to begin the strategy.
- The bot starts measuring the High/Low candle wicks from this minute onwards.
- Session End (HH:mm UTC): The specific Server Time to stop trading.
- At this time, no new orders are placed, pending orders are cancelled, and (optionally) open positions are closed.
4. Trade Management
- Cancel RR Ratio (Limits only): Determines when to cancel a pending Limit Order if the price runs away without filling it.
- Example: If set to
1, and the price moves 1x the Risk Distance away from the entry, the pending limit order is cancelled to avoid entering a "stale" trade.
- Example: If set to
- Move to BE RR Ratio: The profit target (in Risk Ratios) at which the Stop Loss is moved to BreakEven.
- Example: If set to
1, the SL moves to entry once the trade is floating +1R in profit.
- Example: If set to
- BreakEven Offset (pips): The number of pips added to the entry price when moving to BreakEven.
- Usage: Use this to cover commissions/swap (e.g.,
1.0pip).
- Usage: Use this to cover commissions/swap (e.g.,
- TP Ratio: The Take Profit multiplier relative to the Risk Distance.
- Example:
2.0means the Take Profit distance is twice the size of the Stop Loss distance (1:2 Risk-Reward).
- Example:
- SL Ratio: The Stop Loss size relative to the ORB Range.
1.0: Stop Loss is placed exactly at the opposite ORB level.0.5: Stop Loss is placed at the ORB Mid-Line.- Note: This handles the Dynamic Slippage logic. If slippage occurs, the SL expands to maintain this ratio relative to the chart structure.
- Re-Enter at ORB Break after TP?: If
Yes, allows the bot to take another trade in the same session if the first one hits Take Profit. - Constraint: The bot will strictly wait for price to retrace to the ORB Mid-Line before enabling re-entry.
- Close Trades on Session End?:
True: Forcefully closes all open positions (Market Orders) at the Session End time.False: Only cancels Pending Orders, but allows active running trades to continue managing themselves (SL/TP) overnight.
- Max Trades Per Session: A hard limit on the total number of trades allowed per day to prevent over-trading in choppy markets.
5. EMA Filter
- Enable EMA Filter: Toggles the trend filter on/off.
- EMA Period: The length of the Exponential Moving Average (e.g.,
200). - EMA TimeFrame: The timeframe used for the EMA calculation (e.g.,
Hour1), independent of the chart you are running the bot on. - Logic: Buy trades are only allowed if Price > EMA; Sell trades only if Price < EMA.
6. PDH/PDL Filter (Smart Obstruction)
- Enable PDH/PDL Filter: Toggles the Previous Day High/Low filter.
- Logic: The bot calculates where your Take Profit would be. If the Previous Day's High or Low is located between your Entry and your Take Profit, the trade is blocked. This prevents buying directly into yesterday's resistance or selling into support.
7. Trading Days
- Trade on Monday - Sunday: Simple checkboxes to enable or disable the strategy for specific days of the week.







![Logótipo de "[Fx4U] GBPUSD - Price Action"](https://market-prod-23f4d22-e289.s3.amazonaws.com/35745914-e21c-4e29-9b58-8d262d81e84f_Wallpaper.jpg)


.png)
.png)







![Logótipo de "[Stellar Strategies] SP500 Gap Closure cBot 1.0"](https://market-prod-23f4d22-e289.s3.amazonaws.com/62a77232-02a9-423b-a5e4-bd2c2bc8db97_cT_cs_4141285_US500_2025-03-21_17-12-57.png)