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
(209)
Projects
281
46%
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
(8)
Projects
12
0%
Arbitration
22
0% / 77%
Overdue
4
33%
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
(278)
Projects
373
72%
Arbitration
19
32% / 47%
Overdue
14
4%
Free
Published: 14 codes
Similar orders
1️⃣ Support and Resistance Levels Draw only strong support and resistance levels. Detect hidden strong support and resistance levels. Add strength rating stars for each level: ⭐⭐⭐ = Very Strong ⭐⭐ = Medium ⭐ = Weak (may break easily) Indicator must not repaint (No Repaint). 2️⃣ Professional Dashboard Display all timeframes from 1 minute to monthly. For each timeframe: Green color with an upward arrow if the trend is
Mt5 30+ USD
Hi, I've purchased a licensed Expert Advisor (EA), but the seller isn't the original developer. Can we remove the license so I can use it on multiple accounts? Or what do you recommend we do
Hello, I have a breakout EA with reversal logic. I own the full source code for both MT4 and MT5 versions. I need the modifications implemented for both MT4 and MT5 versions. I need several modifications: – Multiple reversals with configurable parameters – Breakeven functionality – Entry only after candle close beyond range + offset – Time-based activation – Alternative offset calculation logic – Automatic close at
simple automated trading system with adaptive risk management and trend-based execution. The EA manages trades with dynamic position handling and built-in stability filters. Designed for single-position trading and disciplined execution 30 usd budget
PROJECT DESCRIPTION Looking for 1 experienced MQL5 developer to build 2 Expert Advisors for MetaTrader 5, targeting XAUUSD and major currency pairs. Strong preference for a single developer handling both EAs to maximize code reuse, reduce cost, and ensure consistency. EA1 — Grid Martingale Pro · Buy/Sell grid with Fixed or ATR Dynamic distance (ATR read once per fill, stored in grid_step_at_open[]) · Gap
Hi I have a simple task (hopefully) I have a custom strategy that I built with the help of Claude Anthropic - everything is finished and I zipped it with power shell but when importing it NT8 gives me the error message that the file was made from an older, incompatible version or not a NinjaScript. My folder structure is correct as far I can see so I don't know what the issues is and it's costing me too much to go
Do you happen to have a profitable strategy for MNQ? it is urgent if any one can help me with this i will be happy to discuss with you and move forward to pay for it kindly let me know the amount thank fill free to bid
Subject: Development of Ultra-High Precision Confluence Indicator - M1 Binary Options (Non-Repaint) ​ Hello, I am looking for a Senior MQL5 Developer to create a custom "Surgical Precision" indicator for MetaTrader 5, specifically optimized for 1-minute (M1) Binary Options trading. The system must integrate three distinct layers of algorithmic analysis. ​ 1. Core Logic: Triple-Layer Confluence ​The signal (Call/Put)
Looking for an experienced MQL5 developer to design and develop a custom Expert Advisor (EA) for MetaTrader 5. The purpose of this EA is not just automated trading, but also to help me better structure, test, and refine my personal trading strategy
Freeallfree 400 - 800 USD
Professional MT5 EA – XAUUSD I need a professional Expert Advisor for MT5 (MQL5) to trade XAUUSD only. This is not a random scalping bot. The EA must trade only high-probability liquidity breakouts during active sessions and avoid ranging or low-volatility markets. Symbol: XAUUSD Timeframe: M15 (optional H1 confirmation) Session filter (Dubai GMT+4): Trade only London and New York sessions Adjustable session times No

Project information

Budget
30+ USD
Deadline
to 1 day(s)