Loading…

Reverse Copier

This reads the identical shared file Local Trade Copier Master publishes and Local Trade Copier Slave also reads, but instead of mirroring the master's direction it opens the reverse side: every buy the master opens becomes a sell here, and vice versa, at a volume set independently by ratio or a fixed lot. Everything else - the file format, the staleness handling, the magic and comment tagging that lets this EA find its own hedge again after a restart - matches Local Trade Copier Slave exactly. Only the direction, and the risk framing below, differ. Read this before attaching it to real capital. Running a master account and a reverse account side by side does not create two independent chances to win - it creates one book split across two accounts, and the split is a mirror image with costs paid twice. Whatever the master account loses on a trade, this account gains before its own costs; whatever the master account gains, this account loses before its own costs. Spread, swap and commission are charged on both sides, on every trade, so the combined result across both accounts is never zero-sum before costs - it is worse than zero-sum, by double the trading cost of every trade the master places. This is not "two strategies smoothing each other out"; the two equity curves are structurally mirror images of one another minus that double cost, and no amount of ratio or lot tuning changes that relationship. The legitimate use for this EA is offsetting a known, specific exposure - a prop-firm evaluation account you want partly insured against, a broker you do not fully trust with an account you would rather not concentrate risk on, or a regulatory or tax reason to hold an equal and opposite position on a second account. It is not a way to make two accounts both profitable from the same trading decisions at once; that outcome is not available from this mechanism at any input setting. Notes and limitations - Read the risk warning in the full description before attaching this to a funded account. This EA guarantees a loss on this account precisely when the master account gains, and vice versa, before the doubled trading costs described there. - Same PC only, via Common\Files - see Local Trade Copier Master's notes. This does not copy trades across the internet or between two different machines. - On a NETTING MQL5 hedge account, a second concurrent master ticket on a symbol that already has an open hedge is skipped, not merged - see MQL4 VERSUS MQL5 DIFFERENCES above. This is specific to the MQL5 build; the MQL4 build has no such restriction because MQL4 accounts are always hedging. - A symbol the master trades but this account does not offer is skipped and logged, not substituted onto a similar symbol. - Stop loss and take profit are translated by pip distance from each account's own entry, on the hedge's own side of the market, not copied as raw prices - correct across brokers on different quotes, but the hedge's stop level is not a mirror of the master's price, by design. - Removing this EA from the chart, or the terminal closing, leaves any open hedge positions exactly as they are. Closing a hedge on removal would unwind it at whatever moment the chart happened to be touched, which is not this EA's decision to make - it never does that on its own. - This EA has no independent view of the market or risk control of its own; it exists purely to react to the master's file. Every hedge it opens is a direct consequence of a trade already placed on the master account. - If AutoTrading is off on this account, hedges cannot be opened or closed; the EA logs this and otherwise does nothing until it is re-enabled.

Expert advisor · MT4 · v1.0 · Free

About Reverse Copier

Reverse Copier is an expert advisor (trading robot) for MetaTrader 4. It can hold buy and sell positions at the same time (hedging). It has 10 settings, such as Channel name, Volume mode and Volume ratio. MQL source code included.

Files in the download: ReverseCopier.ex4, ReverseCopier.mq4, ReverseCopier.txt.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
Channel namedefaultChannel name (must match the master's input)
Volume modeVOLUME_RATIOHow the hedge volume is sized
Volume ratio1.0Used when Volume mode = Ratio
Fixed volume0.01Used when Volume mode = Fixed
Magic900002Magic number this EA tags its own orders with
Mirror sl tptrueCopy stop distance (translated to the hedge side) too
Max file age sec30Treat the file as stale beyond this age
Slippage pips3Slippage tolerance, in pips
Max retries5Attempts per order before giving up
Retry wait ms500Pause between attempts, milliseconds

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Experts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: Hedging · Volume · Trade Copier · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria