Function to Close all orders where Magic Number = 0

MQL4 Scripts Other

Job finished

Execution time 14 hours

Specification

I need the FOR/LOOP portion only  that will iterate through all  OPEN and PENDING (buy and sell) orders that automatically close any of these orders where the MagicNumber = 0.

I'll be integrating this into some other scripts that I already have so I only need this Loop functionality and nothing else.  You can build it as a Void function.


Pretty basic and simple.

thank you

Devon

Responded

1
Developer 1
Rating
(71)
Projects
156
44%
Arbitration
22
41% / 14%
Overdue
16
10%
Free
Published: 10 codes
2
Developer 2
Rating
(103)
Projects
205
41%
Arbitration
17
29% / 71%
Overdue
45
22%
Free
3
Developer 3
Rating
(106)
Projects
314
49%
Arbitration
42
52% / 19%
Overdue
22
7%
Free
4
Developer 4
Rating
(333)
Projects
543
66%
Arbitration
53
21% / 40%
Overdue
169
31%
Free
Published: 1 code
5
Developer 5
Rating
(225)
Projects
285
41%
Arbitration
15
13% / 47%
Overdue
67
24%
Free
6
Developer 6
Rating
(118)
Projects
217
49%
Arbitration
1
0% / 0%
Overdue
25
12%
Free
Published: 1 code
Similar orders
Hello, I’m a profitable MT4/MT5 trader specializing in Prop Firm accounts. What makes me different: I actually trade with 3% Daily DD / 5% Overall DD rules, so I know what blows accounts and what passes. Services I offer: 1. EA Backtesting + Detailed Reports - Winrate, Profit Factor, Max DD, Best Pairs/Timeframes 2. Strategy Documentation - I’ll write clear rules for your EA so any coder can build it 3. Prop Firm
Hi MQL5 Community, With over 10 years of live market experience as a Quantitative & Trading System Developer, I specialize in building robust, highly scalable Expert Advisors (EAs), custom indicators, and automated architectures. I’ve recently put together a comprehensive showcase demonstrating my flagship Modular Multi-Engine Architecture , designed to bring institutional-grade logic and real-time telemetry into
Looking for A verifiable, disciplined XAUUSD analyst with controlled drawdown, consistent stop-loss use, clear communication and the capacity to service a live community. To send daily London and New York signals exclusively in my channel on Telegram
I am looking for an experienced MQL5 or MQL4 developer with a strong background in low-latency algorithmic trading, market data integration, arbitrage and execution optimization. The project involves developing a high-performance HFT Expert Advisor (EA) for XAUUSD or US30 on IC Markets that is designed for robust execution in both demo and live environments. The EA may use market data feeds (such as lmax,one zero or

Project information

Budget
10 - 20 USD
Deadline
from 1 to 3 day(s)