Loading…

Inverse Weighted Copier

Most "reverse copier" scripts do the naive thing: read the master's direction, flip BUY/SELL, and copy the lot size unchanged. That is not a strategy, it is a coin flip with extra steps - if the master has genuine edge, fading it loses money; if the master is a coin flip, fading it inherits the same negative expectancy from spread, commission and swap, paid again on a second account. This EA does two things differently, and is honest that neither one turns fading into a reliable edge. First, it never copies the master's lot size directly - it reads the master's own stop distance from the signal (in broker points) and sizes its own position purely from its own account equity, its own configured risk percentage, and the symbol's live tick value and tick size. A master trading a huge account with tiny stops and a small account with wide stops produce genuinely different risk footprints; copying raw lots ignores that entirely. Second, the risk percentage itself is inverse-weighted against the master's own lot size: the bigger the master's position relative to a configured reference size, the smaller a fraction of the base risk this EA allocates to fading it (floored so it never reaches zero). The reasoning - that a master sizing up signals reduced conviction rather than genuine edge - is a heuristic taken on faith, not a backtested result. Nothing in this project claims fading a signal provider is profitable in general; it exists to make inverse copying at least risk-honest if someone chooses to run it, not to make it work. Notes and limitations This is a slave-only copier. It does not include, and this catalogue entry does not claim to include, a master-side EA that writes the signal file - that publisher is the operator's own responsibility, matching the pattern used by the other copier entries in this catalogue. Without a master lot size and stop distance in every signal line, this EA cannot risk-size a fade at all and will decline the signal outright. The inverse weighting scheme is a stated heuristic, not a validated trading edge. There is no evidence bundled with this project that fading a signal provider, weighted or not, is profitable over any sample of trades. Paper-trade or demo-test extensively before drawing any conclusion. Fading doubles transaction costs relative to simply not trading: both the master account and this account pay spread, commission and swap on their respective positions, and those costs do not cancel between the two accounts even when the trade directions do. The EA assumes a hedging-style account (this build targets MT4, which is always hedging). It tracks its own positions purely by magic number and symbol; it does not attempt to reconcile with the master's own ticket numbers, since the master and slave are, by design, different accounts with no shared ticket space. Stop-loss distance is read once, from the signal line, at the moment the fade opens. It is never re-read or trailed afterward - if the master later moves its own stop, this EA has no way to learn that and will not adjust its own stop to match.

Expert advisor · MT4 · v1.0 · Free

About Inverse Weighted Copier

Inverse Weighted Copier is an expert advisor (trading robot) for MetaTrader 4. It can size trades from your balance and risk percent. It has 11 settings, such as Signal file name, Decline log name and Base risk percent. MQL source code included.

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

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

Settings

SettingDefaultWhat it does
Signal file nameinverse_weighted_copier_signal.csvFile in MQL4\Files\ written by the master/bridge
Decline log nameinverse_weighted_copier_declines.csvFile in MQL4\Files\ - every declined signal, with reason
Base risk percent1.0% of equity risked on a FULL-weight inverse trade
Reference lots0.10Master lot size at/below which full base risk weight applies
Min weight fraction0.20Floor on the inverse weighting fraction (never shrinks to zero)
Max total risk pct10.0Reject a new trade if projected total margin use would exceed this % of equity
Magic number47500Magic number stamped on orders this EA opens
Slippage points30Maximum acceptable slippage, in points
Take profit rr0.0Take-profit as a multiple of the risk distance (0 = no take-profit)
Max signal age sec90Ignore a signal older than this many seconds
Poll interval sec2Seconds between checks of the signal file

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: Buy/Sell Arrows · Risk & Lot Size · Trade Copier · MT4 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria