PAIRS TRADING - 4 ASSETS

MQL5 Experts

Job finished

Execution time 31 days
Feedback from customer
Very efficient, proactive. I recommend

Specification

I need an EA that perform pairs trading using up to 4 assets. 

EA will operate when the result of operation (S) of A, B, C and D close price will be major/minor that cond1 or cond2. In this case EA will buy/sell A, buy/sell B, buy/sell C, buy/sell D. 
The operation will finish, when stop loss or take profit or other condition will be achieved. 
Also, EA will start and stop its operation at time selected.

Fields:

Asset A <Text> (Required) EURUSD
Asset B <Text> (Required) GBPUSD
Asset C <Text> (Optional) EURGBP
Asset D <Text> (Optional) USDBRL
Amount A <0.00-xxx> (Required) 0.5 
Amount B <0.00-xxx> (Required) 0.7
Amount C <0.00-xxx> (Optional) 0.8 
Amount D <0.00-xxx> (Optional) 1.2
S < Cond 1 <spread1> (Optional) 1.0045
S > Cond 2 <spread2> (Optional) 1.009 
S = A <Multiply/Divide> B <Multiply/Divide> C <Multiply/Divide> D   A * B / C / D
Trade A @ Cond 1 <Buy/Sell> (Required) Sell
Trade B @ Cond 1 <Buy/Sell> (Required) Buy
Trade C @ Cond 1 <Buy/Sell> (Optional) Buy
Trade D @ Cond 1 <Buy/Sell> (Optional) Sell
Loss <% of cond1 or cond2 or none> (Optional) 0.1
Profit <% of cond1 or cond2 or none> (Optional) 0.1
Start <00:00-23:55> (Optional) 08:00
End <00:00-23:55> (Optional) 19:35

Note:  If Asset C and/or Asset D are not filled, these items can be ignored: Amount C, Amount D, B <Multiply/Divide> C <Multiply/Divide> D, Trade C @ Cond1, Trade D @ Cond1.

Using examples above: 
a) EA will start operation at 08:00 and finish/close position at 19:35.
b) If S=A*B/C/D < 1.0045, EA will sell 0.5A, buy 0.7B, buy 0.8C and sell 1.2D. When S<1.0035 (-0,1% of 1.0045) or S>1.0055 (+0.1% of 1.0045) or S>1.009 (cond2), EA will close operations.
c) If S=A*B/C/D > 1.009, EA will buy 0.5A, sell 0.7B, sell 0.8C and buy 1.2D. When S<1.008 (-0,1% of 1.009) or S>1.01 (+0.1% of 1.009) or S<1.0045 (cond1), EA will close operations.


Any doubt, please let me know.


Responded

1
Developer 1
Rating
(414)
Projects
670
33%
Arbitration
60
17% / 32%
Overdue
113
17%
Working

Project information

Budget
30 - 50 USD