For many who do not wish to learn an excessive amount of, there’s “AB Common Grid. Temporary Description of Enter Parameters.”
MT5 model : https://www.mql5.com/en/market/product/145321
MT4 model : https://www.mql5.com/en/market/product/147482
Abbreviations
UG – AB Common Grid
TS – Trailing Cease
CTS – Compensatory Trailing Cease
BE – Breakeven
AB – Accumulative buffer
“Knowledgeable settings” settings block

Watch magic quantity (drop-down listing):
1) Solely My
2) All
3) My and Add magic quantity4) My and Guide
The drop-down listing determines which magic numbers the advisor sees .
The advisor’s magic quantity is the quantity by which the advisor distinguishes its positions and orders from these set by one other advisor or from these set manually.
1) Solely My – UG sees solely its personal magic quantity on the image with the Magic Quantity (My) setting. It’s not eager about different positions and orders and won’t work with them. That is used when the EA opens orders based mostly by itself methods. See the Buying and selling technique settings block.
2) All – UG sees all orders and positions on the image it is positioned on. This selection is often used to resolve tough account conditions. If it is advisable to routinely get well from a drawdown, take away different EAs from all charts for this image and set it to All . You’ll be able to confirm that the EA has seen all orders within the Data panel. It is going to show the PL (revenue/loss) for the desired durations and the variety of positions out there.
3) My and Add magic quantity – UG will see its personal magic quantity (My) and a further one, which must be entered within the Add magic quantity parameter. How do you utilize this? As an instance you open the primary place with one other advisor, and UG desires to handle this place. However you have to ensure that your advisor doesn’t handle this place itself, however solely opens it.
4) My and Guide – UG sees orders and positions with their very own magic numbers and people opened manually, even from a cell terminal. You solely must open a place, and the advisor will choose it up and take revenue or stop-loss.
___ Magic quantity (My) – The advisor will use this magic quantity to differentiate its positions and orders from these of others.
___Add magic quantity – That is a further magic quantity. Enter the magic variety of one other advisor right here when you plan to get well it from a drawdown utilizing UG . The opposite advisor will should be deleted, in any other case a battle will come up between UG and the opposite advisor.
Most unfold for opening market orders, pips (0=off) – This setting prohibits opening market positions if the image unfold is the same as or better than the desired worth. This setting doesn’t have an effect on the location of pending orders. When the data panel is enabled, exceeding this worth is displayed as a pink line.

Data Panel – Allows or disables the show of the Data Panel on the chart. When the panel is enabled (On) , it may be minimized by clicking the “>>” button within the higher proper nook of the panel. When the panel is disabled (Off) , it’s fully hidden from the chart.
![]()
“Buying and selling technique settings” settings block

This settings block comprises the Knowledgeable Advisor’s built-in methods. Presently, there’s just one: “1) At all times on the Market.” This settings block is answerable for opening solely the primary place in any course and setting its take revenue and cease loss.
Buying and selling technique (drop-down listing):
Off
1) At all times available on the market
2) Gold mine
0) Off – All methods are disabled. When chosen, the UG Knowledgeable Advisor fully ignores the “Buying and selling technique settings” block.
1) At all times available on the market – A method for testing the EA. The sign to open a Purchase place is the absence of a Purchase place. The identical applies to Promote positions. Merely opening a place with none evaluation is used to check and research the assorted algorithms constructed into the UG EA. Even with this opening, the EA exhibits revenue and good survivability.
2) Gold mine – Sign based mostly on the proprietary indicator for buying and selling gold.
Technique Time Body – The time-frame on which we seek for a sign for the chosen technique
Opening of the primary (drop-down listing):
Purchase and Promote
solely BUYsolely SELL
BUY and SELL – the advisor opens positions in each instructions based mostly on the sign from the chosen technique
BUY solely – the advisor opens solely Purchase positions when a Purchase sign is acquired. Promote alerts are ignored.
SELL solely – the advisor opens solely Promote positions when a Promote sign is acquired. Purchase alerts are ignored.
Methods to use it:
1) To discover numerous algorithms, choose the “ 1) At all times on the Market” technique and disable one of many instructions so it does not intrude. Then, observe how the compensating trailing works or how Purchase Cease and Promote Cease orders observe the value when deciding on the “Cease” mode within the “Order Sort for opening the grid” parameter.
2) If there is a non-reversal pattern, disable the other way and do not commerce in opposition to the pattern. If there are any counter-trend positions remaining out there, the UG advisor will, if doable, handle them accurately.
Lot Mode (drop-down listing):
Fastened
A part of the free margin
This parameter is answerable for lot calculation solely when opening the primary place in response to the technique. The lot calculation for the second and subsequent positions in the identical course is managed by the “ Grid LOT Mode” parameter within the “Grid Setting” settings block.
Fastened – the primary place for the chosen technique will all the time be opened with the lot specified within the “___ First Lot” parameter.
A part of the free margin – the primary place for the chosen technique would be the calculated lot. For each “___ A part of the free margin” specified within the parameter , “___ First Lot” shall be opened.
Instance of lot calculation in “ A part of the free margin” mode.
“___ First Lot” = 0.1
“___ A part of the free margin” = 1500
Now we have 5430 free funds on the time of opening
5430/1500 = 3.62 (3 entire elements of 1500, the rest is discarded)
Lot = 3*0.1 = 0.3
The subsequent deal shall be opened with lots of 0.3
I normally use the “A part of the free margin” lot calculation mode solely throughout testing, because it’s not tough for me to vary the fastened lot measurement if crucial.
Cease Loss, pips (0=off) – the cease loss measurement for the primary place in pips. As soon as set, the EA does not monitor the cease loss for one place till a second place is opened in the identical course. To disable cease loss, set the worth to zero.
Take Revenue, pips (0=off) – the take revenue measurement for the primary place in pips. As soon as set, the EA does not management the take revenue for one place till a second place is opened in the identical course. To disable take revenue, set the worth to zero.
“Threat Administration” settings block

This settings block means that you can set sure limits to stop important account drawdowns. Threat administration is a vital ingredient of knowledgeable dealer.
Max Lot EA (0=off) – Limits the utmost lot measurement in a single commerce. If the calculated lot measurement is bigger than this worth, the place shall be opened with the Max Lot EA quantity. Please notice that this setting doesn’t prohibit opening a number of positions with the Max Lot EA quantity.
Shut all at Drawdown (drop-down listing):
Off
within the deposit foreign moneywithin the share of the steadiness
If the drawdown reaches a specified worth, UG closes all positions it sees (see the “Watch magic quantity” parameter)
Off – drawdown management is disabled.
Within the deposit foreign money – drawdown management shall be based mostly on the quantity within the deposit foreign money, which should be entered under within the “___ Drawdown Worth” parameter. For instance, on this mode, you’ll set the “___ Drawdown Worth” parameter to 100. When the drawdown within the deposit foreign money reaches a price better than or equal to 100, all positions shall be closed and orders shall be deleted.
Within the share of the steadiness – drawdown management shall be carried out as a share of the steadiness. This share worth must be entered under within the “Drawdown Worth” parameter. For instance, on this mode, you’ll set the “Drawdown Worth” parameter to eight. The deposit steadiness is 1000. When the drawdown reaches 80 (1000 x 8/100), all orders shall be closed.
___ Drawdown Worth – The worth for the chosen mode.
___ Cease Buying and selling after Drawdown – determines the EA’s habits in any case positions are closed attributable to a drawdown . If set to “Off,” UG will proceed to function in response to its algorithm. If set to “On,” UG will cease in any case positions are closed. To renew operation, you have to restart the terminal. Sure, that is the way it works for now. Later, when the person interface is developed, a begin button shall be added.
Shut all at Revenue (drop-down listing):
Off
within the deposit foreign moneywithin the share of the steadiness
If the revenue reaches the desired UG worth closes all positions it sees (see parameter “Watch magic quantity “
Off – revenue management is disabled.
within the deposit foreign money – revenue management shall be carried out based mostly on the quantity within the deposit foreign money, which should be entered under within the parameter “___ Revenue Worth” . For instance, on this mode you’re within the parameter “___ Revenue Worth” guess 100. When the revenue is within the deposit foreign money reaches a price better than or equal to 100, all positions shall be closed and orders shall be deleted.
within the share of the steadiness – revenue management shall be carried out as a share of the steadiness, the proportion worth should be entered under within the parameter “ ___Profit Worth” . For instance, on this mode, you’re within the parameter “ ___Profit Worth” set 8. Deposit steadiness = 1000. When the drawdown reaches better than or equal to 80 (1000*8/100), all orders shall be closed.
___ Revenue Worth – Worth for the chosen mode.
___ Cease Buying and selling after Revenue – determines the advisor’s habits in any case positions are closed by drawdown. Should you set the worth “Off” UG will proceed its work in response to the algorithm. Should you set the worth “On” , then after closing all positions UG will cease working. To renew working, it is advisable to restart the terminal.
“Market Place Administration” settings block

This settings block comprises performance for managing open positions. This contains shifting to breakeven and a trailing cease.
===== Trailing cease (TS) (drop-down listing):
0) OFF
1) Easy2) Compensatory
0) OFF – trailing cease is disabled and all TS settings haven’t any impact on the advisor.
1) Easy – A easy trailing order based mostly on the breakeven degree of all positions in the identical course. There’s a breakeven degree for every course of open positions. This degree may be seen by setting “Drawing Breakeven Ranges” to On within the “Visualization” settings group. It’s blue for the Purchase course and pink for the Promote course. The calculation is predicated on this degree, in response to the parameters specified under.
2) Compensatory – A compensatory trailing commerce is a robust software for unloading your deposit throughout aggressive buying and selling. Its main objective is to shut most market volumes at the very least to breakeven. A secondary goal is to path the revenue if the market strikes.
A compensating trailing cease (CTS) works when there are two or extra positions in the identical course. It trails the cease losses of all worthwhile positions and a number of dropping positions, relying on the chance. Subsequently, with a CTS, not all positions have a cease loss. Additionally, when including new dropping positions, the cease loss itself may be moved to a much less worthwhile place, however this provides one other dropping place to the CTS .
___ Distance TS(CTS), pips – Distance from the value at which the cease loss shall be trailed
___ Begin TS , pips – The TS begin distance. If you wish to begin trailing not from the BU level, however when the value strikes somewhat additional, set this worth to > 0. Then the primary stop-losses shall be set when the value strikes the space Distance + Begin . This setting doesn’t have an effect on the CTS , because it has different functions.
___ Step TS(CTS) , pips – the TS (CTS) step in pips. To keep away from sending cease loss modifications to the server too ceaselessly, you may set the TS (CTS) step.
===== Breakeven (BE) – Allows and disables the general breakeven degree for a number of orders in the identical course. Please notice that the breakeven degree is calculated taking swaps and commissions into consideration (if commissions may be calculated). Subsequently, the breakeven degree could change when swaps are calculated. The EA notices this and adjusts accordingly.
___ Distance for switch to BE, pips – As quickly as the value from the breakeven degree passes this distance + Add pips to BE , a cease loss shall be set at breakeven.
___ Add pips to BE – the variety of pips that may be added to the BE degree.
Grid settings block

This block means that you can configure the opening of the following place or grid order, in addition to some parameters for managing the place grid.
On/Off the “Grid Settings” settings block – Allows/Disables the settings block. If set to Off , this block may be ignored; the Knowledgeable Advisor ignores it. Should you needn’t routinely open the following place or order, or needn’t set total take income and cease losses for positions, disable this block.
Grid New Orders/Positions – This setting means that you can disable the opening of new positions and orders for the grid. Nonetheless, present open and positioned positions shall be managed by the advisor based mostly on the parameters on this settings block.
Grid Ban by Max quantity Positions (0=off) – the utmost variety of positions in a single course. This setting limits the variety of positions in a single course. As soon as the utmost quantity is reached, the EA will not open new positions or orders in that course. A pink textual content message will seem within the corresponding line within the Data panel, and the visualization line for the following order or place opening shall be grey. I am going to make these strains extra informative later. When set to 0, this setting is disabled.
Grid Ban by Max Quantity Positions (0=off) – the utmost quantity of positions in a single course. This setting limits the whole quantity of positions in a single course. It must be famous that if the market quantity has not but been exceeded, this setting permits opening the following place with any quantity, even when this parameter is exceeded a number of occasions. This must be taken into consideration when utilizing this setting. When set to 0, this setting is disabled.
===== Grid STEP mode (drop-down listing):
1) Fastened
2) First step +/- (Add pips*Variety of open orders)
3) First step * (Ratio step*Variety of open orders)4) ATR * Ratio step
Right here it is advisable to choose the specified mode for calculating the step (distance) of the following place or order.
1) Fastened – Fastened step. The subsequent step is fixed, and every subsequent order or place will are inclined to open on the identical distance from one another. The gap itself, in factors, must be entered within the “First step, pips” parameter.
2) First step +/- (Add pips*Variety of open orders) – For every new place, the grid step will increase or decreases, relying on the signal within the parameter “Add pips for (2)” by this variety of factors. The calculation is tied to the variety of positions and follows the system:
STEP = First step + (Add pips*Variety of open orders)
or
STEP = First step – (Add pips*Variety of open orders)
3) First step * (Ratio step * Variety of open orders) – The subsequent step is calculated utilizing the system:
STEP = First step * (Ratio step *Variety of open orders)
The place
First step – First step,
Ratio step – Coefficient,
Variety of open orders – the variety of open positions out there in a given course that the advisor sees (see the “Watch magic quantity” parameter).
4) ATR * Ratio step – The step calculation is predicated on present volatility. The ATR worth is taken and multiplied by the Ratio step coefficient. The calculation makes use of the ATR parameters of the present candle. See the ATR parameters within the “Indicators” settings block.
___ First step, pips – The worth in pips for step one.
___Add pips for (2) – Further pips for mode 2) First step +/- (Add pips * Variety of open orders) . If the worth is constructive, the step will improve. If the worth is unfavourable, the step will lower.
___ Ratio step for (3) and (4) – coefficient for modes 3) First step * (Ratio step * Variety of open orders) and 4) ATR * Ratio step .
___ Min Step, pips (0=off) – the minimal grid step in pips, in case the calculation ends in a smaller grid step. A price of 0 disables this parameter.
___ Max Step, pips (0=off) – the utmost grid step in pips, in case the calculation ends in a grid step worth better than this worth. A price of 0 disables this parameter.
===== Grid LOT Mode (drop-down listing):
1) Fastened (First Lot)
2) Final lot +/- Add Lot
3) Final Lot * Ratio lot4) Whole quantity of positions * Ratio lot
The calculation mode for the quantity of the following place or order. For all modes, the calculated lot is rounded to the dealer’s permitted parameters, and the “Max Lot EA (0=off)” parameter from the “Threat Administration” settings block can also be taken into consideration.
1) Fastened (First Lot) – All subsequent positions or orders are opened with the identical quantity. The worth is taken from the “First Lot” parameter within the “Buying and selling technique settings” block, even when this block is disabled by setting “Buying and selling technique” to Off.
2) Final lot +/- Add Lot – The subsequent lot is calculated utilizing an arithmetic development. The worth from the “Add Lot for (2)” parameter is added to or subtracted from the lot of the final open place. Instance: The final open place was 0.65, the “Add Lot for (2)” worth = -0.01. Calculate the following lot as 0.65 – 0.01 = 0.64.
3) Final Lot * Ratio Lot – The subsequent lot is calculated utilizing a geometrical development. The lot of the final open place out there is multiplied by the Ratio Lot . If Ratio Lot > 1, the result’s the well-loved (or least-loved) martingale. Instance: The final open place was 0.05, the “Ratio Lot for (3) and (4)” worth is 2. Calculate the following lot: 0.05 * 2 = 0.10.
4) Whole quantity of positions * Ratio lot – The subsequent lot is calculated utilizing the system: the whole quantity of the course is multiplied by the coefficient “Ratio lot for (3) and (4)” , however not lower than the “First Lot” settings block “Buying and selling technique settings.” I have never encountered this calculation technique wherever, though I primarily use it in my buying and selling as a result of I discover it extra versatile. Calculating the lot based mostly on the final open place works properly when all of the heaps within the accrued positions are ordered from smallest to largest. Nonetheless, if the market comprises many positions with various volumes, the following lot could open with a disproportionately small lot. This disadvantage precludes calculating the following lot (4).
Instance: Ratio lot = 0.62, lot of the primary place is 0.01, lot of the second place is 0.01, lot of the third place is 0.02. We calculate the following lot (0.01 + 0.01 + 0.02) * 0.62 = 0.0248, rounding up, the following lot = 0.03. By the way in which, the Ratio lot = 0.62 on this mode is my favourite, because it roughly follows the Fibonacci sequence when calculating the lot.
___ Add Lot for (2) – Further lot for lot calculation mode 2) Final lot +/- Add Lot
___ Ratio lot for (3) or (4) – Coefficient for lot calculation modes 3) Final Lot * Ratio lot or 4) Whole quantity of positions * Ratio lot .
===== Order TYPE for opening the grid (drop-down listing):
Market
RestrictCease
This setting determines which order sort will open the following place. Should you allow the “Drawing the Subsequent Stage Opening” parameter within the “Visualization” settings group, the opening degree of the following place or order shall be drawn for all order sorts. This lets you management the place they are going to be opened.
Market – The place shall be opened by a market order when the value reaches the desired goal distance calculated within the “ Grid STEP” parameter from the final place out there.
Restrict – The place shall be opened with a Purchase Restrict or Promote Restrict order. That is set instantly if there isn’t any Purchase Restrict set. or Promote Restrict. The benefit over Market Opening is that after positioned by the algorithm, the advisor does not management the place of the Restrict order. You’ll be able to manually drag it to a extra applicable location at your discretion.
Cease – The place shall be opened with a Purchase Cease or Promote Cease order. It is a extra superior grid development and requires additional dialogue.
There are two settings related to this mode, positioned under:
___ Set distance for “Cease”, pips – Distance to position an order
___ Set trailing distance for “Cease”, pips – Order trailing distance
Let us take a look at how this mode works utilizing the instance of a Purchase Cease order and a placement distance of 130 pips from the final open place. As we all know, the Purchase Cease order should be above the value. Subsequently, the EA waits for the value to fall by 130 pips + Set distance after which locations a Purchase Cease order above the value . If the value reverses upward, the order is activated. If the value decides to not reverse however continues to fall, the opened Purchase Cease order will path the value by the Set trailing distance , thereby enhancing the market entry level. That is particularly helpful throughout asset value actions with out reversals. Click on on the picture to see the way it works.
Grid STOP LOSS Mode (drop-down listing):
0) Off
1) Pips from the furthest place
Vital! The Knowledgeable Advisor screens the presence or absence of stop-loss ranges and restores them if modified manually or by one other Knowledgeable Advisor. A “No Monitoring” mode is deliberate for improvement.
0) Off – Cease loss setting for the grid is disabled. If any cease losses are set, they are eliminated .
1) Pips from the furthest place – Cease loss is ready for all positions on the degree: for Purchase, under the worth specified within the “Cease Loss, pips” parameter in pips from the bottom place; for Promote, above the desired worth in pips from the very best place.
___ Cease Loss, pips – Cease Loss worth in pips for the chosen mode.
Grid TAKE PROFIT Mode (drop-down listing):
0) Off
1) Pips from the closest place2) Pips from Breakeven
Vital! The Knowledgeable Advisor screens the presence or absence of Take Revenue ranges and restores them if modified manually or by one other Knowledgeable Advisor. A “No Monitoring” mode is deliberate for improvement.
0) Off – Take-profit is disabled. If any take-profits are set, they are deleted .
1) Pips from the closest place – Units Take Revenue for all positions on the following degree: for Purchase, set it larger by the desired worth in pips from the very best place; for Promote, set it decrease by the desired worth within the “Take Revenue, pips” parameter in pips from the bottom place.
3) Pips from Breakeven – Set to the desired variety of factors within the “Take Revenue, pips” parameter from the breakeven degree of all orders in the identical course. The breakeven degree is calculated bearing in mind commissions and accrued swaps, so it’s adjusted when new swaps are accrued.
Shut Grid the revenue, account foreign money (0=off) – Closes all positions in a course when a revenue within the deposit foreign money is reached. If set to 50, all positions in that course shall be closed when the whole revenue for that course reaches a price better than 50. The journal entry will learn “===Shut by the Shut Grid the revenue parameter===.”
Settings block “Accumulative Buffer (AB)”

The Accumulation Buffer (AB) is a operate for lowering drawdowns. It makes use of already recorded income to shut positions furthest from the market. This is the way it works! The advisor calculates the revenue earned over a specific interval (variety of days). If any revenue is made throughout this era (it is doable there will not be any), it makes use of a portion of it to shut the furthest unprofitable place out there, or a part of it.
===== Accumulative Buffer – On/Off Accumulative Buffer
Selecting a course to shut unprofitable positions (drop-down listing):
Purchase
PromoteAuto
Choosing a course whose dropping positions shall be closed
Purchase – unprofitable positions within the Purchase course shall be closed on the expense of AB
Promote – unprofitable positions within the Promote course shall be closed on the expense of AB
Auto – AB will shut unprofitable positions within the course with the upper total market quantity. In different phrases, if the general market quantity is larger within the Purchase course, Purchase positions shall be closed.
Threshold to activate AB – the AB activation threshold. Specified within the complete variety of heaps for the chosen course.
Instance: We set this parameter to 0.05. We opened a purchase place with a quantity of 0.01 heaps. When the value declined, we opened two extra positions at 0.01 every, for a complete of 0.03. For us, these are acceptable dangers, and we needn’t shut something. When the whole purchase quantity reaches 0.05 or extra, AB is activated and can verify whether or not the accrued revenue over the chosen interval is enough to shut the purchase place furthest from the present value. Whether it is, the place shall be closed instantly. It is doable that the accrued revenue will not be enough instantly. Nonetheless, throughout a pullback, the loss on the furthest place will lower, and when the accrued revenue is enough, will probably be closed, even when the quantity in AB itself hasn’t modified.
Use AB revenue for the variety of days – For what number of days ought to AB revenue be calculated?
P.c use AB – The proportion of accrued revenue that shall be used to shut dropping positions. If you wish to hold some for your self.
Lot calculation mode for closing a dropping place (drop-down listing):
P.c of the whole quantity of the course
Fastened lot
This setting means that you can choose the lot calculation mode for closing a dropping place.
P.c of the whole quantity of the course – The proportion of the whole quantity of the dropping course. For instance, the purchase course grid is dropping cash, its complete quantity is 0.5 heaps. If the ___ Worth for Lot Calculation Mode parameter is ready to 10, then we’ll shut 0.5 * 10/100 = 0.05 heaps, or your entire place if its lot measurement is smaller.
Fastened lot – Will shut the lot specified within the ___ Worth parameter for Lot calculation mode or your entire place if its lot is much less.
___ Worth for Lot calculation mode – Worth for Lot calculation mode for closing a dropping place .
“Visualization” settings block

Drawing the Subsequent Stage Opening – If you wish to see the opening degree of the following order or place, set this to On. For Purchase positions and orders, the opening degree is blue. For Promote orders, it’s pink. If opening is prohibited for any cause, these ranges shall be drawn in grey. Hovering over the extent will show a tooltip. It shows the opening course, the following lot, and the rationale for the prohibition (if any). If you choose the Order TYPE for opening the grid = Cease , two strains shall be drawn. One is the order placement degree (strong line), and the second line is the value degree at which this order shall be positioned (dashed line).
Drawing Breakeven Ranges – Draw breakeven ranges. Enabling this setting will permit you to see the breakeven ranges calculated by the Knowledgeable Advisor.
The blue degree is for the Purchase course, the pink degree is for the Promote course, and the pink degree is widespread for each instructions (if it may be calculated). Ranges won’t be drawn if there is just one place in every course.
“Indicators” settings block

— ATR —
Settings of the ATR indicator, by which the grid step is calculated when deciding on the “Grid STEP mode” parameter = 4) ATR * Ratio step .
ATR Timeframe – the timeframe from which the ATR worth is taken
ATR Peroid – interval of the ATR indicator.
MT5 model : https://www.mql5.com/en/market/product/145321
MT4 model : https://www.mql5.com/en/market/product/147482
