Code to count lot size of the same currency across orders on both buy and sell

Работа завершена

Время выполнения 3 дня
Отзыв от исполнителя
Excellent client. Was helpful with testing and not afraid to ask questions.

Техническое задание

I need a developer with very good English skills to provide me the code for a function that I want to insert into my own code and which should do the following:

-          Count how many open orders a currency (or an index, etc) is involved in, separately on buy and sell.

-          Count the total lot size on buy and the total lot size on sell that the currency (or index) is involved in.


For example, if I have the following trades open:

2 lots of SELL GBPUSD

0.5 lot of SELL EURGBP

0.5 lot of BUY EURUSD

 

Then the results provided by the function will be:

Total number of open orders BUY on GBP: 1

Total lot size BUY on GBP: 0.5

Total number of open orders SELL on GBP: 1

Total lot size SELL on GBP: 2

Net lot size on GBP (BUY-SELL): -1.5


The function will return the same type of results for EUR, USD and all other currencies, indices, etc that are involved in open orders.

Important: you have to be careful to identify when the currency is the first or the second in the currency pair in order to get the result right. For example, a SELL order on EURGBP counts as a SELL on EUR, but as a BUY on GBP.

The code should also work for symbols composed of only one element, like US30.

Exception: I need an exception to be introduced in the case of instruments XTIUSD and XAUUSD, in the sense that in these cases the function will NOT add these to the count of number of orders and size of lots on USD, BUT it will add them to the count of the number of orders and the size of lots on XTI and XAU respectively.

Use of the function:

I should be able to call this function in the main program something like this: get_lot_count(Symbol), where symbol can be GBPUSD, XTIUSD, US30, etc. When called, the function will calculate and provide (in separate variables) all the information mentioned above in relation to the instrument(s) present in the symbol, regardless of whether there are 2 currencies  in the Symbol (like in EURUSD, in which case the information will be, of course, separate for EUR and USD) or a stand-alone instrument in the symbol (like in US30).

I am flexible to suggestions on how to best organise the information.

Note: when applying for this job please let me know if you have experience in doing something similar or other information that would help me understand that you actually looked carefully at the specs and that you are not just sending an “automated” application.


Откликнулись

1
Разработчик 1
Оценка
(19)
Проекты
35
26%
Арбитраж
10
30% / 70%
Просрочено
5
14%
Свободен
2
Разработчик 2
Оценка
(378)
Проекты
401
31%
Арбитраж
63
19% / 70%
Просрочено
51
13%
Загружен
3
Разработчик 3
Оценка
(50)
Проекты
70
29%
Арбитраж
8
50% / 13%
Просрочено
14
20%
Работает
4
Разработчик 4
Оценка
(130)
Проекты
184
32%
Арбитраж
16
31% / 63%
Просрочено
27
15%
Свободен
5
Разработчик 5
Оценка
(88)
Проекты
143
39%
Арбитраж
21
19% / 48%
Просрочено
30
21%
Свободен
6
Разработчик 6
Оценка
(36)
Проекты
50
28%
Арбитраж
2
0% / 100%
Просрочено
6
12%
Свободен
7
Разработчик 7
Оценка
(27)
Проекты
43
7%
Арбитраж
18
6% / 78%
Просрочено
26
60%
Свободен
8
Разработчик 8
Оценка
(84)
Проекты
149
31%
Арбитраж
32
34% / 41%
Просрочено
43
29%
Свободен
9
Разработчик 9
Оценка
(4)
Проекты
4
25%
Арбитраж
1
0% / 0%
Просрочено
0
Свободен
10
Разработчик 10
Оценка
(62)
Проекты
140
46%
Арбитраж
19
42% / 16%
Просрочено
32
23%
Свободен
Похожие заказы
I need an expert to decrypt my itf file using on prorealtime. I forgot my password, so I need to generate the source code. I need someone that can help me to derive source code from the itf file I have
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

Информация о проекте

Бюджет
30 - 50 USD
VAT (21%): 6.3 - 10.5 USD
Итого: 36.3 - 60.5 USD
Исполнителю
27 - 45 USD
Сроки выполнения
от 2 до 3 дн.