EA MPGO at Chart:

EA MPGO

All mathematic parameters description of EA MPGO:

PairsForTrading=EURGBP;EURAUD;EURNZD;EURUSD;EURCAD;XAUUSD

The robot works from one chart on all other instruments entered in this parameter – there is no need to install the robot many times for each individual currency pair. In this parameter, we enter the currency pairs on which the robot should trade from one chart. We separate all pairs with the symbol “; “. At the end of the line, the separator character “;” no need to set.

It is possible to trade simultaneously on all 28 currency pairs as well as: XAUUSD, us500, nasdaq, dax and any other indices/commodities/stocks can be used in this setting. Some multi-currency indicators (IndexAll) may not be compatible with some instruments (not currency pairs), so carefully choose trading strategies in set after you learned them all.

The robot can and should work from 1 chart at all pairs you will enter in this first parameter [1-28], but it is not necessary to use all 28. You can enter 1 or 2 or 5 pairs (up to 28 ), and each pair will have the same EA settings, if you use 1 common set and enter all pairs into one set.

Enter all the required pairs and separate them with the symbol » ; ” as above, and at the end of the last pair, do not enter anything. Also add a suffix for your pairs if the broker has them: EURUSDx; GBPUSDx; or EURUSD.m; GBPUSD.m;…

Important! Before using the robot – open all pairs in MT4 Market Watch (right mouse click – show all pairs) and check if your pairs are traded or not (try to place a small pending order at a far price. Sometimes a broker has EURUSD and EURUSDm at the same time in the account in market watch). If you want to trade any pair with separate EA settings, open a separate chart and enter alternative settings for a particular instrument if necessary (different set files for different trading pairs).

In Strategy Tester MT4, use only 1 pair in this parameter. Strategy Tester MT4 cannot open orders on more than one currency pair, nor can it use multi-currency optimisations. If you try to run a multi-currency test in MT4 you will get a ZeroDivide and Wrong Symbol error!

To use the indicator’s Index_all signal, you must enter all 28 pairs into the PairsForTrading parameter (the indicator uses all 28 pairs to build 8 indices and then builds signals separately for each pair), if necessary, you can copy 28 pairs:

EURGBP;EURAUD;EURNZD;EURUSD;EURCAD;EURCHF;EURJPY;GBPAUD;GBPNZD;GBPUSD;GBPCAD;GBPCHF;GBPJPY;AUDNZD;AUDUSD;AUDCAD;AUDCHF;AUDJPY;NZDUSD;NZDCAD;NZDCHF;NZDJPY;USDCAD;USDCHF;USDJPY;CADCHF;CHFJPY;CADJPY

Attach the EA to the fastest timeframe you use in the SET (see Signal Indicators Block). In MT4, the robot will not be able to read M15 signals from H1, if the robot is attached at H1 tf.

LoadHistoricalData = True // If True, when the robot is initialized on the chart, it will load the entire history of the broker for all currency pairs. This can take up to 5 minutes and the robot does not trade while this function is running. And further, when trading, the robot will also download and update the history once an hour and it will take 2-5 seconds for subsequent times. This function is needed for correct calculation of indicator functions and for drawing all bars on all instruments in Market Watch. Not all brokers on the newly opened TF draw all the bars, which makes the calculation in the expert advisors incorrect. This function helps the indicators to see all the bars on the history of any pair or instruments and make correct calculation of signals. We recommend use this function in True especially if you attach EA at new account first time.

TimeStartEnd = False // Use trading time filter – Yes / No
HourStart = 0 // Start time of the adviser, if the robot has no current deals on this currency pair
HourEnd = 20 // Time to end trading today and close any possible small profit (higher in Equity than yesterday) and close all orders in the account and pause trading at the same time, provided CurrentEquity > StartDepo (or Depo0 in GlobalVariables) is reached. If you enter HourStart = 8 and HourEnd = 20 (according to your broker’s server time), this means that the robot will trade between these times and try to reach MaxEquityProfit many times! If, after HourEnd = 20, the robot sees that the account has Equity > StartDepo (Depo0), the robot will close all orders on the account in order to fix even the smallest profit in funds other than yesterday, and the EA will update Depo0 in Global Variables as the current balance after closing all transactions. If you don’t want to use the new daily trading time do this: HourStart = 0 and HourEnd = 25 (impossible options). This option sometimes does not work in different GMT time zones (sometimes it makes mistakes on some brokers – it’s better to test it on a Demo account first for understand how to use or fix)

VisualButton = True // show control panel buttons Yes / No. This software is designed not only for automatic trading, but also to work in semi-automatic mode for greater profits (user control and assistance to the adviser from time to time, i.e. closing current profits, adding trend orders to hedge the global direction, placing additional pending orders trading news around price, temporarily changing profit targets to force the overlap function…etc.). In Strategy Tester, it is better to disable this option – the robot will work faster, also disable it if you work in a fully automated mode, this will save the resources of your VPS.

Debug = True // Parameter for our clients beta testers who check various debugging materials that we have coded for them in new versions of the robot (for example, if Debug = True, you can see in the Journal tab how the robot prints the values ​​of the TMA indicators for TypeTMA =8 and 9…). If our beta testers and clients report errors in the math or signal functions of the robot, they ask us to add a Debug function for a specific signal in order to catch the error in order to see if the EA reads the indicators correctly and opens the order correctly according to the current settings in the set file.

NoNewTrade = False // if True – after the robot reaches the target equal to MaxEquityProfit and closes all orders on the account (including your manual and orders of other Expert Advisors), it will not open new orders and the series grider in any direction. But if the EA does not reach the target yet and the EA has open series of orders with NoNewTrade = true – it can open new orders in existing series (grider knees) to try to reach MaxEquityProfit by Equity, and will not open any new grider series (starting orders new series will no longer be opened, but only existing series and directions will be finalized). This parameter is for those who need to reach or refine one MaxEquityProfit target, after which the robot will stop and will not trade until the user manually sets NoNewTrade = False again. In order for the EA to complete one more cycle and reach the new MaxEquityProfit target, just do NoNewTrade = False and after the robot opens new series, you can do NoNewTrade = True again if you want the robot to stop and not trade after reaching new MaxEquityProfit (you can additionally manage temporary targets using the EA buttons if you want). If this parameter is set to True, the EA will not enter NEW PAIRS even when a signal is received, it will continue to work only with existing pairs that already have orders and will only work to complete the current series before TargetEquity, or the EA will use LastTp (or TrailingStop) for each order, if all orders go into profit … also VirtualStopLoss if it does not go into profit, if VSL is activated … (which is logical and according to the settings)

Control_LimitStop = False // Allow EA control using manual pending orders (without any comments or magic numbers) as signals for grid series on individual pairs. This function is used from the metatrader4 mobile mobile application to control a robot that stands and trades on a Windows VPS in order to set a signal for trading or complete the signal and close all orders in this direction using pending orders. If True, the EA will not open a sell or a buy until a person sets Sell_Limit (for a Sell direction) or Buy_Limit (for a Buy direction) on a particular pair that he would like to trade in such directions.

To start and continue trading in the Sell direction of the MPGO EA on a given pair: simply place a Sell_Limit order for this pair above the current price of any lot size with MagicNumber = 0 (or an empty Magic Number). This pair must also be in the PairsForTrading parameter. To stop signaling and stop trading in the Sell direction on a given pair, you need to delete all Sell_Limit orders with MagicNumber = 0 (or an empty Magic Number) on such a pair. To close all Sell Market orders on a given pair, place Sell_Stop on this pair below the current price of any lot size with MagicNumber = 0 (or an empty Magic Number) for such a pair (regardless of whether you are still signaling or not signaling Sell)

To start and continue trading in the Buy direction of the MPGO Expert Advisor on a given pair: simply place a Buy_Limit order for this pair below the current price of any lot size with MagicNumber = 0 (or an empty Magic Number). This pair must also be in the PairsForTrading parameter. To stop signaling and stop trading in the Buy direction on a given pair, you need to delete all Buy_Limit orders with MagicNumber = 0 (or an empty Magic Number) on such a pair. To close all Buy Market orders on a given pair, place Buy_Stop on this pair above the current price of any lot size with MagicNumber = 0 (or an empty Magic Number) for such a pair (regardless of whether you are still signaling or not signaling Buy)

This parameter is designed for traders who trade their own manual indicator strategies or own signals or news, but would like to test the mathematical potential and power of our robot and its multi-currency overlaps and functionality for compatibility with their own signals and unique strategies. After that, create a new technical task for the new version of the robot and send it to us for revision into a full automatic algorithm with their signals. (Usually when we like your ideas, we code them for free into new versions of the robot!)

TradeBuy = True // if False, the EA will not open buy orders for any pair. Global Buy Ban

PairsOnlyTradeBuy = EURUSD; GBPUSD; NZDUSD // enter here the pairs you want to trade only Buy. These pairs must also be duplicated in the first parameter of the PairsForTrading robot. All indicator signals must be OFF ( FirstGridOrderSignal = false and AllOtherGridOrdersSignal = false )

TradeSell = True // if False, the EA will not open sell orders for any pair. Global Sell Ban

PairsOnlyTradeSell = EURJPY; GBPJPY; CADJPY // enter here the pairs you want to trade only Sell. These pairs must also be duplicated in the first parameter of the PairsForTrading robot. All indicator signals must be OFF ( FirstGridOrderSignal = false and AllOtherGridOrdersSignal = false )

NewSerialBuy = True // if False — the EA will not open start orders of the Buy Grid series. The robot will complete all existing Buy series and will no longer trade new series in Buy.

NewSerialSell = True // if False — the EA will not open starting orders of the Sell Grid series. The robot will complete all existing Sell series and will no longer trade new series in Sell.

NewLevelBuy = True // if False – the robot will not open new knees (levels) of the series. For example, you have a series of four Buy orders: 0.01 0.02 0.03 0.04 and you enable NewLevelBuy=False, then the robot will stop opening the fifth knee of the 0.05 series. NewLevelBuy = false – this is a ban on the continuation of the current Buy Grid series on all currency pairs. If, after this prohibition, the robot closes knees No. 4 and No. 3 profit and the price falls again, with this parameter NewLevelBuy = false, the robot will not reopen knees closed in profit.

NewLevelSell = True // same as NewLevelBuy only for Sell.

RISK & LOT SIZE

StartLot = 0.0 // Use 0 by default. In the new version, the robot automatically determines the minimum starting lot of any broker.

ReverseStartLot = False // Multiplier only for the first starting level of the Grid grid based on Hedge% of the amount of orders opened in the opposite series of the same currency pair. It may also affect the next levels of the new grid that will continue from this increased volume start order, as the exponents of subsequent knees will use the lot of this order to calculate the next levels (knees) in the same direction. Example: the EA has a Sell series open like: 0.1+ 0.2+ 0.3+ 0.4+ 0.5+ 0.6 (only 2.1 lots in total) and there is not a single buy order. Let’s calculate which start order of the Buy series the robot will open if ReverseStartLot = True and CoefReverseStratLot = 0.3 (30% of the opposite series in lots)? The start order of the Buy series will be calculated according to the formula: StartLotBuy(ReverseStartLot) = SumLotSell * CoefReverseStratLot = (0.1+0.2+0.3+0.4+0.5+0.6)*0.3 = 0, 63 lot. Use this function at your own risk and with a low subsequent LotExponent, because the Buy series has already started with an increased lot of 0.63, its continuation will be of the form 0.73 + 0.83 + 0.93 + 1.03 (provided that you add 0.1 lots with a gentle multiplier.)

CoefReverseStratLot = 0.3 // Share with which ReverseStartLot will open from the total lot of the opposite series on its currency pair. If the sum of lots of the Sell series on the pair = 1.5 lots, the EA will try to open 30% of 1.5 = 1.5 * 0.3 = 0.5 lots in the starting lot of the Buy series (provided that ReverseStartLot =True and CoefReverseStratLot = 0.3).

FirstLotFactor = 1.0 // [1.0-3.0] multiplier only for the 1st grid level (grid starting lot), which does not affect the next grid levels. Example: If FirstLotFactor = 2, then the EA will use the multiplier only for the 1st level of the grid 0.2 + 0.1 + 0.1… and will not affect the next levels of the grid. if FirstLotFactor = 2.5, then the EA will open 0.25 + 0.1 + 0.1… (this only changes the 1st starting level of the grid series, and all subsequent level calculations in the series think that nothing happened – they think that the series was of the form 0.1 + 0.1 + 0.1 )

StopFirstLot = 10 // after which grid level we stop using the FirstLotFactor function

Risk = 0.001 // Use one value in this parameter to trade with the same risk on all pairs in one multicurrency Set file. To use separate risks for different currency pairs in one multicurrency Set file — separate the risks using a comma 0.01 ; 0.02; 0.01; 0.05…. The number and order of risks must match the number of pairs you have specified in the PairsForTrading parameter. This EA is coded for default balance = 10,000 USCents for one pair.

Examples of calculations for various starting orders of a grid series based on the Risk parameter:
Minimum broker lot = 0.01 | Balance = 10,000 | Risk = 0.001 | Grid start order = 0.01 lots
Minimum broker lot = 0.01 | Balance = 10,000 | Risk = 0.02 | Grid start order = 0.02 lots
Minimum broker lot = 0.01 | Balance = 10,000 | Risk = 0.22 | Grid start order = 0.22 lots
Minimum broker lot = 0.01 | Balance = 20,000 | Risk = 0.03 | Grid start order = 0.06 lots
(because 20000/10000 = 2 and 2 * 0.03 = 0.06)

Roboforex cent account:
Minimum broker lot = 0.01) | Balance = 10 000 | Risk = 0.001 | Grid Start Order = 0.01 lots
Minimum broker lot = 0.01) | Balance = 10 000 | Risk = 0.05 | Grid start order = 0.05 lots
Minimum broker lot = 0.01) | Balance = 100 000 | Risk = 0.10 | Grid start order = 1 lot
Minimum broker lot = 0.01) | Balance = 30 0000 | Risk = 0.11 | Grid start order = 3.3 lots

UseCostOfPip = True // parameter only for multi-currency set file that uses one value in the Risk parameter. The EA calculates the cost of one point in money for each currency pair separately and selects such Risk and start orders of the series, which give the same profit values ​​in money when passing one point, if such starting orders were opened on all currency pairs.

MaxLotRisk = 20 // this is the maximum lot that the EA can use in the grid at any level. The calculation is based on a balance of 10,000 and the EA will increase MaxLotRisk as it is based on the Risk parameter if your balance also increases. If your balance grows from 10,000 to 20,000, the EA will understand that the maximum lot was 20 with a balance of 10,000, and automatically change this parameter to 40 lots with a balance of 20,000 (as a doubling of MaxLotRisk = 20, because the initial deposit also doubled from 10,000 to 20,000). There is no need to manually change from 20 to 40. More balance — more MaxLot the robot will automatically calculate based on 10,000 balance. That’s why it’s called MaxLotRisk ( MaxLotRisk with the current balance will be calculated proportionally from 10,000 Balance).
Examples of calculations when increasing the balance if MaxLotRisk = 10:
Balance = 10 000 | The maximum lot that the EA can use at any grid level = 10
Balance = 20 000 | The maximum lot that the EA can use at any grid level = 20
Balance = 25 000 | The maximum lot that the EA can use at any grid level = 25

MaxTrades = 15 // [1-30] how many grid levels the robot can open in 1 direction for 1 pair. If MaxTrades = 15, this means that the EA can open up to 15 grid levels in Sell + up to 15 grid levels in Buy on one currency pair (in total, only 30 orders per currency pair, no more). If you trade 4 currency pairs in a set file, this means that the robot can open 4*30=120 orders at the same time.

MaxSpreadPips = 4.5 // Filter Spread: the EA will not trade on this pair if the current spread of this pair exceeds this value in pips. The robot will trade on pairs whose current spread is below MaxSpreadFilter at the moment.

GRID

TypeOfOrders = 0 // [0, 1, 2] 0 – all market orders, 1 – only starting orders of the series will be pending orders that follow the price, and all other next levels of the grid will be regular market orders, 2 – all levels in the grid there will be pending orders

TrendStep = 100000 // The EA will use only the lot of the start order of the series and repeat it in the trend every TrendStep pips 0.1 0.1 0.1 0.1… this is a kind of pyramid in the trend, but with a constant lot. If the price rolls back after the trend, it is possible that these orders will have some minus and they will need to be managed manually or use the virtual StopLoss of the VSL function. (Also in case of profit – these orders can be used in the VirtualTrailingStop parameter to cover them in profit)

PIPsStep = 10 // minimum step in points between two levels of the Market order grid 0.1Lot-PipsStep-0.2Lot-PipsStep-0.3Lot-PipsStep-0.4Lot… The robot will use this distance between levels only if you use NonIndicatorsMode and only Market orders (TypeOfOrders = 0). Pending orders (TypeOfOrders = 2) may increase PipStep due to filtering pending orders against the trend and the step between Market Orders will be greater than PIPsStep =10. Also the functions of AutoPipStep, in turn, can extend PipStep. The EA can calculate separate AutoPipStep for different pairs based on their HighLow bars on a given TimeFrame.

AutoPipstepADR = False // AutoPipStep function can use any TF and collect the average sum of HighLow bars for the last AutoPipstepBars of bars and divide them by AutoPipstepADRdivider to calculate and change the current minimum step between grid orders on each individual pair. The parameter was created to increase the step between orders with the current increase in market volatility. In this case, if the calculated AutoPipstepADR is lower than PipsStep, the robot will use PipsStep as protection against an excessively small step value.

AutoPipstepADRTF = 2 // which TF to use to calculate the average HighLow amount? 1-M1, 5-M5, 15-M15, 30-M30, 60-H1, 240-H4, 1440-D1. Also added are M2 M3 TF or any other Renko Offline charts that are already created with other software.

AutoPipstepBars = 3 // how many bars on history to take to calculate AutoPipStep on AutoPipstepADRTF (including the current bar that hasn’t closed yet)

AutoPipstepADRdivider = 4 // The EA will look at the last AutoPipstepBars=3 bars using AutoPipstepADRTF=2 and calculate the “average value of the HighLow sum” and divide this value by AutoPipstepADRdivider = 4. The value found will be AutoPipStep pips – step between grid orders for the current pair (in in this case, all pairs will have their own personal AutoPipStep)

PENDING ORDERS FILTER

PendFollowDistance = 20 // [10-50] The EA can use an additional anti-trend filter using creeping pending Stop orders. If the price goes up, the EA will follow the current price with a pending SellStop order (something like when the automatic Trailing Stop works) at a distance of PendingFollowDistance points below the current price. A good filter to avoid opening many orders against the trend or price jumps, and can also be used as an additional time filter when trading on the news (this parameter will only be used in TypeOfOrders = 1 & 2)

PendingFollowStep = 2 // [1-5] if the price moves higher and moves away from the SellStop order, the robot will move the SellStop order every next 2 points so that the distance between the pending order and the current price equal to PendingFollowDistance is always observed. This parameter will be used only in TypeOfOrders = 1 and 2. It is important to note that the robot can only move a pending order against the trend, if the price falls and we have a SellStop pending order below the price, then the algorithm will not move SellStop lower, but will simply wait for the price to hook it and the pending order will turn into a market order.

DeletePendIfSignal = False // This parameter is designed to delete a pending order that has not yet become a market order (in case the robot is used in indicator mode) if the signal changes to the opposite one and we have pending orders in the old direction in the opposite direction to the current signal. If true, the robot will delete the pending order of the wrong old signal. Very useful if the indicator is redrawing

LOT EXPONENTS (GRID MULTIPLIER)

TypeFirtsLotExponent = 1 // [0 or 1] The type parameter defines the lot size formula for the next grid order up to the grid level = NumberOfLevel2ndLE (a separate formula is used below).
0 — next lot of the grid order = previous * FirstLotExponent.
1 — next lot of the grid order = previous + starting lot of the series (0.01): #1=0.01 #2=0.02 #3=0.03 #4=0.04 #5=0.05… each next = previous + 0.01.

FirstLotExponent = 1.0 // [1.0-3.0] multiplier for the next orders (levels) of the grid. Used only for TypeFirstLotExponent = 0. If FirstLotExponent = 1.5 and TypeFirstLotExponent = 0, the robot will open the Grid series as follows: 0.1 | 0.1 * 1.5 = 0.15 | 0.15 * 1.5 = 0.22 | 0.22 * 1.5 = 0.33 | … If NumberOfLevel2ndLE = 5 and FirstLotExponent = 1 the robot will open the first 5 grid orders as follows: 0.1 0.1 0.1 0.1 0.1. If FirstLotExponent = 2, the robot will open the following 5 orders with a lot size: 0.1 0.2 0.4 0.8 1.6. If FirstLotExponent = 1.4 the robot will open: 0.1 0.14 0.19 0.27 0.38. (each next grid lot = previous * FirstLotExponent to SecondLotExponent, which may have a different value and calculation method)

NumberOfLevel2ndLE = 6 // At what grid level does the EA stop using FirstLotExponent and start using SeconLotExponent

TypeSecondLotExponent = 0 // [0, 1 or 2]
0 — next lot of the grid order = previous * SecondLotExponent.
1 — next lot of the grid order = previous + (Sum of Grid Lots * SecondLotExponent). (Here we recommend SecondLotExponent=0.01-0.05 with TypeSecondLotExponent=1).
2 — next lot of the grid order = previous + MinimalBrokerLot.

SecondLotExponent = 1.5 // lot multiplier coefficient, which will be used in formulas for calculating the TypeSecondLotExponent parameter.

PARTIAL VIRTUAL STOP LOSS (VSL) OF GRID ORDERS

VirtualStopLossPips = 22 // if the order reaches minus 22 pips, the EA starts using VSL on this order.

VSLLevel = 3 // VirtualStopLossPips does not work before this grid level. VSL will start working for grid orders that will be open at this level and after it.

StepVirtualStopLossPips = 30 // If the order has already reached a loss VirtualStopLossPips = 22 and the robot closed the first part of the order equal to CoefVirtualStopLossPipsKys = 0.1, then the robot will use the new step StepVirtualStopLossPips = 30 points to destroy the part of the order CoefVirtualStopLossPipsKys = 0.1. The number of repetitions can reach MaxOperationsVSL = 8. On the last repetition, the robot will close everything completely.

CoefVirtualStopLossPipsKys = 0.1 // Part or share of the SVL order will be closed every time the StepVirtualStopLossPips step ( where 0.1 = 10%)
MaxOperationsVSL = 8 // How many times the robot closes 10% of the order and in the last part No. 8 we will close the entire balance completely

LOCK

OpenLock = false // if true, the EA will place a Lock order for the current grid series if the drawdown of LockDraw = 15% is exceeded on this pair and will no longer add new grid levels in this direction on this pair. The robot can add new grid levels for the Buy direction if the Sell series is locked and the robot does not open grid orders for the sell series on this pair. If both sell and buy series separately each reach LockDraw = 15 (total 30% on the pair), the robot will lock both sell and buy directions separately and will not add new grid levels – trading will stop on this pair.

LockPercentFromSummary = 0.8 // Grid locking percentage — calculation of the size of a Lock order depends on the total volume of the sell or buy grid that we are locking. For example, you have a Grid Sell series like 0.1 0.2 0.4 0.8 1.6 = 3.1 total lot. LockPercentFromSummary = 0.8 means that the robot must open 80% of 3.1 lots in buy to lock this series by 80%. Lock order calculation: 3.1 * 0.8 = 2.48 lots the robot will open in Buy and leave this grid series until the user returns to Metatrader and decides what to do with it and how to help him. It’s a kind of protection. The function is recommended only for traders who know how to open a lock with their hands for profit. Otherwise, it is better not to use this feature at all, because this is a temporary lock or block of funds and it takes knowledge and experience to open a negative lock. The good thing is that it will prevent you from blowing up your account if you use the no-indicator mode with no limits in MaxTrades.

LockDraw = 15 // At what percentage of drawdown on a particular pair should the robot start locking it using a Lock order? The robot can calculate the drawdown on each pair separately. For example, the total account drawdown is 40% and you are trading on 4 pairs – 10% EURUSD, 15% GBPUSD, 15% AUDUSD, 5% NZDJPY. The robot will lock GBPUSD and AUDUSD as they have exceeded LockDraw = 15

VIRTUAL TAKE PROFIT “LASTTP” + OVERLAP

LastTP = true // if true – the EA uses Virtual Take Profit for each grid order (the robot does not place physical Take Profit) to close it with a profit. Broker does not see (VTP) Take Profit of this Expert Advisor

TypeOverLap = 4 // [0 1 2 3 4] The type of overlap of some old orders due to the accumulation of a new balance, profit. In multicurrency trading, the robot automatically selects the most unprofitable pair and its series and starts biting it until it ceases to be the most unprofitable, after which the robot will take on the next unprofitable pair and so on.
0 – The EA does not use new profit to cover part of old orders to minimize drawdown (it eats up parts of old orders with Cross-Closing, using a new profit on the balance due to new orders.
1- The EA will bite off part of the old order of the series to minimize drawdown, starting from the oldest or farthest first (starting) order of the grid.
2- The EA will bite off a part of the penultimate order of the series.
3- The EA will bite off part of the penultimate order of the series.
4- EA will use the new profit to eat some of the biggest orders behind the BreakEven line of the biggest losing series and Grid direction. If the market stays in the Range Market (in the channel) for a long time and does LastTP many times, then a situation may come when all orders behind the BreakEven line become the same in lot, since the function will select the largest ones and balance them one by one to the same size. At the same time, from the current price to the BreakEven line, you will always have whole orders that will allow you to profit in case of an early rollback and profit to overlap on others or your own pair.

In the new version v3.2.5 of TypeOverlap, resetting the overlap type has been fixed: if the EA cannot use TypeOverlap=4, it will try to use TypeOverlap=3. If the EA fails to use TypeOverlap=3 (when there are no 3 orders in the series), it will try to use TypeOverlap=2 for 2 orders. If it is not possible to use TypeOverlap = 2 then the robot will use TypeOverlap = 1.

CoefLast = 1.0 // share (part) of the profit that the EA can use from the lastTP profit in the OverLap function. Where 1.0=100%, 0.3=30%. The robot will bite off pieces of lots of old orders and their loss using the new profit in proportion. For example, the robot closed a new Sell 0.12 Lot order using LastTP=15 pips with a profit of $+18. And the robot chose to bite off part of the lot size from the old Sell 0.06 Lot order with a current loss of $-30. Proportion calculation:
0.06 Lot = $-30
x lot = $+18
x= 0.06*18/30 = 0.04 Lot . The robot will bite off 0.04 Lot from the Sell 0.06 Lot order due to the new profit of $+18. After this overlap operation, there will be a balance of 0.02 Lot Sell with a reduced current loss of 30-18 = $ 12, which in turn reduces the drawdown.

LastTPPips = 10 // Virtual Take Profit (VTP) of grid orders. The broker does not see this TP – keep it in memory and the robot checks it every tick. How many points of profit must the last order go in order for the LastTP function to close it. The EA can re-open this order multiple times and re-close them using VTP. This function produces the greatest profit (profit) when the currency pair enters a channel or consolidation and goes up and down many times, which receives the greatest profit and, accordingly, we use this profit more in overlaps to reduce the drawdown on the trading account.

LevelStartLastTP = 1 // [1..10] at which grid level the LastTP (or VTP) function starts. (cannot be equal to = 0, otherwise the robot will show an error. The first minimum grid level for starting VTP is LevelStartLastTP=1. If you use LevelStartLastTP = 4 or 5, then the robot can open several grid orders and keep them in positive territory for a long time (with VTS disabled) doing positive Lock for the opposite series in no-indicator mode For example, the price went down and opened 5 orders of the buy series, after which the price returned up and started to open the Sell series — at this time, all Buy orders of the series will serve as a positive Lock, which will secure your trading a little.

LastTPFixedPips = False // if True – the EA will always use the constant LastTPPips for VirtualTakeProfit, which does not depend on Autopipstep. If False – EA uses LastTPPips = current AutoPipstep, but LastTPPips and AutoPipstep cannot be less than PipStep (protection against low AutoPipstep and low LastTPPips)

ExMinLotKys = 0.01 // the minimum part of the lot that the robot can bite off in the overlapping function (by default, most brokers have 0.01 Lot by default, but you can do this with 0.03 or 0.1 Lot, then the adviser will perform fewer operations in the overlapping function)

VIRTUAL TRAILING STOP (VTS)

TrailGo = False // If True, the robot will use the virtual TrailingStop (VTS). It makes sense to use True only if you use LevelStartLastTP>5 and you sometimes need to close the first five orders by TrailingStop. VTS can also be used on the news by trading one market order or pending orders with MaxTrades=1 (Scalping Mode). When the order goes into profit, the robot does not place a physical StopLoss, but uses MovingAverage (period 20) for a hidden VirtualTrailingStop. As soon as the price returns to MovingAverage, the robot will set a physical StopLoss according to the parameters of the VTS function.

Tak = 30 // Profit in points to start using VTS in grid orders.

StepTak = 2 // step to move VTS for profit to follow current price with TrailDistance.

TrailDistance = 10 // minimum Trailing Stop (indent) from the current price, where the robot will set StopLoss to profit for the order. (Find out the minimum stop level of your broker for the correct setting of TrailDistance). In this case, the order must already be in profit equal to Tak=30 pips

CLOSE PROFIT PARAMETERS & EQUITY TARGETS

CloseTP=False // Close separately the series by Take Profit in points from the breakeven line (BREAK EVEN) for the Grid series of one direction.
ColCloseTP=1 // after how many grid levels the Take Profit function will start working in points from the BREAK EVEN line
TakeProfit=10 // how many points of profit from the BREAK EVEN line should the price pass to close the series.

EQUITY CLOSE in % of all Depo0 (Global Variable of MT4)

CloseEquity=True // Close all orders on the account when Equity % is reached (when DynamicTargetEquity is disabled).
MaxEquityProfit=5 // how much % of the deposit (the robot remembered Depo0 in GlobalVariables) the robot must earn with new series in order to close all orders on the account.
MaxBalanceToOverlapEquity=4 // By how much the current balance must exceed with % Depo0 to start the EquityOverlap overlap function (in this case, the Equity<Depo0 condition must be observed)
NumberGoalsDay=10 // number of MaxEquityProfit goals for the day, if more than 0, then the robot counts and takes them into account. When the maximum value of repetitions per day is reached, the robot will close everything and stop. If MaxEquityProfit=5 and NumberGoalsDay=10 then the robot can close 5*10 = 50% per day as much as possible and stop.
Depo0_Overlap=True // if True, the robot starts overlapping orders when Equity is below Depo0
DynamicTargetEquity=True // if True, then the target will be automatically set to MaxEquityProfit(%) above the current Equity, provided that the Equity is constantly growing. At the same time, the robot will never close all series, but only rearrange the dynamically floating target higher and higher.

MethodClosePos=0 // [0 or 1] method for closing positions.
0 – first all profitable then the rest.
1- first the most unprofitable order, then the most profitable order, and so on through the cycle.
CloseBY=False // If True – when closing all series, the robot will set an additional 100% Lock to all series and will partially cover the profit and part of the Lock order. This parameter is designed to close a very large number of multi-currency series orders from 150-200 pieces. With this type of series closing, with sharp price fluctuations, after placing a Lock order, your funds are fixed and no matter where the price jumps, you will close a stable profit.

UseNewBar=False // Filter for one pair – no more than one Grid order in one direction per bar, on the TimeFrame where the robot is installed (initialized).
Pause=0 // Pause in seconds between opening grid levels on one pair in one direction. Some brokers prohibit opening two sell orders on the same currency pair if the time between them is less than 5 minutes (instaforex)
Slippage=5 // Price slippage in points — execution of an order at a price that differs for the worse from the price at which the order was placed on the market. This means that there was a strong jump in the quote. Slippage can occur during the release of important Forex news that has a strong impact on the market. The amount of slippage usually ranges from one to several tens of points. If the robot sees that the slippage has not exceeded this value, it will place an order at the current price.

MAGIC NUMBERS

ExMagicBuy = 1000 // Magic number of the start order of the Buy series. The following levels of the Buy grid: 1001 1002 1003…. +1
ExMagicSell = 4000 // Magic number of the starting order of the Sell series. The following levels of the Sell grid: 1001 1002 1003…. +1

INDICATOR SIGNALS ON/OFF

FirstGridOrderSignal=True // Open the starting order of the Grid series only on the signal of activated indicators. If more than one indicator is activated, then all the included indicators should signal in one direction.
AllOtherGridOrdersSignal=True // Open a new grid level only on the signal of activated indicators (all other levels are above the start order of the series). If more than one indicator is activated, then all the included indicators should signal in one direction.
OnlyOneTypeOrders=False // If True, open grid orders using indicators in only one direction. There can’t be both Sell and Buy series on the same pair at the same time. When changing the signal, close the orders of the previous indicator direction in minus to turn into a new signal.
OnlySignalTrading=False // If True, open and hold orders only if there is a constant signal, in the absence of a constant signal, force close the series and wait for a new signal. This parameter will sometimes give no signal if we use more than one indicator.
ReversOrders=0 // The number of order reversals when the signal changes on the current bar. Sometimes the indicators are redrawn within one bar and the signals in the robot change. This parameter limits the number of flips for the TimeFrame where the robot is installed (initialized).

(indicator strategies of EA MPGO posted at separate pages in Video-Course)

Telegram News Channel: https://t.me/profitFXPIPs
Our prices for forex robots: https://ru.fxpip.one/mql-soft/