Take alook at the entire code and add 1 function to limit number of orders

Job finished

Execution time 41 minutes
Feedback from customer
Very good programmer, take a time to teach you on what modification he make :) Good teacher :) Thank you !
Feedback from employee
Good customer! thank you for the job!

Specification

Hello, look at the entire code, check that it is programmed correctly, that there are no functions that are useless! Add a function so that there is only 1 order per currency pair. Currently it can happen that there are 2 or 3 orders per currency pair, I want to limit the number of orders to 1 per currency pair.


Add a code like this example :

int TotalOrders(string symbol="", ulong magic = -1) {

   int cnt = 0;

   int pos_total = PositionsTotal();

   for(int pos =pos_total-1;pos>=0;pos--)  {

      ulong pos_ticket = PositionGetTicket(pos);

      if(PositionSelectByTicket(pos_ticket) && (symbol=="" || PositionGetSymbol(POSITION_SYMBOL)==symbol) && ( magic==-1 || PositionGetInteger(POSITION_MAGIC)==magic) ) {

      cnt++;   

      }

   }

   return(cnt);

}


it's just an example of what I want, it can be programmed differently.


Files:

MQ5
deep1.mq5
11.3 Kb

Responded

1
Developer 1
Rating
(213)
Projects
286
47%
Arbitration
27
59% / 37%
Overdue
36
13%
Free
2
Developer 2
Rating
(22)
Projects
23
39%
Arbitration
0
Overdue
1
4%
Free
3
Developer 3
Rating
(10)
Projects
13
0%
Arbitration
24
0% / 75%
Overdue
4
31%
Working
4
Developer 4
Rating
(57)
Projects
72
22%
Arbitration
13
46% / 15%
Overdue
5
7%
Free
5
Developer 5
Rating
(43)
Projects
66
12%
Arbitration
12
58% / 42%
Overdue
1
2%
Free
6
Developer 6
Rating
(279)
Projects
378
72%
Arbitration
19
32% / 47%
Overdue
16
4%
Free
Published: 15 codes
Similar orders
Expert Advisors 300+ USD
double CRiskManager::CalculateLotSize(double slPoints) { double balance = AccountInfoDouble(ACCOUNT_BALANCE); double riskMoney = balance * (m_riskPercent / 100.0); double tickValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE); double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE); double pointValue = tickValue / tickSize; double lot = riskMoney / (slPoints * pointValue);
i share my strategy i need a bot trending bot fo mt5 . i attached the photo with this it help to make bot. it basicly 1 hours time frame base. i try but failed to make it
Title: Simple background trading bot for my Oanda account (v20 REST API) Overview Hi, I need a simple, lightweight event based standalone trading bot that connects directly to my Oanda account using broker’s standard REST API (V20 account) via VPS The bot just needs to look at group of 5 currency pairs (manually selectable and adjustable) in different 4 baskets, do some basic percentage math every period, and place
MQL5 Developer 30+ USD
📄 وثيقة المواصفات الفنية لروبوت التداول (MQL5 EA Specification) 📌 1. ملخص المشروع والهدف * اسم المشروع: Gold Cent Grid-Hedge EA * المنصة: MetaTrader 5 (MQL5) * أداة التداول: الذهب (XAUUSD) * نوع الحساب: حساب سنت (Cent Account) * فكرة الاستراتيجية: تداول شبكة هيدج متوازنة (Grid-Hedging) تفتح صفقات تعزيز كل مسافة محددة، وتغلق الطرف الأكثر ربحاً عند تحقيق هدف مالّي مجمع بالدولار/السنت لإعادة هيكلة التوازن. ⚙️ 2
Hi developer I want to convert my mt4 EA to mt5 EA . I have a mt4 ea with source code. i want developer to copy same mt4 code and create mt5 EA
Gold hunter v5 30+ USD
*TITLE:* 5 Trades EA - EMA20/50 + RSI - Safe for Small Account *SPECIFICATION:* I need MT5 EA - Source Code .mq5 *Logic:* Buy: EMA20 > EMA50 and RSI(14) 45-70 Sell: EMA20 < EMA50 and RSI(14) 30-55 Timeframe M15, Symbol XAUUSD and all Forex *Trade Management:* Max 5 trades at same time. Fixed lot 0.01. No martingale. No lot increase. Distance between trades 150 points. Do not open all 5 at same price. Max 5 total
I need an Expert Advisor (EA) developed for MetaTrader 5 (MT5) tailored for trading on Exness accounts. Account & Server Details: Trading Platform: MetaTrader 5 (MT5) Broker: Exness Execution Type: Market / Pending Orders Account Type: [Specify: Standard / Pro / Raw Spread / Zero] Target Instruments: [Specify pairs, e.g., XAUUSD, EURUSD, BTCUSD] Strategy Requirements: Entry Rules: [Insert your buy/sell entry
Monthly Report: August 2026 World PEACE Multi FX Algo generated a total realized profit of approximately 31,966 JPY during August. The provider account is normally operated with approximately 200,000 JPY of capital. Compared with this standard operating amount, the realized profit for August was approximately 15.98%. Please note that this is not a compounded monthly return. Realized profits are withdrawn regularly
I’m looking for an experienced developer who can build a Martingale trading bot. I’m willing to pay a fair price for the right developer. I have an example trading account that demonstrates exactly how I want the bot to operate. The strategy is straightforward: the bot trades continuously using a Martingale system. The only exception is that it should automatically pause trading during high-impact news events or
This is a Tradingview project. Would you be able to make this? With a win rate and profit factor and percentage made and profit made and max dd reached. How many modifications would I be able to do? Could there be a table that shows win percentage profit factor and trading window where trades shouldn’t be placed and follows the rules of the pdf How long would it take and would it work on ninjatrader also

Project information

Budget
30+ USD
Deadline
to 1 day(s)