Loading…

Tunnel Martingale

Tunnel Martingale is an expert advisor (trading robot) for MetaTrader 4 from the Old Kings collection. Judging by its name, it is built around martingale money management (bigger lots after a loss — high risk). It raises the lot size after losses (martingale — high risk), places pending orders and moves the stop behind price. It has 40 settings, for example txt01 (default [COMMON]), Start Type (default STStartFromSNR) and Profit Line Color (default clrGold). Watch it on a demo account for a while — robots can behave differently with each broker. Inside: 1 EA file with source code (.mq4) you can open and edit in MetaEditor. Old Kings are classic community tools shared as-is. Not tested by PolyMaria. Try it on a demo account first. Are you the author of this tool? Message us on Telegram (@abumarket_support) and we will credit you or take it down.

Expert advisor · MT4 · v1.0 · Free

About Tunnel Martingale

Tunnel Martingale is an expert advisor (trading robot) for MetaTrader 4. It increases the lot size after a losing trade (martingale), places pending buy/sell stop or limit orders and moves the stop loss behind price (trailing stop / break-even). It has 40 settings, such as Txt01, Start type and Profit line color. MQL source code included.

It also can size trades from your balance and risk percent.

Files in the download: TunnelMartingale.mq4.

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

Settings

SettingDefaultWhat it does
Txt01 [COMMON]
Start typeSTStartFromSNREA Start Type
Profit line colorclrGoldTake Profit line color
Text colorclrGoldText color
Upper gap price colorclrDarkOrchidUpper Gap Price Color
Lower gap price colorclrDarkOrangeLower Gap Price Color
Text size8Text Size
Magic number8080Magic Number
Line styleSTYLE_SOLIDLine style
Line width1Line width
Line height10Line Height
Date time typeDTTLocalTimeDate and Time base
Daily start time10:00:00Start Time (HH:mm:ss)
Daily stop time00:00:00Stop Time (HH:mm:ss)
Comment infoTUNNELMARTINGALECustom Comment
Txt05 [SLIPPAGE]
Use slippagefalseUse Slippage
Closing slippage50Closing Slippage (if Use Slippage is true)
Opening slippage50Opening Slippage (if Use Slippage is true)
Txt02 [LOT(S)]
Start amount typeSADynamicType of Start Lots
Start dynamic amount0.00005Dynamic Lots
Start fixed amount0.01Fixed Lots
Txt03 [MARTINGALE]
Martingale factor1Martingale Factor
Max martingale factor50Max Martingale Factor (Max Order)
Factor multiplier1.5Martingale Factor Modifier
Factor operatorFOMultiplyFactor Operator
Martingale gap100Gaps (points)
Max martingale cycle3Max Cycle (0 = unlimited)
Txt04 [TARGET]
Target typeTTDynamicMoneyTarget Type
Trailing target typeTTTNoneTrailing Target Type
Profit target40.0Profit Target (in current currency)
Profit target multiplier0.008Target Multiplier (for Dynamic Money)
Trailing target10.0Trailing Profit Target (for Fixed Money)
Trailing target multiplier0.002Trailing Profit Target Multiplier (for Dynamic Money)
Use profit lossfalseEnable Max Loss (not applied if TrailingTargetType is TrailingTarget)
Profit loss-9999999Max Loss (for Fixed Money)
Profit loss multiplier-9999999Max Loss Multiplier (for Dynamic Money)

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: Martingale · Pending Orders · Trailing Stop & Break-even · Risk & Lot Size · MT4 Expert Advisor · MQL4 Source Code

Old Kings — classic MT4 & MT5 collection · PolyMaria