EASY SCRIPT JOB

MQL4 Scripts

Job finished

Execution time 3 days

Specification

Hi,

for my statistical arbitrage trading i need a script that does the following:

- opens 2 positions simultaneously on two selected pairs (i must be able to input 2 currency pairs, lot size for each, buy or sell order for each)
- closes both position when the sum of their profit is higher than a given value.


I need this script for pair trading (statistical arbitrage). It should be a script, not an EA. Basically when i spot an opportunity, i should be able to double click the script, select two symbols, the lot size and type of order (buy and/or sell), and click ok.
This should open simultaneously two order on two different symbols. The orders should be marked, maybe with a magic number, so that when the sum of their profits (usually one position will be gaining and the other losing) exceeds a given threesold (in currency units), the script automatically closes both positions.
The script should be made so that i can use it several times on different symbols combinations, and each time a given pair of orders returns profits, it automatically closes the orders.

A practical example:

- looking at the correlation between EURUSD and USDCHF (almost perfectly inversely correlated), i see that the difference between the symbols (spread of symbols) is unusually high;
- i open the script, select the two currencies, 0.1 lot size for example, and the type of order (sell EURUSD; sell USDCHF), the profit level at which the orders should be closed, and send the two orders;
- at this point, two positions should be open: 0.1 sell EURUSD and 0.1 sell USDCHF;
- looking at another correlation, i spot an opportunity between EURJPY and NZDJPY;
- again i open the script, select the two currencies, 1.5 lot size, the type of order (sell EURJPY and buy NZDJPY), and the profit level at which the orders should be closed;
- at this point, four orders should be open: 0.1 sell EURUSD and 0.1 sell USDCHF, and 1.5 sell EURJPY and 1.5 buy NZDJPY;
- the script should continuosly monitor the profit and losses of the two pairs of orders;
- once the sum of the EURUSD and USDCHF profits exceeds the given profit level, the two should be closed;
- once the sum of the EURUSD and USDCHF profits exceeds the given profit level, the two should be closed;


Today i open manually two orders when i spot an opportunity. I then look at the sum of their money value, and when the sum of the two positions turns positive by a given amount (when correlation returns to normal), i close both orders.

By having a script, i would be able not only to automize the order sending procedure, but most importantly i wouldn't need to continuosly look at the results and wait until the sum of two positions turns positive.
Moreover, when working with several currency pair at the same time, it is sometimes difficult to continuosly look at the monetary value of the sum of two open positions.

I hope this explains what i need. Please don't hesitate to contact me for any clarification.

Kind regards,
Sandro

Responded

1
Developer 1
Rating
(461)
Projects
902
77%
Arbitration
25
16% / 68%
Overdue
100
11%
Free
2
Developer 2
Rating
(71)
Projects
254
53%
Arbitration
16
50% / 38%
Overdue
83
33%
Free
3
Developer 3
Rating
(182)
Projects
342
42%
Arbitration
118
12% / 73%
Overdue
104
30%
Free
4
Developer 4
Rating
Projects
1
0%
Arbitration
0
Overdue
1
100%
Free
5
Developer 5
Rating
(26)
Projects
45
29%
Arbitration
2
0% / 50%
Overdue
21
47%
Free
6
Developer 6
Rating
(44)
Projects
128
66%
Arbitration
10
20% / 60%
Overdue
35
27%
Free
7
Developer 7
Rating
(82)
Projects
150
29%
Arbitration
9
44% / 11%
Overdue
46
31%
Free
8
Developer 8
Rating
(31)
Projects
41
66%
Arbitration
1
100% / 0%
Overdue
11
27%
Free
Similar orders
My indicator is plotting many arrows before the spikes on a chart help me how can I reduce the number of arrows I tried to fix it on metaeditor but still. I will share the indicator
Looking for a MT5 HFT with no losses to be made orginal. Needs to be able to trade forex, metals, indices or what can be most volatility. It’s being used on live cash accounts so must have capability to increase lots sizes. Prefer tick. If interested to discuss and build let me know
Hi i am programmer on MT5 and mt4 and i am looking for a way to extract specific data from a website. Is is possible to display on chart and/or send notification to android for https://www.fxstreet.com/news Breaking news only
I am looking for a skilled developer to assist me with a project involving the following tasks: Convert Pine Script to MQL4/MQL5: I have an existing script written in Pine Script that is already functioning well. I need it converted to MQL4 or MQL5 for use on MetaTrader. Licensing System Implementation: I require a system where I can sell my trading bot and manage access through licenses. This system should allow me
I'm looking for a good developer to help me develop EA Just add judgment sentences in EA This is a recurring transaction Developers who know how to write MT4 and MT5 can apply It's just a simple transaction

Project information

Budget
50 - 110 USD
For the developer
45 - 99 USD
Deadline
from 1 to 5 day(s)