Работа завершена
Техническое задание
I need MQL5 robot executing and managing trades based on specified range. For example I should be able to specify range of 15 min candle created at 7.00 hours (7.00-7.14) and based on that range it would create an order(s) to buy when breakout above the range happened and retracement of specified percentage into the range occurred (breakout first, return into range to hit limit order second). It would be 3 orders for partials and some simple rules on SL trailing. Secondary trade would happen on opposite breakout (e.g. breakout above the range, than breakout below) with stop limit order (no more return into range).
All below options should be adjustable in indicator settings:
1. Specified time window for range to work with (e.g. 1h candle from 10.00 to 10.59)
2. Another time window to validate a trade as well as expiration of limit orders.
- validation - breakout from range specified in bullet point 1, in specified time window (validation is time sensitive)
- limit orders put in after validation. Limit orders are time limited (time of expiration configurable in expert settings)
Validation and limit orders expiration (retracement trades) time window is the same.
3. 2 types of retracement trades: limit at retracement of X% of initial range, and another of retracement of Y% of initial range
- each of those will be entered 3 times to cater to 3 target objectives (e.g. limit order 1 -> TP1, order 2 -> TP2, order 3 - TP3). Targets are based on initial range expansions (e.g 0% expansion is range border, and 150% expansion, is range + 150% of its size)
- there is simple stop trailing strategy (e.g. TP1 hit, order 2 and 3 SL moved to break even, TP2 hit, order 3 SL moved into 0.4RR profit)
- initial stop loss at the bottom of the initial range - 1 (bullish scenario)
4. 1 type of secondary breakout trade. Secondary breakout is also time limited, but differently to retracement trades. E.g. when breakout above happens and than price reverses and breaks below the range, on that second breakout stop limit order will be executed. This is single trade (no partials) with single target and no stop trailing
5. Option to cater to spread in the account - should be adjustable in expert settings. E.g. if spread is set to .50 points (statically), limit orders on buy side will have entry adjusted by spread, and similarly shorts stop losses will have entries moved by spread
6. Sizing of each trade should be adjusted to % of current balance on the account (e.g. I could set risk on each trade to 1%) or to specific $ amount.
7. Any still open trades should be closed at specified time (e.g. 15.00)
8. Expert must be able to work in multiple instances, one per separate window (not many, but anything between 2 and 5 should not make any problems with terminal).
I require source code to be handed over upon completion and final payment.