Simple EA that removes pending orders on a fixed time or when spread is too high

MQL5 Experts

Tâche terminée

Temps d'exécution 26 jours
Commentaires de l'employé
Thanks a lot. Wish you safe trading.

Spécifications

Concept:


The EA will remove pending orders (Limit and Stop) when spread is too high to avoid the orders being hit at a bad price. (ie during high overnight spreads or news events). They will either be placed back once spread is low again or will be transformed into market orders if they are still to be executed when spread is normalised.


It is also possible to set a fixed time period where pending orders will be deleted and placed back. (for example for overnight spreads)


When loaded on a chart (ie EURUSD) it checks the spread of that chart and when spread is higher then the set parameter, it removes either all pending orders or pending orders from certain Magic numbers (depending on settings). It places back the pending orders when spread is back to normal or executes them as market orders if the pending order would still be triggered.


The EA can be attached to different charts (i.e. EURUSD, GBPCAD, XAUUSD, EURJPY) working independantly from each other for different pairs.


Parameters:


Max Spread allowed (points): default = 30

Remove Stop orders: Yes/No (default = Yes)

Remove Limit orders: Yes/No (default = Yes)

Use fixed time removal: Yes/No (default = No)

Time to remove pending orders: (default = 23:30)

Time to place back pending orders: (default = 01:30)

Check magic number: Yes/No (default = No) => If no, it applies to ALL orders with/without MN

Magic Numbers: example: 0, 1550, 9999... (Magic Nrs seperated by comma. 0 = manual orders)

Max price difference to execute Market order: (default = 1000)


Examples:


EURUSD current price is 1.10650 and there is a STOP buy order at 1.10700.

Max Spread is set to 30 points and the spread goes to 31 points. The STOP buy order is now removed from the chart. 30 min. later, the spread drops to 25 points. The EA checks the price and if it is still below 1.10700 and it is possible to place the STOP order back, it places back te stop order. If price is now above 1.10700 and it is impossible to execute toe STOP order, it executes a Market buy order with the same lot size instead.


GBPCAD is at 1.68700 at 22:59 and the fixed time removal is set to YES 23:00 to 01:30.

Max spread allowed is set to 30. There is a LIMIT BUY order for 0.10 at 1.68600.

The LIMIT order gets removed at 23:00. At 01:30 the spread is still 40 points so the order does not get placed back yet. At 01:50 the spread gets to 20 points so the EA checks if it is possible to place the 0.10 LIMIT buy order back. Since the current price dropped to 1.68550 it is not possible to place the Limit order anymore so it executes a Market BUY order of 0.10 instead.

If price would have moved more then 100 pips from the limit order (1.68600 => 1.67600) the order would NOT be transferred into a market order and would be cancelled instead because of the Max price difference parameter.


Répondu

1
Développeur 1
Évaluation
(295)
Projets
367
30%
Arbitrage
37
27% / 65%
En retard
10
3%
Travail
Publié : 10 codes
2
Développeur 2
Évaluation
(43)
Projets
66
12%
Arbitrage
12
58% / 42%
En retard
1
2%
Gratuit
3
Développeur 3
Évaluation
(111)
Projets
184
25%
Arbitrage
25
16% / 76%
En retard
16
9%
Gratuit
4
Développeur 4
Évaluation
(280)
Projets
378
72%
Arbitrage
19
32% / 47%
En retard
16
4%
Gratuit
Publié : 15 codes
5
Développeur 5
Évaluation
(10)
Projets
13
31%
Arbitrage
2
50% / 0%
En retard
1
8%
Travail
6
Développeur 6
Évaluation
(93)
Projets
119
50%
Arbitrage
4
50% / 50%
En retard
3
3%
Gratuit
7
Développeur 7
Évaluation
(37)
Projets
59
27%
Arbitrage
26
19% / 54%
En retard
10
17%
Travail
Publié : 1 code
8
Développeur 8
Évaluation
(16)
Projets
35
23%
Arbitrage
4
0% / 50%
En retard
2
6%
Travail
9
Développeur 9
Évaluation
(52)
Projets
67
43%
Arbitrage
8
0% / 100%
En retard
3
4%
Gratuit
10
Développeur 10
Évaluation
(62)
Projets
90
29%
Arbitrage
24
13% / 58%
En retard
7
8%
Travail
11
Développeur 11
Évaluation
(319)
Projets
574
35%
Arbitrage
83
31% / 45%
En retard
207
36%
Gratuit
Commandes similaires
Experienced Trading Software Developer Needed – Multi-Platform Development Hello! I'm looking for an experienced developer to create a custom trading indicator and convert it into an automated trading bot for the following platforms: MT5 NinjaTrader 8 Quantower cTrader The plan is to develop the same indicator and trading bot for all four platforms, one after another. Project requirements: Custom trading indicator
un écosystème logiciel asynchrone multi-comptes dopé par un module de supervision par Intelligence Artificielle (Guardian AI). La solution assure le pilotage automatisé, le filtrage de marché en temps réel et le contrôle des risques pour 20+ comptes MetaTrader 4/5 (via MetaApi) et Deriv sur VPS Equinix NY4. vous aurez plus de detail dans les échanges
Order flow 30+ USD
Hi! I need an experience developer with order flow, volume delta, and futures scalping, and I wanted to ask you a few questions. Have you personally developed and tested fast-paced strategies for Gold Futures (GC), particularly those that enter during short-term price impulses and scale into positions as momentum builds? From your experience, what indicators or signals help you determine whether an impulse has enough
I am looking for an experienced MQL5 developer for the first milestone of a larger MetaTrader 5 project: a multi-symbol, multi-timeframe signal scanner with alerts. This milestone covers indicator integration only. There is no order placement or trade management at any stage. Scope of this milestone Read outputs from three custom indicators (provided as compiled files after selection and NDA) reliably via iCustom and
RA_BOT 2.0 36+ USD
//@version=4 study(title="UT Bot Alerts", overlay = true) // Inputs a = input(1, title = "Key Vaule. 'This changes the sensitivity'") c = input(10, title = "ATR Period") h = input(false, title = "Signals from Heikin Ashi Candles") xATR = atr(c) nLoss = a * xATR src = h ? security(heikinashi(syminfo.tickerid), timeframe.period, close, lookahead = false) : close xATRTrailingStop = 0.0 xATRTrailingStop := iff(src >
Andrew 50 - 200 USD
Hello, I am from Tanzania. I am looking for a professional MQL5 programmer from Tanzania who can help me develop and improve my automated MT5 trading robot. The project is called SMC XAVAGE AI, and it trades XAUUSD (Gold). I would like to discuss the project with you. Are you based in Tanzania? Would it be possible to arrange a meeting or a call? Thank you
Metafix 50 - 200 USD
Here is a professional specification you can send directly to your developer. # Project Requirements Specification: MetaTrader 5 Trading Robot Development ### 1. Project Overview I want to develop an automated Forex trading robot (Expert Advisor) for MetaTrader 5 (MT5). The robot should analyse the financial markets, identify trading opportunities, and execute trades automatically based on predefined strategies. ###
1. Platform: MT4 The EA required is not linked, neither depending on trading strategy nor trading signals nor indicators. 2. Initial order is a pending order (buy stop/ sell stop) and it is created manually. It is open for a specified symbol (pair) at a specified price with a specified S/L 3. Example: buy stop 0.1 lot GBPUSD @ 1.3085 WITH S/L @1.3075 Once target price is reached, pending order will
I am looking for an experienced trading software developer interested in building a long-term working relationship. Im a professional Trader, Coach and Mentor, I work with traders and Student who require customized trading solutions, including automated trading bots, Expert Advisors, custom indicators, trading strategies and other algorithmic trading tools. I am looking for a technically skilled developer who can
Salman serhal 30 - 100 USD
MT5 ICT XAUUSD Sell-Only Trading Robot with Fibonacci Confirmation I am looking for an experienced MQL5 developer to create a custom Expert Advisor (EA) for MetaTrader 5, specifically for trading Gold (XAUUSD). 1. Trading Strategy The robot must use the ICT trading methodology and focus on SELL trades only. The strategy should include: * Identify important resistance and premium zones. * Use Fibonacci retracement

Informations sur le projet

Budget
30 - 50 USD