Close trades EA

MQL4 Indicators Experts

Job finished

Execution time 7 days

Specification

I would like a EA that will close ALL open and pending trades. The EA will only consider trades for the present calendar day.

EA will have a Max_profit and Max_loss

EA will consider ALL open and closed trades for the present calendar day only when determining Max_loss or Max_profit

I have MT4 trade manager for money management

For example...........

Max_profit set at 100 pips

Current calendar date is  June 01, 2015

Total profit/loss for ALL open trades is +110 pips

Total profit/loss for ALL closed trades on June 01, 2015 is -23pips

EA will NOT close ALL open and pending trades yet because +110 - 23 = +87pips

This is less than Max_profit of +100 pips!

Another example................

Max_profit set at 110 pips

Current calendar date is  June 08, 2015

Total profit/loss for ALL open trades is +161 pips

Total profit/loss for ALL closed trades on June 08, 2015 is -31 pips

EA will close ALL open and pending trades because +161 - 31 = +130 pips

This is greater than Max_profit of 100 pips

So EA will close ALL open and pending trades exactly at +141 pips

Because +141 - 31 = 110 pips which is equal to Max_profit set at +110 pips! 

The same applies for Max_loss

Calendar date June 10, 2015

Max_loss set at -80pips

ALL open trades profit/loss = -58 pips

ALL closed trades for June 10, 2015 is - 29 pips

EA will close ALL open and pending trades exactly at 51 pips

Because -29 - 51 = -80 pips equal to Max_loss!


Another example................

Max_profit set at 115 pips

Current calendar date is  June 04, 2015

Total profit/loss for ALL open trades is +98 pips

Total profit/loss for ALL closed trades on June 04, 2015 is +17 pips

EA will close ALL open and pending trades because +98 + 17 = +115 pips

This is equal to Max_profit of 115 pips!

So EA will close ALL open and pending trades exactly at +115 pips









Responded

1
Developer 1
Rating
(271)
Projects
553
50%
Arbitration
57
40% / 37%
Overdue
227
41%
Working
2
Developer 2
Rating
(16)
Projects
39
69%
Arbitration
2
0% / 50%
Overdue
1
3%
Free
3
Developer 3
Rating
(14)
Projects
27
22%
Arbitration
18
6% / 89%
Overdue
8
30%
Free
Published: 1 code
4
Developer 4
Rating
(13)
Projects
24
42%
Arbitration
3
33% / 0%
Overdue
4
17%
Free
5
Developer 5
Rating
(453)
Projects
566
26%
Arbitration
24
42% / 38%
Overdue
85
15%
Free
Published: 6 codes
6
Developer 6
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
7
Developer 7
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
8
Developer 8
Rating
(64)
Projects
144
46%
Arbitration
21
38% / 24%
Overdue
32
22%
Working
Similar orders
Please may someone assist me with the indicator attached, it has a SERIOUS BUG issue in the sense that when I load it, and activate the template (attached as well) MT4 ALWAYS freezes and then eventually disconnects automatically, ALL THE TIME. It even gets worse to an extent that after disconnecting a number of times mt4 ends up not loading anymore, UNTIL I remove the indicator. Please I WILL NEED A DEMO (FOR A DAY)
‎A trending candle followed by a smaller trending candle which is the second candle with no 5EMA ‎ ‎The 3rd candle is a reversal candle in which it and it's immidiate previous candle must be at least 70% of each other's body or equal body, with no 5EMA touch ‎ ‎the 3rd candle candle is followed immediately by the 4th candle which is the signal candle in which it and the 1st cabdle must be also at least 70% of
LynxMT5algo 30 - 100 USD
An mt5 add on indicator like gainalgo style to show entrance and exit areas for gold silver and Btc scalping. It will be used to make trading more easy for beginners
I have the Fisher Indicator shown below the chart. I need an alert added for when the Fisher Indicator hits the 50 point at the end of each period. GBPUSD and EURUSD 4H charts are provided and I can provide additional
Hello here, I need someone who can work on pinescript and also with Renko charts. My entries for my strategy would be based on stop orders Kindly let me know if you can work on this for me and i will send necessary file and quote in the chat
Freelance Task — EA Recovery Layer Hello. I have a ready-made MQL5 EA. The signals, SL/TP and lot calculation should essentially not be touched. I need a recovery system added. I am not a programmer — below is how the robot should behave. What stays Entry only from an EA signal. Stop-loss is not a new signal. Trailing is already built into my EA — recovery does not implement its own trailing. If trailing is disabled
# SNRZ BOT — SESSION PROGRESS LOG Last updated: 2026-09-16 (local late-evening session) ## SAN BOT (new — cloned from SNRZ) - `MQL5\Experts\AutomatedOrderBot_SAN.mq5` / `.ex5` — v1.0, compiled 0 errors/0 warnings - Signal source: custom indicator "SAN" (InpSANName, buy buf 0 / sell buf 1, target bar 1), same SNRZ-style read, MA fallback if missing - Magic number 234567 (separate from SNRZ 123456 so both bots can run
Should be as it but no alarms, also we need to add a deep search so he can see all the preves candles and a memory function so its not slowing down the indicator. for higher time frames daily 4h 1h around 365 days and for lower time frames we do up to 20k bars but both flexible so i can change it later. the memory is important so the indicator is not always recalculating everything when a new candle shows especially
Hi, I need an experienced NinjaTrader 8/NinjaScript developer to finish or rebuild an automated futures strategy, ideally by the end of this week. I already have the complete TradingView Pine Script reference strategy, an existing ~2,000-line NinjaScript implementation, Playback logs, and known historical benchmark trades. MOST IMPORTANT REQUIREMENT: TRADINGVIEW ↔ NINJATRADER PARITY. The Pine Script is the reference
I need a custom MQL5 indicator for MetaTrader 5. The indicator must automatically print entry, stop loss, and take profit zones on the chart using dots. A critical requirement is that these dots must be non-lagging and absolutely non-repainting. Additionally, the indicator needs to identify and display current supply and demand zones. Please provide the mq5 source code and the ex5 file upon completion

Project information

Budget
20 - 25 USD
Deadline
from 1 to 2 day(s)