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
評価
(390)
プロジェクト
416
30%
仲裁
74
19% / 72%
期限切れ
52
13%
仕事中
3
開発者 3
評価
(50)
プロジェクト
74
27%
仲裁
12
58% / 17%
期限切れ
14
19%
4
開発者 4
評価
(130)
プロジェクト
184
32%
仲裁
18
28% / 67%
期限切れ
27
15%
パブリッシュした人: 1 code
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
パブリッシュした人: 3 codes
10
開発者 10
評価
(64)
プロジェクト
144
46%
仲裁
20
40% / 15%
期限切れ
32
22%
仕事中
類似した注文
I want to buy prop firm EA 1500 - 5000 USD
Hello all developers, I am searching a good, profitable EA suitable for prop firms. Only serious order please. Source of code required. Please tell me how this EA is working, EA can't be decompiled. Budget is negotiable
Title: SEEKING: Proven SMC/Order Block EA for XAUUSD – Live Track Record Required (<5% Max DD) ​ Job/Request Description: I am looking to acquire or license a high-performance, fully automated Expert Advisor (EA) specifically optimized for XAUUSD (Gold) . The strategy must be strictly based on Smart Money Concepts (SMC) , utilizing Order Blocks, Liquidity sweeps, and Market Structure Shifts (MSS). ​ Technical
A SPECIFICATION: NESTED MULTI-TIMEFRAME MOMENTUM (NMTM) 1. CORE OBJECTIVE The EA is designed to identify institutional Supply and Demand zones on the H4 timeframe that are "nested" within Daily (D1) zones. It filters for high- momentum "Leg-Out" moves and only trades in the direction of the Daily trend. 2. PHASE 1: TREND & CONTEXT FILTERS (DAILY) The EA must first confirm the Daily bias. No H4 zones are valid if they
I already have a fully developed MT5 Expert Advisor with all required prop firm features, including: Risk management Daily loss & max drawdown limits Spread & slippage filters News filter Trade management system The EA structure is complete. 👉 What I need is a professional developer to replace ONLY the entry logic with a high-quality, rule-based trading strategy. 🚨 STRICT REQUIREMENT (READ CAREFULLY): I am NOT
I am looking for a highly experienced MQL5 developer robot to build a professional-grade Expert Advisor for MetaTrader 5, focused on XAUUSD (Gold). This project is not a simple EA, but the foundation of a scalable multi-strategy trading system, designed for long-term development and future upgrades. Core Concept The EA must support a maximum of 5 internal strategies, each working independently but profitable daily
FireDire 30+ USD
I want a prop-firm–compliant trading robot, not a fast or aggressive one. Objectives: – Pass a prop firm challenge safely within 2–4 weeks, not 1 week. – Focus on capital protection first, profit second. Risk & Money Management: – Risk per trade: 0.25%–0.5% max – No martingale, no grid, no recovery trading – One position per signal (optional scaling only after BE) – Global daily risk cap: 1%–1.5% – Respect both daily
Project Description I am looking for a highly experienced MQL5 developer to build a professional-grade Expert Advisor for MetaTrader 5, focused on XAUUSD (Gold). This project is not a simple EA, but the foundation of a scalable multi-strategy trading system, designed for long-term development and future upgrades. Core Concept The EA must support a maximum of 5 internal strategies, each working independently but
Hola, estoy buscando un programador MQL5 con experiencia real en el desarrollo de EAs diseñados específicamente para generar un alto volumen de operaciones diarias. Mi principal prioridad no es un bot que realice solo unas pocas operaciones, sino un sistema con una alta actividad comercial, capaz de abrir lotes de gran tamaño de forma constante y que opere en condiciones reales de mercado, incluyendo spreads
I am looking for an expert in trading bot development to trade Bitcoin and other cryptocurrencies. The bot must be able to execute trades automatically based on a specific strategy, including risk management, precise entries, and automated exits. Experience with exchange APIs and trading automation is essential
I need an experienced developer to carry out an indicator and trading robot using the following; moving averages risk ( take profit and stop loss) and maximum drawdown limits heiken ashi confirmation. trendline breakout if possible The developer will test this on a demo account that I will provide before conclusion as I don’t want anyone to waste my time trying to use chartgpt trial and error. If you can do the

プロジェクト情報

予算
30 - 50 USD
締め切り
最低 2 最高 3 日