Tarea técnica
Freedom ORB – Fully Automated MT5 Expert Advisor (ORB + Structure + Liquidity)
Project Description
I require a fully automated MT5 Expert Advisor based on a structured Opening Range Breakout (ORB) model with market structure and liquidity confirmation.
The EA must:
-
Detect ORB session range
-
Wait for breakout (close-based)
-
Wait for retrace
-
Confirm M1 structure + displacement
-
Execute trade automatically
-
Plot SL and TP on chart
-
Enforce one trade per session (optional setting)
The logic must be non-repainting and stable in live and strategy tester environments.
Strategy Logic Requirements
1. Opening Range (ORB)
-
Session time configurable (broker/server time)
-
ORB range drawn on chart
-
Breakout only valid on candle close outside range
-
Wick breaks ignored
-
ORB must freeze once session ends
2. Retrace Phase
After valid breakout:
-
Price must retrace back toward ORB zone
-
Once retrace occurs, EA becomes “Armed”
-
No trade before retrace
3. Entry Confirmation (M1 Logic)
Once armed:
Entry requires:
-
Break of Structure (BOS) in trade direction
-
Displacement candle confirmation
Displacement definition:
-
Candle body ≥ configurable % of full candle (default 60%)
-
Candle size ≥ ATR(14) × multiplier (default 1.2)
-
Entry only on candle close
4. Liquidity Sweep Filter (Optional Toggle)
Before BOS:
-
Detect sweep of prior high/low
-
Or equal highs/lows violation
-
Entry only allowed after liquidity event (if enabled)
Trade Execution Requirements
When all conditions are met:
-
Open market order
-
Automatically calculate lot size based on risk %
-
SL placed at:
-
Structure low/high (configurable)
-
OR fixed pip distance option
-
-
TP placed at:
-
Risk:Reward ratio (configurable)
-
OR ADR target option
-
Visual Requirements (Important)
After trade opens, EA must:
-
Plot horizontal SL line
-
Plot horizontal TP line
-
Show entry arrow
-
Display trade info panel including:
-
Session status
-
Current bias
-
Risk %
-
R:R
-
Active trade status
-
SL/TP lines must remain visible until trade closes.
Structure Logic
BOS:
-
Must be based on confirmed swing highs/lows
-
Must require candle close beyond swing
-
No wick-only BOS
-
No repaint after candle close
CHOCH (optional display):
-
Mark first structural break against trend
-
Must not repaint
ADR Module
-
ADR period configurable
-
Plot ADR High and ADR Low
-
Must be fixed from daily open
-
Must not dynamically recalculate during day
Session Settings
Configurable sessions:
-
Asian
-
London
-
New York
Options:
-
One trade per session (true/false)
-
Broker GMT offset input
Inputs Required
-
Risk %
-
R:R
-
ATR Period
-
ATR Multiplier
-
Displacement Body %
-
Swing Length
-
Session Start/End
-
One trade per session (bool)
-
Use Liquidity Filter (bool)
-
Magic Number
Non-Repainting Requirement
The following must not repaint after candle close:
-
BOS
-
Liquidity events
-
Armed state
-
ADR levels
-
ORB levels
Historical signals must remain fixed.
Compatibility
-
Must work on MT5
-
Must work on 5-digit brokers
-
Tested on FTMO server (GMT+2 winter / GMT+3 summer)
-
Must work correctly in Strategy Tester visual mode
Deliverables
-
.ex5 compiled file
-
.mq5 source file
-
Preset (.set) file
-
Installation instructions
Performance
-
No lagging
-
No excessive CPU use
-
No duplicate trade execution
-
Stable on live tick data
If everything works as specified and passes visual testing, payment will be released.
This version is:
-
Professional
-
Clear
-
Attractive to serious devs
-
Leaves no ambiguity
-
Protects you from repainting issues
-
Ensures SL/TP visibility