Auftrag beendet
Spezifikation
📘 Expert Advisor (EA) Development Brief: Daily Bias Breakout EA
📌 Core Strategy Overview
Develop an EA for MetaTrader 5 (MT5) that:
-
Determines market bias using the previous daily candle.
-
Sets a configurable time window (e.g., 7:00 AM – 10:00 AM EST) to define the range (high/low).
-
Executes a Buy Stop or Sell Stop at the breakout of this range based on the bias.
-
Includes risk-based lot sizing, re-entry logic, and a real-time dashboard.
🔁 Daily Workflow Summary
-
At start of each new day:
-
Detect the previous day's daily candle bias:
-
Bullish if Close > Open .
-
Bearish if Close < Open .
-
No trade if Close == Open .
-
-
-
During configurable window (e.g., 7:00 AM – 10:00 AM EST):
-
Mark the High and Low of candles within this period.
-
Wait until the end of the window (e.g., 10:00 AM).
-
Based on the daily bias:
-
If bullish → place Buy Stop at the high.
-
If bearish → place Sell Stop at the low.
-
-
Stop Loss (SL): Opposite end of range.
-
Take Profit (TP): Based on Risk: Reward (e.g., 1:2, 1:3) — configurable.
-
-
If SL is hit:
-
Re-entry is triggered after delay (e.g., 30 sec, 1 min, 5 min — configurable).
-
Re-entry uses same entry, SL, TP.
-
Optional: Reduce lot size on each retry.
-
Limit number of re-tries — configurable.
-
⚙️ Configurable Inputs
| Parameter | Description |
|---|---|
| TradeBiasSource | Previous Daily Candle (default) |
| TimeZone | EST / GMT / Broker time — with automatic conversion |
| TradeWindowStart | e.g., 07:00 (user time zone) |
| TradeWindowEnd | e.g., 10:00 (user time zone) |
| MaxReEntries | e.g., 2 |
| ReEntryDelaySeconds | e.g., 60 |
| ReduceLotOnRetry | True/False |
| LotSizeCalculationMode | Fixed lot / % Balance / Fixed $ Risk |
| RiskPerTrade | e.g., 1% |
| RiskRewardRatio | e.g., 1:2, 1:3 — also user-defined |
| MaxSpread | e.g., 30 points |
| AllowReEntries | True/False |
| TradeDaysFilter | Optional — exclude certain weekdays |
| EnableTrading | On/Off switch for all trading |
🔐 Risk Management
-
Only one trade per day (excluding re-entries).
-
Re-entries are independent and tracked separately.
-
Trade is only executed if spread ≤ MaxSpread.
-
All instruments supported: Gold, US30, EURUSD, BTCUSD, etc.
🧾 Dashboard Requirements
Real-time panel showing:
-
Current New York, London, Broker server time
-
Detected daily bias (Bullish/Bearish/None)
-
Trading window selected and its converted broker time range
🧠 Logic Notes
-
EA should handle automatic time zone conversion internally.
-
Developer must:
-
Focus on reliability and accuracy of time calculations and range marking.
-
Use robust SL/TP logic.
-
-
Trade logic must be server time agnostic (i.e., convert user time window to server time dynamically).
🧪 Testing and Delivery
-
EA must be fully tested in both Strategy Tester and forward demo.
-
Developer is responsible for all QA testing before delivery.
-
I (the client) will test for 3 weeks in live market before final acceptance, error restarts this.
-
Final delivery includes:
-
Compiled .ex5 file
-
Source code (.mq5)
-
Brief documentation of logic and settings
-
📝 Naming Suggestion
"Daily Bias Range Breakout EA"
Short name: DBRB-EA