MT4+MT5 Robot “Multi-Pair-Grid-Pyramid-Overlap”

Multi-pair Mt4+Mt5 forex robot with modern MQL Protection for partners (not possible to Decompile). 

Robot logic based at Multi-pair Grid and Pyramid Trend orders management with Hidden TakeProfits and Targets. Brokers cannot read Logic of Ex4 or Ex5 file to predict code of your software. All logic situated at our Severs, but you can Change parameters of logic there in MQL/File/EA_Settings

EA working from 1 Chart and manage all pairs (no need to install EA at all pairs)

Minimal Start BALANCE to use EA : 10 000 ( $10 000 USD or 10 000 USCents = 100$ at Cent Account Type)

Minimal leverage : 1:500 

Risk=10 // 0=Off (EA will use minimal broker lot size in Grid start orders). If Risk>0=ON, EA will use Deposit % to open start orders in Grid. Total Risk will be reduced between trading currencies (not pairs) proportionally from set file. For example for 1 pair risk=10, if we will add 1 more pair in set then risk for each of 2 pairs become 5 and 5. 

MaxRisk=300 // Max lot sizes of any Grid level calculated in Risk (% from depo). This risk will be also reduced between trading Currencies proportionally that used in set file

MaxTradesGrid=15 // Max orders (levels) of Grid in 1 direction (Sell or Buy). If = 15 then it means that at 1 pair EA can open a maximum of 15 sell+15 buy orders. Total 30 grid orders max at 1 pair

AlwaysInMarket=1 // 0=Off. 1=On, robot will never close current grid serials. EA will grow balance and equity will be all time little bit less then current balance, but EA will replace all time StartEquitySerial. Conditions for this: if CurrentEquity > EquityStartSerial then EA will replace StartEquitySerial = Current Equity. In this case EA will have opportunity to grow balance more from CurrentEquity+Target% all time. And EA serials always in market and we don’t need to replace in manually like we did in old versions

IgnoreOrdersFromSlGrid=1 // 0=Off. 1=On, EA do not include Grid orders with StopLosses in calculation of CurrencyScales, like this orders do not exist anymore. 

PendingOrderTypeGrid=1 // 0=all Grid levels are market orders. 1=only start orders (1st levels) of the grid serials are Pending Stop Orders that follow the current price with fixed distance (like trailing). 2= all Grid levels of the grid serials are Pending Stop Orders that follow the price (PipStepGrid=>PendingOrderDistanceGrid+PendingOrderStepGrid, otherwise EA will place many orders in flat by same price)

PendingOrderDistanceGrid=20 // Distance from current price till Pending Stop order. This distance also hold by ea when price run away from pending stop order

PendingOrderStepGrid=3 // every 3 pip ea must replace stop pending order to PendingOrderDistanceGrid if price run away, if distance from current price become > PendingOrderDistanceGrid

PipStepGrid=12 // minimal distance between 2 grid orders of 1 serial in pips (anti-trend grid working) if indicator let do this operation by current signal

TakeProfitGrid=0 // 0=Off. If>0 its Total Break even of Grid+Pyr+TakeProfitGrid in pips

StopLossGrid=0 // 0=Off. Virtual StopLoss of every Grid Levels in Pips

PyramidTypeGrid=0 // 0=Off. 1=On, pyramid grow from every last grid level in profit direction of the Grid TP with separate PyramidStepGrid

PyramidStepGrid=0 // 0=Off. If >0=On [6-40 pip] . From every Last Grid level you will see lots of Trend Pyramid orders if started retrace to grid tp…some brokers do not like lots of positions make sure you learned your brokers rules and positions you can open at same time) 

TypeCoef1=7 // ”0” or “1” or “2” or “7” (method of calculation next grid Lot Size)

if=0 then Next Grid Level = PreviousOrderLot * GridCoef1

if=1 then Next Grid Level = AverageLotOfSerial + PreviousOrder * GridCoef1

if=2 then Next Grid Level = PreviousOrder + StartLotOfSerial

if=7 then if more Drawdown then more lotsize at First Grid Level (all pairs) will work until LevelGridCoef2=3 

if=13 then if more Drawdown then more lotsize at all Grid Levels  (all pairs) will work always – don’t care about LevelGridCoef2=3 

GridCoef1=1.4 // [0.2 – 3] depending on what TypeCoef1 you used

LevelGridCoef2=3 // level of grid the EA starts working using TypeGridCoef2 

TypeGridCoef2=2 // calculation method same as TypeGridCoef1

GridCoef2=0.8 // calculation method same as GridCoef1

VTPLastGrid=12 // Virtual TakeProfit in PIPS for every Grid order after VSLGridLevel

VTPLastHalf=0 // 0=Off, every VTPLastGrid will be closed as total order and PyramidGrid will not anything to build from (pyramid will not work from LastGrid, in case VTPLastGrid=PyramidStepGrid you let robot open Pyramid orders from LastGrid level at retrace). 1=On, then every VTPLastGrid order will not close 100% lot size – EA will close 50% lot size of VTPLastGrid pips and other part that left from order will place in Break Even. After this EA will use that piece of order to continue building Pyramid inside Grid orders if price go profit trend for this piece of order. (If=0 then EA will not build pyramid serial using 50% of lot sizes in Grid orders…Grid will work with pure Virtual Take profit and EA will close every last grid order 100% Lot size with virtual TP)

TypeOverlap=2 // method of eating Drawdown in Overlap function using new additional balance after EA reached target balance. if=2 then the EA will kill the most draw-downed order of the most draw-downed pair.  if=1 then the EA eat total orders (not a piece of order )

PyramidType=4 // 

// 0=Off. separate trend Pyramid not working 

// 1=On, pyramid will start working from signal without grid orders at account. All pyramid orders lot sizes same = as start orders of the Grid.

// 2=On, pyramid will start working from signal without grid orders at account. Every new pyramid order level will be different and it will be a % part from TotalSumGridLotSize. Example: at account opened 0.1+0.14+0.18+0.22=0.64 Grid Sell orders. PyramidCoef=0.3 (means 30%). Current level of Pyramid order = 0.64*0.3= 0.19 lot. This size can change at next level of pyramid if at this pair will change TotalSumGridLotSize. Also pyramid lot size depends from CurrencyScale of all account pairs, same as Grid CurrencyScale limitation. 

// 3=On, pyramid will start working from signal only after grid orders will come at account. All pyramid orders lot sizes same = as start orders of the Grid.

// 4=On, pyramid will start working from signal only after grid orders will come at account Every new pyramid order level will be different and it will be a % part from TotalSumGridLotSize of the Currency

in Type 2 and 4 EA using CurrencyScale Control Limitation of max PyrLotSize. Example: robot opened USDJPY+USDCHF buy Grid orders and price go down – robot will use for Sell Pyramid 30% lot size from TotalSumGridBuy of this 2 pairs. When robot will reach 30% lot size at pyramid it will continue pyramid with same lot size and stop grow lot size at next pyr level.  

PyramidStep=15 // Step in pips between 2 trend pyramid levels that work from signal

PyramidCoef=0.3 // [0.1-0.5] Lot size of the next pyramid level calculated as part% from TotalGridLotSize at this Current (0.3=30%). Limitation of maxlot pyramid 

EquityProfitCloseTarget=1// if AccountEquity > EquityStartSeries by 1% then the EA Close all orders. (file in DataFolder / MQL / Files / EA_EquityStartSeries_acc#.ini)

BalanceProfitToStartOverlap=2 // BalanceProfitToStartOverlap-EquityProfitCloseTarget=2-1=1%. Additional temporary balance that EA can grab to start overlap function (new profit eat old drawdown). Before this Ea not do OverLap. If you don’t need additional balance make this parameter same as EquityProfitCloseTarget, in this case EA will start OverLap after balance become like EquityStartSeries+EquityProfitCloseTarget

Double TF Multi-simbol indicator High-Low of Currency indexes, it use 28 pair to calculate Index and pair moments.  

Meter_TF_1=H4 // First oldies TF

Meter_Period_1=2 // [1-4] how many last bars we dedicate High-low as 100%[-8..+8]

LevelUpFlatBuy_1=6 // [-8..+8] till what Up value indicator will let working Grid orders in Buy. (or same for Sell*(-1) till what Down value indicator let working sell grid

LevelDownFlatBuy_1=-4 // [-8..+8] till what Down value indicator will let working Grid orders in Sell. (or same for Buy*(-1) till what Up value indicator let working Buy grid

LevelPyramidBuy=0 // Down value of indicator where start Buy Pyramid working up to +8 (same for pyramid Sell*(-1) Up value of of indicator where start Sell Pyramid working down to -8)

Meter_TF_2=H1 // Second TF same logic for grid orders as at First TF 

Meter_Period_2=4 // –//–

LevelUpFlatBuy_2=6 // –//–

LevelDownFlatBuy_2=-4 // –//–

Filtres=false // 

ScalesSymbol=100 // CurrencyScale (Libra) – its limitation to trade Grid at one Currency at many pairs that include same currency inside. If ScaleSymbol / Risk =100/10=10 then at any currency all pairs can have max lot = StartLotRisk*10.  Biggest ScaleSymbol – bigger lot size you let open in grid serial at Next levels. If EA reach maxScaleSymbol – it use latest lot size and will not grow it anymore. 

MaxKneeDrawdown=10 // max levels of the Grid at separate pair if this pair show this separate drawdown – ea stop to open anti-trend Grid levels at such pair. 

Join our Telegram Robot Trading Channel for support and updates here:

To join our group of testers please open a new Demo Standard Type account with IC Markets here Set your initial account settings to an opening balance of 10,000 (USD, EUR or GBP) with a Leverage of 1:500. Send us your Demo Account Number via our Telegram Robot Trading Channel.

SetUp your MT4 Options for web requests: 



Attach the EA to just one chart – EURUSD (do not attach the EA to any other charts – it is a multi-pair EA and will automatically work on all pairs). 

Change the EA settings as below:

EaName = ZIR

Version = 101

Servers = ; (in our telegram Group sometimes we ask to post 3 or 4 server at first place in set, so you must follow our Telegram Group , sometimes we also ask Turn Off one of the Server in set due to Updating)

TimeOut = 30 ( !!! you can make it 35 40 45 50, but not less then 30 – or Broker will block your Demo account. At Real possible use 20 25 30 35)

RequestFrequency = 30 ( !!! you can make it 35 40 45 50, but not less then 30 – or Broker will block your Demo account. At Real possible use 20 25 30 35)

Slip = 50 (!!!)

On your platform Right-Click your Mouse in MARKET WATCH and select SHOW ALL PAIRS (the EA must read all 28 pairs of your Broker to operate to optimum performance)

After correct installation the EA will create 2 INI files in DATA FOLDER / MQL / Files; EA_Setting_ZIR100.INI  and EquityStartSeries.ini where you can manage Settings of the EA.

If you do not see your account number in the settings of the EA, DO NOT TRADE – delete the INI files and reload the EA, and change the TF of the EURUSD chart the is EA attached to. The Ea will then create new INI files.

The Parameters of the EA are held in this file : DATA FOLDER : MQL/Files/EA_Setting_ZIR101

EquityStartSeries of EA are held in this file : DATA FOLDER : MQL/Files/EA_EquityStartSeries_acc#

 For indicator trading modes in MT4 we must open all 28 pairs chart and refresh 2 timeframes that robot will use – manually. VideoInstruction there


  • Fixed Button CloaseAll – after this indicator do not show Zero.
  • Added Brokers with EURUSD, EURUSDm (additional letters after pairs, in Set file we must use usual pairs : EURUSD ; GBPUSD … without f )
  • added button “SETTINGS” – you press it and EA open immediatelly INI SETTINGS FILE
  • added button “Close SL” – close all profit orders that have SL for Pyramid in Trend
  • Fixed Protection from Close all Drawdown when you close and open MT4/5 and when you deposit Money to grow balance. EA will change EquityStartSeries to Current Balance and will not use old EquityStartSeries (then you can manage it to your needs)