Edit EA to deal with Slippage and Take Profit bugs

MQL4 Experts

Job finished

Execution time 1 day

Specification

PLEASE NOTE: THIS JOB IS NOT AS SIMPLE AS IT READS , PLEASE READ CAREFULLY IN THE CODE AND UNDERSTAND TO ISSUE BEFORE APPLYING TO-DO THIS JOB

I need someone to edit my EA and make it 100% work. It is a Martingale EA and it is 95% working but it has 2 bugs.

1.Whenever there is slippage , the EA does not trigger a trade , I need it to trigger a trade at the next available price OR send the order again if missed

2.Intermitently the 0.01 trades are triggered without a TP  I need  this edited to see if there has been more than 10 seconds passed from the time of Trade entry and if there is no TP on a trade then add a TP to that trade OR delete the trade  –This only applies to the 0.01 trades--

I need someone to edit and fix these 2 issues please. 

They also need to be VERY PATIENT because I need to test the EA for at least 40 HRS before we conclude the job. I  have attached the EA

I PREFER THE DEVELOPER TO TEST THEIR PRODUCT THOROUGHLY BEFORE GIVING ME TO TEST...AT LEAST SPEND TIME CHECKING IF YOU HAVE NOT BROKEN THE EXISTING CODE AND YOUR FIXES ARE ACTUALLY WORKING BEFORE GIVING ME TO CHECK , ITS VERY IMPORTANT; 

The Logic on the EA should be as follows;

I understand the slippage and bid and ask price so it’s OK, I will just give an example ignoring slippage , bid and ask prices.

Let me use 0.01 as the starting lot and use an example when the price is going up ....This example only shows when the price is going up so the same is true if the price is going down as well , we just do the opposite

 

BELOW  IS AN EXAMPLE OF WHAT SHOULD HAPPEN WHEN THE PRICE IS GOING UP ON AUDUSD (WE DO THE EXACT OPPOSITE WHEN THE PRICE IS GOING DOWN)

---------------------------------------------------------------------------------------------------------- As soon as We switch on the EA this happens-------------------------------------------------
1.We buy and sell at the same time.
e.g
Buy     0.7280 == 0.01 >> TP 0.7288
Sell     0.7280 == 0.01 >> TP 0.7272

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade with a 10 pip target.
The Sell trade will be opened @ 0.02 and the original sell will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g

Buy     0.7288  ==0.01 >> TP  0.7296
Sell     0.7280 == 0.01 >> TP  0.7278
Sell     0.7288  ==0.02 >> TP  0.7278 ---> The new Sell  has a TP of 10 Pips


When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade with a 12 pip target.
The Sell trade will be opened @ 0.03 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7296  ==0.01 >> TP  0.7304
Sell     0.7280 == 0.01 >> TP  0.7278
Sell     0.7288  ==0.02 >> TP  0.7278
Sell     0.7296  ==0.03 >> TP  0.7278 ---> The new Sell  has a TP of 12 Pips

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade with a 16 pip target.
The Sell trade will be opened @ 0.05 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7304  ==0.01 >> TP  0.7312
Sell     0.7280 == 0.01 >> TP  0.7288
Sell     0.7288  ==0.02 >> TP  0.7288
Sell     0.7296  ==0.03 >> TP  0.7288
Sell     0.7304  ==0.05 >> TP  0.7288 ---> The new Sell has a TP of 16 Pips
 
When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade with a 20 pip target.
The Sell trade will be opened @ 0.08 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7312  ==0.01 >> TP  0.7320
Sell     0.7280 == 0.01 >> TP  0.7292
Sell     0.7288  ==0.02 >> TP  0.7292
Sell     0.7296  ==0.03 >> TP  0.7292
Sell     0.7304  ==0.05 >> TP  0.7292 
Sell     0.7312  ==0.08 >> TP  0.7292 ---> The new Sell has a TP of 20 Pips

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade with a 24 pip target.
The Sell trade will be opened @ 0.13 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7320  ==0.01 >> TP  0.7328
Sell     0.7280 == 0.01 >> TP  0.7296
Sell     0.7288  ==0.02 >> TP  0.7296
Sell     0.7296  ==0.03 >> TP  0.7296
Sell     0.7304  ==0.05 >> TP  0.7296
Sell     0.7312  ==0.08 >> TP  0.7296
Sell     0.7320  ==0.13 >> TP  0.7296 ---> The new Sell has a TP of 24 Pips
---------From this stage onwards the TP does not change , please check carefully what happens now------
When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade WITH A 24 PIP TARGET.
The Sell trade will be opened @ 0.21 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7328  ==0.01 >> TP  0.7334
Sell     0.7280 == 0.01 >> TP  0.7304
Sell     0.7288  ==0.02 >> TP  0.7304
Sell     0.7296  ==0.03 >> TP  0.7304
Sell     0.7304  ==0.05 >> TP  0.7304
Sell     0.7312  ==0.08 >> TP  0.7304
Sell     0.7320  ==0.13 >> TP  0.7304
Sell     0.7328  ==0.21 >> TP  0.7304 ---> The new Sell has a TP of 24 Pips

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade WITH A 24 PIP TARGET.
The Sell trade will be opened @ 0.34 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7334  ==0.01 >> TP  0.7342
Sell     0.7280 == 0.01 >> TP  0.7310
Sell     0.7288  ==0.02 >> TP  0.7310 
Sell     0.7296  ==0.03 >> TP  0.7310
Sell     0.7304  ==0.05 >> TP  0.7310 
Sell     0.7312  ==0.08 >> TP  0.7310
Sell     0.7320  ==0.13 >> TP  0.7310
Sell     0.7328  ==0.21 >> TP  0.7310
Sell     0.7334  ==0.34 >> TP  0.7310 ---> The new Sell has a TP of 24 Pips

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade WITH A 24 PIP TARGET.
The Sell trade will be opened @ 0.55 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7342  ==0.01 >> TP  0.7350
Sell     0.7280 == 0.01 >> TP  0.7318
Sell     0.7288  ==0.02 >> TP  0.7318  
Sell     0.7296  ==0.03 >> TP  0.7318 
Sell     0.7304  ==0.05 >> TP  0.7318 
Sell     0.7312  ==0.08 >> TP  0.7318
Sell     0.7320  ==0.13 >> TP  0.7318 
Sell     0.7328  ==0.21 >> TP  0.7318 
Sell     0.7334  ==0.34 >> TP  0.7318 
Sell     0.7342  ==0.55 >> TP  0.7318 ---> The new Sell has a TP of 24 Pips

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade WITH A 24 PIP TARGET.
The Sell trade will be opened @ 0.89 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7350  ==0.01 >> TP  0.7358
Sell     0.7280 == 0.01 >> TP  0.7326
Sell     0.7288  ==0.02 >> TP  0.7326 
Sell     0.7296  ==0.03 >> TP  0.7326 
Sell     0.7304  ==0.05 >> TP  0.7326 
Sell     0.7312  ==0.08 >> TP  0.7326
Sell     0.7320  ==0.13 >> TP  0.7326 
Sell     0.7328  ==0.21 >> TP  0.7326 
Sell     0.7334  ==0.34 >> TP  0.7326 
Sell     0.7342  ==0.55 >> TP  0.7326
Sell     0.7350  ==0.89 >> TP  0.7326 ---> The new Sell has a TP of 24 Pips

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade WITH A 24 PIP TARGET.
The Sell trade will be opened @ 1.44 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7358  ==0.01 >> TP  0.7366
Sell     0.7280 == 0.01 >> TP  0.7334
Sell     0.7288  ==0.02 >> TP  0.7334 
Sell     0.7296  ==0.03 >> TP  0.7334 
Sell     0.7304  ==0.05 >> TP  0.7334 
Sell     0.7312  ==0.08 >> TP  0.7334
Sell     0.7320  ==0.13 >> TP  0.7334 
Sell     0.7328  ==0.21 >> TP  0.7334 
Sell     0.7334  ==0.34 >> TP  0.7334 
Sell     0.7342  ==0.55 >> TP  0.7334
Sell     0.7350  ==0.89 >> TP  0.7334
Sell     0.7358  ==1.44 >> TP  0.7334 ---> The new Sell has a TP of 24 Pips

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade WITH A 24 PIP TARGET.
The Sell trade will be opened @ 2.33 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7366  ==0.01 >> TP  0.7374
Sell     0.7280 == 0.01 >> TP  0.7342
Sell     0.7288  ==0.02 >> TP  0.7342
Sell     0.7296  ==0.03 >> TP  0.7342
Sell     0.7304  ==0.05 >> TP  0.7342
Sell     0.7312  ==0.08 >> TP  0.7342
Sell     0.7320  ==0.13 >> TP  0.7342 
Sell     0.7328  ==0.21 >> TP  0.7342 
Sell     0.7334  ==0.34 >> TP  0.7342
Sell     0.7342  ==0.55 >> TP  0.7342
Sell     0.7350  ==0.89 >> TP  0.7342
Sell     0.7358  ==1.44 >> TP  0.7342
Sell     0.7366  ==2.33 >> TP  0.7342 ---> The new Sell has a TP of 24 Pips

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade WITH A 24 PIP TARGET.
The Sell trade will be opened @ 3.77 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7374  ==0.01 >> TP  0.7382
Sell     0.7280 == 0.01 >> TP  0.7350
Sell     0.7288  ==0.02 >> TP  0.7350
Sell     0.7296  ==0.03 >> TP  0.7350
Sell     0.7304  ==0.05 >> TP  0.7350
Sell     0.7312  ==0.08 >> TP  0.7350
Sell     0.7320  ==0.13 >> TP  0.7350
Sell     0.7328  ==0.21 >> TP  0.7350
Sell     0.7334  ==0.34 >> TP  0.7350
Sell     0.7342  ==0.55 >> TP  0.7350
Sell     0.7350  ==0.89 >> TP  0.7350
Sell     0.7358  ==1.44 >> TP  0.7350
Sell     0.7366  ==2.33 >> TP  0.7350
Sell     0.7374  ==3.77 >> TP  0.7350 ---> The new Sell has a TP of 24 Pips

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade WITH A 24 PIP TARGET.
The Sell trade will be opened @ 6.10 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7382  ==0.01 >> TP  0.7390
Sell     0.7280 == 0.01 >> TP  0.7358
Sell     0.7288  ==0.02 >> TP  0.7358
Sell     0.7296  ==0.03 >> TP  0.7358
Sell     0.7304  ==0.05 >> TP  0.7358
Sell     0.7312  ==0.08 >> TP  0.7358
Sell     0.7320  ==0.13 >> TP  0.7358
Sell     0.7328  ==0.21 >> TP  0.7358
Sell     0.7334  ==0.34 >> TP  0.7358
Sell     0.7342  ==0.55 >> TP  0.7358
Sell     0.7350  ==0.89 >> TP  0.7358
Sell     0.7358  ==1.44 >> TP  0.7358
Sell     0.7366  ==2.33 >> TP  0.7358
Sell     0.7374  ==3.77 >> TP  0.7358
Sell     0.7382  ==6.10 >> TP  0.7358 ---> The new Sell has a TP of 24 Pips

When it moves up 8 pips close the Buy Trade at the same time open another buy trade with an 8 pip target and another sell trade WITH A 24 PIP TARGET.
The Sell trade will be opened @ 9.87 and the previous sells will adjust its TP to align with the TP of the newly opened trade.
The Trades at that time will be as follows

e.g
Buy     0.7390  ==0.01 >> TP  0.7398
Sell     0.7280 == 0.01 >> TP  0.7366
Sell     0.7288  ==0.02 >> TP  0.7366
Sell     0.7296  ==0.03 >> TP  0.7366
Sell     0.7304  ==0.05 >> TP  0.7366
Sell     0.7312  ==0.08 >> TP  0.7366
Sell     0.7320  ==0.13 >> TP  0.7366
Sell     0.7328  ==0.21 >> TP  0.7366
Sell     0.7334  ==0.34 >> TP  0.7366
Sell     0.7342  ==0.55 >> TP  0.7366
Sell     0.7350  ==0.89 >> TP  0.7366
Sell     0.7358  ==1.44 >> TP  0.7366
Sell     0.7366  ==2.33 >> TP  0.7366
Sell     0.7374  ==3.77 >> TP  0.7366
Sell     0.7382  ==6.10 >> TP  0.7366

Sell     0.7390  ==9.87 >> TP  0.7366---> The new Sell has a TP of 24 Pips

 

 

Responded

1
Developer 1
Rating
(73)
Projects
132
52%
Arbitration
9
44% / 33%
Overdue
63
48%
Free
Similar orders
Hello, I need some expert who can hlep me fix the errors of this bot that will work normally ba check the bot file, error messages, and any specific issues you are currently facing so you can get started
1. Project Overview I am looking for an experienced MQL5 developer to design a robust, clean, and well-structured Expert Advisor (EA) for MetaTrader 5. The goal is to transform a clearly defined trading logic into a stable, efficient, and fully configurable EA , suitable for backtesting and optimization. 2. Platform & Language Platform: MetaTrader 5 Programming language: MQL5 Code must follow best practices (modular
Please, I need an expert and professional to watch the uploaded video and tell me the name of the strategy. Thank you very much.Please name the strategy accurately, professionally, and clearly
I want a modification on my ea . A spread filter or slipage filter such that when the market price is less than 50 point away from the pend order , then ea check the spread if less than the set filter spread. If spread is more than the set spread, the ea will delete the pend order . Secondly , if the broker price is moved or sliped the pending order from the original price it was set by the tolerable slipage distance
Hi, I’m currently looking to purchase a profitable Expert Advisor (EA) for XAUUSD on MT4 and different Symbols . If you have an EA that has consistently been profitable, I’d be interested in purchasing the source code. I would like to backtest the strategy and evaluate it before making any purchases. What I’m ideally looking for: Designed specifically for XAUUSD (MT4) Consistent profitability with solid risk
Hello, good day to you Developers, I am looking for someone that can deliver on a project with the following requirements: The job I am about to give out will involve "Tradingview" and "Metatrader 5" Tradingview: for analysis, as the Strategy uses one second charts/candles, Metatrader 5: for executing and managing the trades. For this EA to work well for the project's aims, SPEED of execution is of upmost
1. Objective Create an MT5 automation script (or set of scripts) that fully automates my strategy optimization workflow, including: • Batch optimization runs • Automatic filtering of results • Automatic forward testing • Exporting and organizing results into structured files/folders The goal is to reduce manual work and allow one‑click execution of the entire pipeline. 2. Platform & Environment • MetaTrader 5 •
I'd like to optimize in Strategy Tester by Custom Optimization of strategies ran by Win Rate %. I can't find a way to view each scenario's win rate without running them individually and looking at Backtest
Would it be possible to connect Futures prop firm with Rithmic or Tradeovate platform to Ninjatrader automated trading ? If anyone can do this for me I will be happy to get started with the person right away
hello great developer I want to modify my NT8 indicator to change its arrow printing logic so that arrows appear on the first candled dot, not after the series. no repaint and no back painting. all in real time. This will help me get timely signals. Scope of work - Modify NT8 indicator logic to print arrows on the first candled dot. - Ensure arrow print matches 90%+ accuracy compared to the current functionality. -

Project information

Budget
10 - 40 USD
Deadline
from 1 to 6 day(s)