The Expert Advisor repeats trades and positions a preset number of times on your account.
- The following functions are supported: custom lot for copied trades, copying Stop Loss, Take Profit, use of trailing stop.
- It copies all deals opened manually or by another Expert Advisor.
- Copies signals and increases the lot from signals!
Note: This is not a copier for deals between terminals. A trade copier for MetaTrader is available here: COPYLOT
Version of the Duplicator for the MetaTrader 5: Exp5 Duplicator
You can test the Expert Advisor in the strategy tester and trade with our EAPADPRO toolbar in visual mode!
It is sufficient to install the EA on 1 currency pair. By default, it will monitor all open symbols.
The Idea of the Expert Advisor
The Exp - Duplicator assistant EA repeats positions opened in the terminal. The EA is able to copy both positions and pending orders. The position or the order to be copied is called source. The repeating position is a duplicate.
The EA repeats the source the specified number of times. It copies lot, Stop Loss, Take Profit, order placing price (for pending orders) and expiration. When a source is modified, SL and TP of a duplicate are also modified.
The EA is highly customizable. To get started, you must specify the types of the copied positions and orders in the first parameters.
The main copying filters:
- OrderToDuplication - type of the order to be copied.
- MagiсToDuplication - the magic number of the order to copy, specify multiple magic numbers separated by commas or set -1 to copy all magic numbers;
- SymbolToDuplication - the symbol of the order to copy (All, 0 - current, or symbol name);
Other copying filters:
- OnlyCloseOrders - allows the EA only to close the duplicate positions, without copying new positions.
- MilliSecondsTimerForMonitoring - parameter for the EA calculation in milliseconds.
- MinLotToDuplicate / MaxLotToDuplicate - minimum/maximum lot of positions to start copying.
- CommentToDuplication - comment for copied positions.
- CopyOnlyLossPosPoint / CopyOnlyProfPosPoint - loss/profit of positions to copy.
- OnlyNewPositions - copy only the new positions (opened after starting the EA).
- MaximumDistance - price deviation for copying. 0 - copy with any deviation. If greater than 0, the difference between the source price and the current price must not exceed the specified number of points;
- DuplicateOnlyInDrawDown - the EA operation is allowed only when the account is in a drawdown. The drawdown is calculated based on the maximum recorded account balance or StartBalance.
- ReopenClosedDuplicateOrder - reopen the duplicates after closing by stop loss/take profit/trailing stop.
- ReverseDuplicate/ReverseSLTP - reverse deals/stop loss and take profit.
- StopLossDuplicate/TakeProfitDuplicate - if 0, repeats the source Stop Loss/Take Profit; otherwise, a custom value.
- CloseDeleteDuplicate - delete and close duplicate orders and positions if the source ones are closed.
- CloseOriginalifDuplicationCloseinProfit - close the source position, if the duplicate position was closed with profit greater than the loss of the source position.
- AmountOfDuplicate - the number of duplicates.
- MaxSpreadToNotTrade/MinSpreadToNotTrade - prohibit trading with higher/lower spreads.
- LotDuplicate - if 0, repeats the source lot; otherwise, a custom value.
- CoefficientLotDuplicate - lot multiplier; 0 - no multiplier.
- DynamicLot/LotBalancePercent - dynamic lot as LotBalancePercent percents of free margin.
- RiskRate - exchange rate of the deposit currency in relation to the US dollar for dynamic lot calculation.
Attention: To duplicate all positions, our advisor should be set only on 1 chart!
- 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.
- 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;
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 in the panel settings in the AutoMinimize = 0 field.
Replacement of fonts for correct display on computers without Russian language.
- Updated the commission calculation algorithm;
- Updated the SymbolToDuplication parameter, it is now possible to specify multiple currency pair for the utility to work with, separated by commas. For example: EURUSD,USDCHF,USDJPY
- Warning: typos have been fixed in certain parameters. Check your settings if you changed them.
ReverseSLTP - reverse Stop loss and Take profit when reversing deals:
When copying and reversing deals from the main deal, stop loss\take profit are also reversed on the duplicator
the main deal if 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.
When copying and reversing deals from the main deal, stop loss\take profit are not reversed on the duplicator, but set according to the stop values on the master
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.
- New parameter in the EAPADPRO block: SecondsToRefresh - the frequency of chart info refresh.
Default is 10 seconds! This allows to avoid too much CPU load.
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
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;
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 stop\breakeven for the duplicator trades after the source trades are closed;
PWCM_IfProfTrail - stop loss is trailed only in the positive ares;
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;
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:
Close All positions 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:
These parameters adjust automated lot and free margin calculation.
If 'true', all master positions are duplicated. If any of the positions was 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.
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.
Added reverse Orders(with ReverseDuplicate=true)
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.