Job finished
Specification
Hi, I need a MT5 EA with the following criteria:
A1. Criteria For Sell order:
At the beginning of each candle, check IF:
1. The current time is within the “Start time:” and “Finish time:”
2. Spread is lower than “Spread Filter:”
3. Free Margin is Higher than “Free Margin Filter:”
4. The last closed candle’s body is bigger than the “Minimum candle size:”
5. The last closed candle’s body smaller than the “Maximum candle size:”
6. High[2] (the High price of the 2nd last candle) was above the value of upper Bollinger band for that candle.
7. Low[1] (the Low price of the last candle) is lower than Open[2] (the Open price of the 2nd last candle)
8. Open[2] was at least 0.9 pips ("2nd Candle size:”) Below than Close[2]
>> Place a Sell order
>> Place a Pending Buy order at 10 pip (“Pending order pips:”) above the current Sell order IF "Pending orders:” is set as “Ture”.
A2. Criteria For Buy order:
1. Same as Sell order for serial number 1 to 5
2. Low[2] was Below the value of Lower Bollinger band for that candle.
3. High[1] is above Open[2]
4. Open[2] was 0.9 pips ("2nd Candle size:”) Above than Close[2]
>> Place a Buy order
>> Place a Pending Sell order at 10 pip (“Pending order pips:”) Below the current Buy order IF "Pending orders:” is set as “Ture”.
B. Break Even:
After 50 minutes (“Break even time:”) of order open time,
If the order is still in Loss, set the stoploss of the order at “Break even pips:”
C. Closing of Pending order:
Close the pending order immediately if the corresponding buy/sell order was closed in Profit.
D. External Variables:
1. Lot size: 0.1
2. StopLoss: 10 [in pips, if “0” stoploss will be inactive]
3. TakeProfit: 0 [in pips, if “0” takeprofit will be inactive]
4. Trailing StopLoss: 5 [in pips]. [Trailing StopLoss should add spread in its calculation. If set as “0”, Trailing StopLoss will be inactive]
5. Spread Filter: 0.5 [in pips]
6. Free Margin Filter: 300 [in Dollar]
7. Start time: 09:30 [broker server time]
8. Finish time: 19:30 [broker server time]
9. Minimum candle size: 0.9 [in pips]
10. Maximum candle size: 30 [in pips]
11. 2nd Candle size: 0.9 [in pips]
12. Break even pips: 2 [pips of profit from the order open price]
13. Break even time: 50 [in Minutes]
14. Pending orders: True/False
15. Pending order pips: 10 [in pips]
16. Pending order StopLoss: 15 [in pips, if “0” stoploss will be inactive]
17. Pending order TakeProfit: 10 [in pips, if “0” takeprofit will be inactive]
18. Pending order Trailing StopLoss: 15 [in pips]. [Trailing StopLoss should add spread in its calculation. If set as “0”, Trailing StopLoss will be inactive]