EASY SCRIPT JOB

MQL4 脚本

工作已完成

执行时间3 天

指定

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

反馈

1
开发者 1
等级
(461)
项目
902
77%
仲裁
25
16% / 68%
逾期
100
11%
空闲
2
开发者 2
等级
(71)
项目
254
53%
仲裁
16
50% / 38%
逾期
83
33%
空闲
3
开发者 3
等级
(182)
项目
342
42%
仲裁
118
12% / 73%
逾期
104
30%
空闲
4
开发者 4
等级
项目
1
0%
仲裁
0
逾期
1
100%
空闲
5
开发者 5
等级
(26)
项目
45
29%
仲裁
2
0% / 50%
逾期
21
47%
空闲
6
开发者 6
等级
(44)
项目
128
66%
仲裁
10
20% / 60%
逾期
35
27%
空闲
7
开发者 7
等级
(82)
项目
150
29%
仲裁
9
44% / 11%
逾期
46
31%
空闲
8
开发者 8
等级
(31)
项目
41
66%
仲裁
1
100% / 0%
逾期
11
27%
空闲
相似订单
I’m looking for someone experienced with Think or Swim to create a backtesting script for an in-the-money Iron Condor strategy using options on the SPX. The strategy involves setting up 10 contracts of an Iron Condor with a 10-point spread width and a net credit requirement of $11 per contract. The goal is to backtest the performance over the last three years, focusing on trades where the SPX closes outside a
I currently have a license code that connects to my web server, and I add the account number, client name, and expiration date. I’d like something more automated. Currently I allow clients 10 licenses, but adding for them on my side can get exhausting. I’d like a better solution for myself and clients

项目信息

预算
50 - 110 USD
开发人员
45 - 99 USD
截止日期
 1  5 天