Download CloseIfProfitorLoss
Download EAPadPRO Mqh Library
The Expert Advisor duplicates manual or other EA trades and signals a preset number of times in your MetaTrader account.
The Expert Advisor Duplicator is a tool that allows you to replicate trades and signals from a manual or other EA source in your MetaTrader account.
With this tool, you can set a specific number of times you want the trades or signals to be duplicated, making it easy to manage multiple accounts or strategies simultaneously.
By using the Expert Advisor Duplicator, you can save time and effort by automating the process of copying trades and signals, which can help you achieve your trading goals more efficiently.
Main Documentation Settings FAQ
Changelog Reviews Comments Extra
Changelog:
Version 24.404 2024.04.04
Global Update EAPADPRO v55
–Added: information about profit from closed positions to the chart.
The information is displayed for each bar of the current timeframe.
You can change the timeframe to see the result of trading on a certain bar of the current timeframe.
If several positions/deals are closed on one bar of the current timeframe, the trading result is summarized, and the total information for a certain bar is displayed.
The information is updated when the next position/deal is closed.
You can turn off showing history in the panel settings.
===========================================================================================
–Added: The status of the Expert Advisor operation if it was launched on the server from “VPS MQL MetaQuotes”.
When Expert Advisor is running on the server from MetaQuotes, a message will be created on the home computer that Expert Advisors are running on the server “VPS MQL MetaQuotes”. The smiley face is blue.
Attention: If an Expert Advisor is launched on both the server and the home computer, it can trade in parallel on 2 terminals (server “VPS MQL MetaQuotes” + home computer); there may be conflicts.
Attention: If the Expert Advisor is launched on the server “VPS MQL MetaQuotes”, do not Turn it on work on the home computer to avoid conflicts.
Frequency of polling the status of work on the server = 1 day.
After deinitialization of the Expert Advisor on the server – It will get the status – stopped.
To test the work on the server from “VPS MQL MetaQuotes”, pending orders are created!
===========================================================================================
–Added: The error status of the Expert Advisor operation can now be read on the EAPADPRO panel.
You can click on the Smile or the Expert Advisor operation status bar and you will be shown a message about current errors of Expert Advisor operation.
If you click on the Smile button on the panel, you will be shown the causes and errors and their solutions with pictures.
===========================================================================================
–Added: Notification of errors and opening/closing of trades to the chart in the form of InfoBox.
Notification is shown for 4 types:
—Opening a new trade;
—Closing a deal;
—Modification of a trade;
—Error received by Expert Advisor from the server;
In the EAPADPRO panel settings, you can turn on or off the notification type you need.
Notifications can be viewed as they arrive in the notification queue.
Notifications are accumulated in a data array each time you install/reinstall/change Expert Advisor settings.
In the EAPADPRO header you can also enable disable INFOBOX.
===========================================================================================
–Added: Working with Telegram (Beta version)
For Expert Advisor to work with the Telegram bot, you need to set up the bot on your phone and create a “public” or “private” channel.
To receive notifications from your account, you need to assign your bot as an administrator of your “public” or “private” channel.
Attention! Sending notifications and working with commands takes computer resources! Use the Telegram bot only for your own needs.
New settings for working with Telegram:
EAPadPRO2=” =============== Telegram bot “;
==TG_PRIORITY=TG_HOME_VPS –> Priority of work. This is the priority mode when the Telegram bot works on the MetaQuotes VPS server and your home computer.
TG_HOME_ONLY=1, // Only the HOME bot. The Telegram bot works only on the home computer.
TG_VPS_ONLY=2, // Only the VPS bot. The Telegram bot works only on the MetaQuotes VPS server.
TG_VPS_HOME=3, // First VPS bot, second HOME bot. The Telegram bot works on the MetaQuotes VPS server if you upload it to the server. If not, it will work on your home terminal. Check the work on the VPS server every 10 minutes.
TG_HOME_VPS=4, // First HOME bot, second VPS bot. The Telegram bot works on a home computer, but if the home computer/terminal is turned off, it will work on the VPS server from MetaQuotes. Check the VPS server’s work every 10 minutes.
Attention! Screenshots are not available on the VPS server from MetaQuotes!
==TG_Token=”” –> Token bot. Token (unique code) of the bot that will send notifications and receive commands
==TG_ChannelName=”” –> –> Public Channel Name @. Or “private” ID starts -100 of the private channel. That will send notifications about opening/closing/modification/errors and screenshots from the terminal.
New notification type added to EAPADPRO panel settings:
==Notice Open TG – Send a notification to the Telegram channel if a trade is open;
==Notice Close TG – Send a notification to the Telegram channel if a trade is closed;
==Notice Modify TG – Send a notification to the Telegram channel if a trade is modified;
==Notice Error TG – Send a notification to the Telegram channel if an error is received;
==ScreenShot TG – Send a screenshot to the Telegram channel if a trade is opened or closed;
Attention! This is a beta version of working with the Telegram bot. We are working on improving and adding new features.
If you have any suggestions, please write in the “Comments” section.
===========================================================================================
–Improvement: Code optimization to increase speed.
–Improvement: The speed of the panel update in the strategy tester is now calculated automatically depending on the speed of quotes arrival.
This is done to increase the speed of the program in the strategy tester.
Information update is now equal to 1 real second.
–Improvement: The speed of the program running EAPADPRO in the strategy tester.
Attention! Events in the strategy tester are processed only when a new tick is created.
If a new tick (minimum price movement) is not created, then the panel waits for the next tick.
With Visualization:
Version 48: 390sec (TickSniper 2024-2024)
Version 55: 244sec >>159% (TickSniper 2024-2024)
w/o Visualization:
Version 48: 363sec (TickSniper 2020-2024)
Version 55: 220sec >>165% (TickSniper 2020-2024)
with Visualization:
Version 48: 15750sec (TickSniper 2020-2024)
Version 55: 6220sec >>253% (TickSniper 2020-2024)
–Improvement: The color of the button to close a position on the chart changes depending on the current profit of this position.
–Improvement: Graphic improvements to optimize the Expert Advisor’s performance
–Improvement: The account deposit Symbol is cent ¢, USD $, or eur €. All others are the first letter of the deposit currency name.
–Improvement: When visual testing is completed, objects are not removed from the graph.
–Improvement: When creating screenshots after opening/closing positions, the EAPAPDPRO Control Panel will be expanded to show full information.
This is done in order to study the trading history of Expert Advisor on the visualization graph after testing is completed.
–Fixed: Managing positions and orders from the chart when the panel is minimized.
–Fixed: Corrected the error of clearing the chart from unused order labels.
–Fixed: AutoSize when switching charts.
–Fixed: Drawing errors to Print when the Expert Advisor runs on “VPS MQL MetaQuotes”
Version 24.127 2024.01.29
EAPADPRO v48
+Added languages Chinese, Japanese, Korean, and Turkish.
+Added full control from the chart. Closing positions/orders, removing Stop Loss / Take Profit.
For full management and testing of Expert Advisor in the strategy tester.
CommentToNOTDuplication Bug Fixed
Version 23.972 2023.12.11
Update the Function of filters
CommentToDuplication=””; //CommentToDuplication –> Comments to Duplication can be Separated by a comma
CommentToNOTDuplication=””; //CommentToNOTDuplication –> Prohibited Comments to Duplication can be Separated by comma
-Last Build Compilation
–
Version 23.913 2023.09.18
——————————
-Last Build Compilation
-EAPADPRO v44
Version 23.101 2023.01.08
-Last Build Compilation
-EAPADPRO v43
Version 22.110 2022.01.12
Update EAPADPRO
Version 21.910 2021.09.10
When the DuplicateOnlyInDrawDown function is enabled – Add information to the EAPADPRO panel:
Maximum Balance – The maximum balance of the trading account, which was recorded in the account history!
Current DrawDown – Current drawdown, which is calculated from Maximum balance – Current balance! nce!
Version 21.902 2021.09.02
-EAPADPRO v41
Version 21.612 2021.06.12
EAPADPRO v40 update
Version 21.405 2021.04.06
— EAPADPRO v38
— Added breakeven function:
-BreakEven – Breakeven or modify of stoploss to breakeven!
— True enable breakeven!
-LevelWLoss – Set stop loss at the level of LevelWLoss points to profit
-LevelProfit – when the price of LevelProfit reaches profit points.
Version 21.212 2021.02.12
When calculating the functions CloseOriginalifDuplicationCloseinProfit, SWAP + Commission is now taken into account. …
Version 20.929 2020.09.29
MT4
-EAPADPRO 37;
-Compilation in the latest version of the terminal;
-Fixed error using TPWCM_Use = true
at:
StopLossDuplicate = -1
TakeProfitDuplicate = -1
Version 20.408 2020.04.08
– Added emergency operation mode when timer setting is unsuccessful: cannot set millisecond timer
(It happens on weak computers or when there is not enough RAM)
–Update EAPADPRO v35
Version 19.823 2019.08.23
Обновление EAPADPRO для MQL5 VPS
Version 19.812 2019.08.12
EAPADPRO v33
Version 19.801 2019.08.02
EAPADPRO v31 Update
In the CommentToDuplication field:
Added additional value “NullComment”, which means an empty comment!
If you need to copy only those positions that do not have a comment, then
CommentToDuplication = NullComment;
Version 19.527 2019.05.27
In the Duplicator for MT4 version, a new parameter has been added to the DuplicateOnlyInDrawDown function:
DrawDownPercent – Percentage for DuplicateOnlyInDrawDown!
Version 19.424 2019.04.24
ModifySLTPfromMainPosition
ModifySLTPfromMainPosition – Change StopLoss and TakeProfit by the levels of the main position.
If ModifySLTPfromMainPosition = true, then our program will modify StopLoss and TakeProfit every time StopLoss and
TakeProfit change at the main position.
If ModifySLTPfromMainPosition = false, then our program will set StopLoss and TakeProfit only when opening a position and
will not change these levels.
Attention!
Change is possible only when the current stop loss for SELL is higher than the opening price of the position.
Change is possible only when the current stop loss for BUY is lower than the opening price of a position.
This is done in order not to change the stop loss if it is already in profit. (Work breakeven or trailing stop)
If the TrailingStopUSE (false) is disabled in our program, then the stop loss and take profit always change!
Version 19.402 2019.04.02
Error duplication only “positions” fixed.
OrderToDuplication = All_BUYSELL
Version 19.401 2019.04.01
ReBuild ReBuild
Version 19.330 2019.03.30
Added for MT4 version:
CloseOriginalifDuplicationClosed
Close the source position (original position) if the duplicate position was closed.
Version 19.325 2019.03.25
– EAPADPRO v27 update
– Added partial close function to version for MT4.
When closing the original position partially, our program will close part of the duplicate!
Note: The function can work with the original lot and with CoefficientLotDuplicate
When using other functions, the program will close a lot equal to the lot of a partial position.
Note: It works only with positions that have been opened using the new version of the program!
Version 19.322 2019.03.22
Error duplication only “positions” fixed.
OrderToDuplication = All_BUYSELL
Version 19.315 2019.03.15
Added warning that the adviser is already installed on the chart.
Attention: To duplicate all positions, our advisor should be set only on 1 chart!
Version 19.202 2019.02.02
– EAPADPRO v26 update
– Added new feature:
ModifySLTPfromMainPosition – Change StopLoss and TakeProfit by the levels of the main position.
If ModifySLTPfromMainPosition = true, then our program will modify StopLoss and TakeProfit every time StopLoss and TakeProfit change at the main position.
If ModifySLTPfromMainPosition = false, then our program will set StopLoss and TakeProfit only when opening a position and will not change these levels.
Version 19.107 2019.01.07
– Update EAPADPRO v25;
– Additional languages added to the panel: Spanish, Portuguese (Brazil), German, Chinese, Japanese;
The translation was made using the GOOGLE Translator + MQL + Terminal site!
if you find an error in your language, please report it in messages. Thank!
– Increase the speed of the panel;
Version 18.830 2018.08.30
Duplicator Update EAPADPRO v 20
Version 18.816 2018.08.17
EAPADPRO update
Auto-save notification settings on the DEMO account.
Disable notifications in the Real account by default.
Added check of the status of PUSH notifications, if they are included in the terminal settings.
Added the CheckBox to enable/disable the creation of screenshots in the settings of the Panel: on the Opening / Closing.
Screenshots are created in the folder of your terminal Files Expert name , with a size of 1024 * 768.
Added a variable in the AutoMinimize panel settings in seconds (60 seconds by default) 0 – disabled.
Automatic minimization of the EAPADPRO window after a specified number of seconds to reduce the load on the computer when the user does not interact with the GRAPH.
Any inactivity on the graph: clicking on the graph, clicking on objects, resizing the graphs – leads to the automatic minimization of the window of our EAPADPRO panel.
If the window is in focus (selected) – automatic minimize is disabled!
To disable auto minimization – set the panel settings in the AutoMinimize = 0 field.
Replacement of fonts for correct display on computers without the Russian language.
Version 18.6 2018.04.24
– Update for the information panel EAPADPRO v2.0;
– Updated the commission calculation algorithm;
– Updated the SymbolToDuplication parameter; it is now possible to specify multiple currency pairs for the utility to work with, separated by commas. For example, EURUSD,USDCHF, USDJPY
Version 18.1 2018.02.01
– Added the ability to copy only the profitable/unprofitable positions when using ReverseDuplicate=true
– Warning: typos have been fixed in certain parameters. Check your settings if you changed them.
Version 17.726 2017.08.02
Added new parameter to the block of position reversion when copying – ReverseDuplicate
ReverseSLTP – reverse Stop loss and Take profit when reversing deals:
ReverseSLTP=true
When copying and reversing deals from the main deal, stop loss profit is also reversed on the duplicator.
For example:
The main deal is SELL with stop loss = 100 points, take profit = 300 points. The duplicator copies: BUY with a stop loss of 300 points and take profit = 100 points.
ReverseSLTP=false
When copying and reversing deals from the main deal, stop losstake profit are not reversed on the duplicator, but set according to the stop values on the master
For example:
the main deal if SELL with stop loss = 100 points, take profit = 300 points. the duplicator copies: BUY with a stop loss of 100 points and take profit = 300 points.
Version 17.320 2017.04.04
– Algorithm processing speed increased for better performance and signal receiving.
– New parameter in the EAPADPRO block: SecondsToRefresh – the frequency of chart info refresh.
The default is 10 seconds! This allows to avoid too much CPU load.
Version 17.228 2017.03.01
The EA operation speed has been increased 2! times.
Added the MilliSecondsTimerForMonitoring parameter for the EA calculation in milliseconds.
MilliSecondsTimerForMonitoring=500 means that the EA checks all trades every half a second.
Added the DuplicateOnlyInDrawDown parameter for filtering the EA operation.
DuplicateOnlyInDrawDown – the EA operation only when the account is in a drawdown.
The drawdown is calculated based on the maximum recorded account balance.
It is possible to specify the balance for calculation in the StartBalance variable. 0 – the EA will automatically calculate the maximum account balance.
When this feature is enabled, the following happens:
The duplication starts only when the balance (AccountBalance()) decreases. If the balance recovers, duplication of new orders is suspended until the new drawdown. If the balance grows, the drawdown is calculated based on the new maximum level.
In other words, duplication of new orders (from the moment of receiving a balance drawdown) starts only when positions are closed in a loss.
Added a new block – Clients TPWCM EXTRA SETS Stops when Master Close Pos.
When the block is enabled: If a position is closed on the source, the position will not be closed on the duplicator. Instead, a trailing stop or breakeven function starts on the duplicator for that position.
That is, instead of closing, the duplicator allows trailing the position further.
In this case, the trailing stop settings are individual. It is enabled only when the position is closed on the source.
Note: When enabled, this function automatically disables the CloseDeleteDuplicate function
Parameters:
TPWCM_TakeProfitWhenCloseMaster – parameter to set the take profit for the trades that remain after source positions are closed;
After a trade is closed on the master – it is possible to set a take profit based on the closing price of the source trade without closing it on the duplicator;
TPWCM_TakeProfitOnlyToProfitZone –
If set to true – the EA places take profit after the trade is closed in the source and in the positive area only. If the trade is unprofitable after it is closed in the source – take profit will not be placed until it is in the positive area;
If set to false – the EA places take profit in any area (even negative one).
TPWCM_StopLossWhenCloseMaster – parameter to set the stop loss for the trades that remain after source positions are closed;
TPWCM_TrailingStopUSE – enable trailing stopbreakeven for the duplicator trades after the source trades are closed;
PWCM_IfProfTrail – stop loss is trailed only in the positive areas;
TPWCM_TrailingStop – trailing stop distance;
TPWCM_TrailingStep – trailing stop step;
TPWCM_BeZubitok – enable breakeven for the duplicator trades after the source trades are closed
TPWCM_LevelWLoss – set the stop loss at the level of Open price +- TPWCM_LevelWLoss points;
TPWCM_LevelProfit – set breakeven when the position is in TPWCM_LevelProfit points of profit;
Version 17.208 2017.02.14
Improved EAPADPRO
Version 17.120 2017.01.27
Added the OnlyCloseOrders option, which allows the EA only to close the duplicate positions.
If signal provider starts going into a noticeable drawdown, the deposit may not withstand. In the most stressful situations, it is possible to completely disable copying (OnlyCloseOrders=true) and disable opening duplicate orders to avoid overloading the deposit. The EA will stop opening new positions, but will still close positions opened earlier. If their original (master) position is closed by the signal provider.
Fixed working with long tickets
– Added parameter
MaxSpreadToNotTrade and MinSpreadToNotTrade
MaxSpreadToNotTrade – Maximum spread, at which the EA can copy a grid
MinSpreadToNotTrade – Minimum spread, at which the EA can copy a grid
– Added the EAPADPRO information panel
Details on the panel in our blog:
or https://www.mql5.com/ru/blogs/post/687140
Version 17.110 2017.01.13
Added new parameter MaxLotToDuplicate – maximum lot for the duplicate, which will be copied.
Version 16.996 2016.12.22
Fixed a bug in the CopyOnlyLossPosPoint function
Version 16.995 2016.12.14
The chart where the EA is running now features three buttons:
Close All position duplication
Close Profit duplication
Close Loss duplication
New EA parameter:
CloseOriginalifDuplicationCloseinProfit – close source position, if the duplicate position was closed with profit. Profit coverage of duplicate and source positions.
E.g. if ReverseDuplicate=true and KoeficientLotDuplicate=2, after opening a sourc eposition the EA will repeat it with a reversal and a double lot.
Further, if the duplicate position is closed with a profit and this profit covers the loss of the source position, the EA will close the source position.
New EA parameters:
DynamicLot=false;
LotBalancePcnt=20;
These parameters adjust automated lot and free margin calculation.
Bug fixes.
Version 16.957 2016.11.02
Added the ReopenClosedDuplicateOrder parameter allowing you to manually re-open duplicate orders if they were closed by a stop loss.
If ‘true’, all master positions are duplicated. If any of the positions were closed, the EA duplicates it.
If ‘false’, no duplication is performed.
Added the OnlyNewPositions parameter allowing you to duplicate only positions that were cancelled after starting the EA.
If ‘true’, the EA copies new trades only, while the previous ones are skipped.
Version 16.935 2016.10.07
Modified the EA for working on the Timer (1 second) to increase the duplication speed
Version 16.916 2016.09.30
New parameter CommentToDuplication
CommentToDuplication = a comment for deals to be repeated. For example: CommentToDuplication=”The X” – in this case the EA will only repeat the deals opened with the comment “The X”
You can also specify a part of the deal comment.
For example, your deals have the following comments: TickSniper 1 ,TickSniper 2, TickSniper 3,
You can enter CommentToDuplication=”TickSniper”, then all deals with the TickSniper word in the comment will be repeated on the account.
Version 16.213 2016.02.15
Fixed a bug which caused lots to increase after requotes.
Version 16.107 2016.01.07
Added new orders selection All_BUYSELL and the All_STOPLIMIT
Added reverse Orders(with ReverseDuplicate=true)
SELLLIMITBUYSTOP
SELLSTOPBUYLIMIT
Version 15.935 2015.10.06
When you duplicate items in reverse – Stop Loss = Take Profit and Take Profit = Stop Loss;
Added options for duplicate conditions:
CopyOnlyLossPosPoint – duplicate only the items that are less than the specified loss in points (indicated with a minus), 0 – off.
CopyOnlyProfPosPoint – duplicate only the items exceeding the specified profit in points, 0 – off.
Version 15.932 2015.10.02
Fixed bug when closing the position using ReverseDuplicate.
This post is also available in: English Українська Portuguese Español Deutsch Chinese Русский Français Italiano Türkçe 日本語 한국어