仕事が完了した
指定
Objective:
Develop a custom Expert Advisor (EA) for MetaTrader 5 that trades based on a breakout of a specific reference candle.
Strategy Rules:
-
Reference Candle Selection:
-
User specifies a candle (e.g., 5-minute candle at 13:30).
-
EA marks the high and low of that candle.
-
-
Entry Direction:
-
The first subsequent candle whose body (not wick) closes outside the reference candle’s range sets the trading direction for the day.
-
If it closes above the high → only buy trades allowed for that day.
-
If it closes below the low → only sell trades allowed for that day.
-
-
-
Entry Execution:
-
Once direction is set:
-
For buy trades: Place a buy limit order at the high of the reference candle.
-
For sell trades: Place a sell limit order at the low of the reference candle.
-
-
Stop Loss (SL): opposite side of the reference candle (low for buys, high for sells).
-
Buffer Option: EA must allow adding/subtracting a user-defined number of pips to entry and SL levels.
-
-
Take Profit (TP):
-
Options for TP:
-
Fixed Risk-Reward ratio (e.g., 1R, 2R, etc.).
-
Fixed pip/price target.
-
-
Trailing TP options:
-
Move TP step-by-step at 1R, 2R, 3R, etc.
-
Or trail using the low of each new candle (for buys) or the high of each new candle (for sells).
-
-
-
Trade Management:
-
Maximum number of trades per day: 3 (editable).
-
If the first trade hits TP, EA stops trading for the rest of the day.
-
Inputs / Settings:
-
Reference candle time & timeframe (e.g., 13:30 on M5).
-
Buffer in pips (for entries and SL).
-
TP type: Risk-Reward / fixed pips.
-
Trailing TP type: Step-based (R multiples) / candle high-low.
-
Maximum trades per day.