Script for close order automatically

MQL5 Scripts C++

Job finished

Execution time 2 days

Specification

I trade multiple pairs with a automated signal provided from another platform.


Existing method: when mt4/mt5 receives the buy or sell signal it will execute the order automatically. But it doesn't close the previously running position in the same pair.


Requirement:

Script should work @ each order is executed(buy/sell).

Only one trade will be there per symbol at any point of time. if mt4/mt5 receives a signal it will execute the orders. Now script will check for more than one order in any symbol. If there is more than one order in a symbol the script should close the older order.

For example: if mt4/mt5 receives a sell signal it will be executed automatically. now the script should check for the more than one order condition in that symbol if there is more than one trade (Sell executed now and a buy is running already and its a older order) the script should close older orders and the latest should be active and running.


NOTE: need this script in both mt4 and mt5

Responded

1
Developer 1
Rating
(192)
Projects
232
30%
Arbitration
1
100% / 0%
Overdue
9
4%
Free
Published: 2 codes
2
Developer 2
Rating
(12)
Projects
12
25%
Arbitration
0
Overdue
1
8%
Free
3
Developer 3
Rating
(20)
Projects
29
55%
Arbitration
0
Overdue
0
Free
4
Developer 4
Rating
(430)
Projects
606
55%
Arbitration
48
23% / 56%
Overdue
176
29%
Free
5
Developer 5
Rating
(349)
Projects
463
51%
Arbitration
41
24% / 49%
Overdue
149
32%
Free
6
Developer 6
Rating
(19)
Projects
27
19%
Arbitration
6
33% / 33%
Overdue
2
7%
Free
7
Developer 7
Rating
(34)
Projects
51
43%
Arbitration
5
40% / 20%
Overdue
14
27%
Free
Published: 2 codes
8
Developer 8
Rating
(65)
Projects
71
30%
Arbitration
8
0% / 88%
Overdue
5
7%
Free
9
Developer 9
Rating
(7)
Projects
10
60%
Arbitration
4
0% / 75%
Overdue
3
30%
Free
Published: 74 articles, 5 codes
10
Developer 10
Rating
(12)
Projects
13
23%
Arbitration
7
0% / 71%
Overdue
3
23%
Working
11
Developer 11
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
12
Developer 12
Rating
(45)
Projects
91
13%
Arbitration
34
26% / 59%
Overdue
37
41%
Free
13
Developer 13
Rating
(49)
Projects
134
27%
Arbitration
62
13% / 53%
Overdue
58
43%
Free
Published: 313 articles, 1 code
14
Developer 14
Rating
(54)
Projects
65
52%
Arbitration
5
40% / 60%
Overdue
22
34%
Working
15
Developer 15
Rating
(64)
Projects
144
46%
Arbitration
20
40% / 20%
Overdue
32
22%
Free
Similar orders
MT5 Expert Advisor Specification: Asian Liquidity Sweep & M5 FVG Entry ​Project Overview ​Automated Expert Advisor for EUR/USD on MT5. The strategy maps structural liquidity (Fractal Swings) for entry triggers but targets absolute session extremes for Take Profit. It enters on the first opposite M5 Fair Value Gap (FVG) and features a dynamic, user-controlled risk engine. ​1. Timezone & News Filter Requirements ​The
I am looking for an experienced MQL4/MQL5 developer to build a custom MT4 indicator from scratch or cracking my ex4 file that i provide to you. I already have an existing indicator (EX4) which produces highly accurate buy/sell signals. I want a similar indicator developed based on its observable behavior and signal structure. my existing indicator is pc id protected so you have to do PC ID security bypass and source
Hello there , I have an paid indicator on ctrader that show swing high lows breakout(Adding Image as reference) . I want some one to build a cbot for this indicator like cbot that can place the buy sell stops at the dotted green and red lines or can be programmed to take market execution one brick close after breakout . Must have sl and tp settings too and market timing too . moreover I will tell in details
Intraday Trade Ninja EA — Complete Logic Structure This document maps the full architecture, execution logic, signal flow, trade management, and safety structure of the Intraday Trade Ninja MT4 Expert Advisor. 1. Core Indicators · ©Price Border (TMA bands) · MA-X Arrows · MA-Y Arrows · LeManSignal · EMA 49 & 89 - Per Candle Color Switching 2. EA Entry Architecture ·
📌 Project Overview: I need a full Smart Trade Management System for MetaTrader 4/5. This is a complete trading ecosystem, not a simple EA. 📌 Core Features: Smart Money Management (risk-based lot calculation) Advanced Trading Toolbox (TradingView-style drawing tools) Central Master Dashboard (risk, filters, account control) Multi-account monitoring (MT4/MT5 synchronization) Real-time monitoring (spread, equity
Hello, i would like to have a ninjatrader indicator. I wanna to have a footprint indicator with delta, imbalances and big trades identifiable. Also I wanna sell it on whop. And it should be fully customisable in NT8
I need a professional MQL5 developer. BEFORE I SHARE ANY DETAILS: 1. You must sign a PERPETUAL NDA with no expiration date 2. NDA includes €100,000 penalty for any breach 3. I require full .mq5 source code ownership 4. Developer must have 500+ completed jobs, 4.9+ rating Budget: €1500 EUR Duration: 14 days Start your application with "RULER" to prove you read this
Hello Developers I have a Project to get done! i have a simple strategy can you please create the automated forex ea to execute my trading strategy? i need custom ea for tradingview and mt4/mt5 correction: i need a tradingview indicator created that tells me when to buy or sell. and ea in mt4/mt5
Mam kody EA Bot. Chciałbym je dokończyć, dopracować i ukończyć projekty. Chciałbym otrzymać pliki SET po ukończeniu EA. Jeśli jesteś zainteresowany, skontaktuj się ze mną. Szukam doświadczonego programisty do stworzenia dedykowanego doradcy eksperckiego (EA) do tradingu. Programista powinien posiadać solidną wiedzę z zakresu MT5, logiki strategii, wskaźników, zarządzania ryzykiem i backtestingu. Doświadczenie w
I am looking for an experienced MQL5 developer to create a custom technical indicator for MetaTrader 5. The indicator should combine Supertrend logic with Support/Resistance pullback levels to generate high-probability entry signals. 1. Core Logic The indicator must follow a two-step confirmation process: Trend Identification: Use the Supertrend indicator to determine the primary trend. Entry Signal (The

Project information

Budget
30 - 40 USD