For individuals 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 record):
1) Solely My
2) All
3) My and Add magic quantity4) My and Guide
The drop-down record 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 primarily based 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 feature is often used to resolve tough account conditions. If it’s good to robotically recuperate 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 Information panel. It is going to show the PL (revenue/loss) for the required durations and the variety of positions out there.
3) My and Add magic quantity – UG will see its personal magic quantity (My) and an extra one, which must be entered within the Add magic quantity parameter. How do you utilize this? To illustrate you open the primary place with one other advisor, and UG needs to handle this place. However you should make certain 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 have to open a place, and the advisor will decide 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 an extra magic quantity. Enter the magic variety of one other advisor right here in the event you plan to recuperate it from a drawdown utilizing UG . The opposite advisor will have to 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 required worth. This setting doesn’t have an effect on the position of pending orders. When the information panel is enabled, exceeding this worth is displayed as a pink line.

Information Panel – Allows or disables the show of the Information 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 utterly hidden from the chart.

“Buying and selling technique settings” settings block

This settings block accommodates the Knowledgeable Advisor’s built-in methods. At the moment, there’s just one: “1) At all times on the Market.” This settings block is liable for opening solely the primary place in any path and setting its take revenue and cease loss.
Buying and selling technique (drop-down record):
Off
1) At all times in the marketplace
2) Gold mine
0) Off – All methods are disabled. When chosen, the UG Knowledgeable Advisor utterly ignores the “Buying and selling technique settings” block.
1) At all times in the marketplace – A technique 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 examine the varied algorithms constructed into the UG EA. Even with this opening, the EA exhibits revenue and good survivability.
2) Gold mine – Sign primarily based 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 record):
Purchase and Promote
solely BUYsolely SELL
BUY and SELL – the advisor opens positions in each instructions primarily based on the sign from the chosen technique
BUY solely – the advisor opens solely Purchase positions when a Purchase sign is acquired. Promote indicators are ignored.
SELL solely – the advisor opens solely Promote positions when a Promote sign is acquired. Purchase indicators are ignored.
The best way to use it:
1) To discover varied algorithms, choose the “ 1) At all times on the Market” technique and disable one of many instructions so it does not intervene. Then, observe how the compensating trailing works or how Purchase Cease and Promote Cease orders observe the worth when deciding on the “Cease” mode within the “Order Kind for opening the grid” parameter.
2) If there is a non-reversal pattern, disable the other way and do not commerce towards the pattern. If there are any counter-trend positions remaining out there, the UG advisor will, if potential, handle them accurately.
Lot Mode (drop-down record):
Fastened
A part of the free margin
This parameter is liable 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 path 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” can 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 components of 1500, the rest is discarded)
Lot = 3*0.1 = 0.3
The subsequent deal can be opened with quite a lot 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 mounted lot dimension if crucial.
Cease Loss, pips (0=off) – the cease loss dimension 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 path. To disable cease loss, set the worth to zero.
Take Revenue, pips (0=off) – the take revenue dimension 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 path. To disable take revenue, set the worth to zero.
“Threat Administration” settings block

This settings block permits you to set sure limits to stop vital account drawdowns. Threat administration is an important aspect of knowledgeable dealer.
Max Lot EA (0=off) – Limits the utmost lot dimension in a single commerce. If the calculated lot dimension is bigger than this worth, the place can be opened with the Max Lot EA quantity. Please be aware that this setting doesn’t prohibit opening a number of positions with the Max Lot EA quantity.
Shut all at Drawdown (drop-down record):
Off
within the deposit forexwithin the share of the stability
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 forex – drawdown management can be primarily based on the quantity within the deposit forex, which should be entered under within the “___ Drawdown Worth” parameter. For instance, on this mode, you’d set the “___ Drawdown Worth” parameter to 100. When the drawdown within the deposit forex reaches a worth better than or equal to 100, all positions can be closed and orders can be deleted.
Within the share of the stability – drawdown management can be carried out as a share of the stability. This share worth must be entered under within the “Drawdown Worth” parameter. For instance, on this mode, you’d set the “Drawdown Worth” parameter to eight. The deposit stability is 1000. When the drawdown reaches 80 (1000 x 8/100), all orders can be closed.
___ Drawdown Worth – The worth for the chosen mode.
___ Cease Buying and selling after Drawdown – determines the EA’s habits in spite of everything positions are closed as a result of a drawdown . If set to “Off,” UG will proceed to function in response to its algorithm. If set to “On,” UG will cease in spite of everything positions are closed. To renew operation, you should restart the terminal. Sure, that is the way it works for now. Later, when the person interface is developed, a begin button can be added.
Shut all at Revenue (drop-down record):
Off
within the deposit forexwithin the share of the stability
If the revenue reaches the required UG worth closes all positions it sees (see parameter “Watch magic quantity “
Off – revenue management is disabled.
within the deposit forex – revenue management can be carried out primarily based on the quantity within the deposit forex, which should be entered under within the parameter “___ Revenue Worth” . For instance, on this mode you might be within the parameter “___ Revenue Worth” wager 100. When the revenue is within the deposit forex reaches a worth better than or equal to 100, all positions can be closed and orders can be deleted.
within the share of the stability – revenue management can be carried out as a share of the stability, the share worth should be entered under within the parameter “ ___Profit Worth” . For instance, on this mode, you might be within the parameter “ ___Profit Worth” set 8. Deposit stability = 1000. When the drawdown reaches better than or equal to 80 (1000*8/100), all orders can be closed.
___ Revenue Worth – Worth for the chosen mode.
___ Cease Buying and selling after Revenue – determines the advisor’s habits in spite of everything positions are closed by drawdown. In the event you set the worth “Off” UG will proceed its work in response to the algorithm. In the event you set the worth “On” , then after closing all positions UG will cease working. To renew working, it’s good to restart the terminal.
“Market Place Administration” settings block

This settings block accommodates performance for managing open positions. This contains shifting to breakeven and a trailing cease.
===== Trailing cease (TS) (drop-down record):
0) OFF
1) Easy2) Compensatory
0) OFF – trailing cease is disabled and all TS settings don’t have any impact on the advisor.
1) Easy – A easy trailing order primarily based on the breakeven degree of all positions in the identical path. There’s a breakeven degree for every path of open positions. This degree could be considered by setting “Drawing Breakeven Ranges” to On within the “Visualization” settings group. It’s blue for the Purchase path and pink for the Promote path. The calculation relies 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 a minimum of 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 path. It trails the cease losses of all worthwhile positions and a number of shedding positions, relying on the chance. Due to this fact, with a CTS, not all positions have a cease loss. Additionally, when including new shedding positions, the cease loss itself could be moved to a much less worthwhile place, however this provides one other shedding place to the CTS .
___ Distance TS(CTS), pips – Distance from the worth at which the cease loss can be trailed
___ Begin TS , pips – The TS begin distance. If you wish to begin trailing not from the BU level, however when the worth strikes a little bit additional, set this worth to > 0. Then the primary stop-losses can be set when the worth strikes the gap 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 regularly, you’ll be able to set the TS (CTS) step.
===== Breakeven (BE) – Allows and disables the general breakeven degree for a number of orders in the identical path. Please be aware that the breakeven degree is calculated taking swaps and commissions into consideration (if commissions could be calculated). Due to this fact, the breakeven degree might change when swaps are calculated. The EA notices this and adjusts accordingly.
___ Distance for switch to BE, pips – As quickly as the worth from the breakeven degree passes this distance + Add pips to BE , a cease loss can 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 permits you to configure the opening of the subsequent 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 could be ignored; the Knowledgeable Advisor ignores it. In the event you need not robotically open the subsequent place or order, or need not set total take earnings and cease losses for positions, disable this block.
Grid New Orders/Positions – This setting permits you to disable the opening of new positions and orders for the grid. Nonetheless, current open and positioned positions can be managed by the advisor primarily based on the parameters on this settings block.
Grid Ban by Max quantity Positions (0=off) – the utmost variety of positions in a single path. This setting limits the variety of positions in a single path. As soon as the utmost quantity is reached, the EA will not open new positions or orders in that path. A pink textual content message will seem within the corresponding line within the Information panel, and the visualization line for the subsequent order or place opening can be grey. I will 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 path. This setting limits the whole quantity of positions in a single path. It must be famous that if the market quantity has not but been exceeded, this setting permits opening the subsequent place with any quantity, even when this parameter is exceeded a number of instances. This must be taken into consideration when utilizing this setting. When set to 0, this setting is disabled.
===== Grid STEP mode (drop-down record):
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’s good to choose the specified mode for calculating the step (distance) of the subsequent place or order.
1) Fastened – Fastened step. The subsequent step is fixed, and every subsequent order or place will are likely to open on the similar 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 method:
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 method:
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 path that the advisor sees (see the “Watch magic quantity” parameter).
4) ATR * Ratio step – The step calculation relies 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) – Extra pips for mode 2) First step +/- (Add pips * Variety of open orders) . If the worth is optimistic, the step will enhance. If the worth is unfavorable, 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 record):
1) Fastened (First Lot)
2) Final lot +/- Add Lot
3) Final Lot * Ratio lot4) Complete quantity of positions * Ratio lot
The calculation mode for the quantity of the subsequent 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 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 subsequent 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 subsequent lot: 0.05 * 2 = 0.10.
4) Complete quantity of positions * Ratio lot – The subsequent lot is calculated utilizing the method: the whole quantity of the path 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 anyplace, though I primarily use it in my buying and selling as a result of I discover it extra versatile. Calculating the lot primarily based on the final open place works nicely when all of the heaps within the amassed positions are ordered from smallest to largest. Nonetheless, if the market accommodates many positions with various volumes, the subsequent lot might open with a disproportionately small lot. This disadvantage precludes calculating the subsequent 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 subsequent lot (0.01 + 0.01 + 0.02) * 0.62 = 0.0248, rounding up, the subsequent lot = 0.03. By the best way, 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) – Extra 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) Complete quantity of positions * Ratio lot .
===== Order TYPE for opening the grid (drop-down record):
Market
RestrictCease
This setting determines which order sort will open the subsequent place. In the event you allow the “Drawing the Subsequent Stage Opening” parameter within the “Visualization” settings group, the opening degree of the subsequent place or order can be drawn for all order sorts. This lets you management the place they are going to be opened.
Market – The place can be opened by a market order when the worth reaches the required goal distance calculated within the “ Grid STEP” parameter from the final place out there.
Restrict – The place can be opened with a Purchase Restrict or Promote Restrict order. That is set instantly if there is no such thing as a Purchase Restrict set. or Promote Restrict. The benefit over Market Opening is that when 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 can be opened with a Purchase Cease or Promote Cease order. It is a extra superior grid building and requires additional dialogue.
There are two settings related to this mode, situated under:
___ Set distance for “Cease”, pips – Distance to put 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 worth. Due to this fact, the EA waits for the worth to fall by 130 pips + Set distance after which locations a Purchase Cease order above the worth . If the worth reverses upward, the order is activated. If the worth decides to not reverse however continues to fall, the opened Purchase Cease order will path the worth by the Set trailing distance , thereby bettering the market entry level. That is particularly helpful throughout asset worth actions with out reversals. Click on on the picture to see the way it works.
Grid STOP LOSS Mode (drop-down record):
0) Off
1) Pips from the furthest place
Essential! The Knowledgeable Advisor displays 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 growth.
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 about 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 required worth in pips from the best place.
___ Cease Loss, pips – Cease Loss worth in pips for the chosen mode.
Grid TAKE PROFIT Mode (drop-down record):
0) Off
1) Pips from the closest place2) Pips from Breakeven
Essential! The Knowledgeable Advisor displays 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 growth.
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 increased by the required worth in pips from the best place; for Promote, set it decrease by the required worth within the “Take Revenue, pips” parameter in pips from the bottom place.
3) Pips from Breakeven – Set to the required variety of factors within the “Take Revenue, pips” parameter from the breakeven degree of all orders in the identical path. The breakeven degree is calculated making an allowance for commissions and amassed swaps, so it’s adjusted when new swaps are accrued.
Shut Grid the revenue, account forex (0=off) – Closes all positions in a path when a revenue within the deposit forex is reached. If set to 50, all positions in that path can be closed when the whole revenue for that path reaches a worth 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 perform for decreasing drawdowns. It makes use of already recorded earnings to shut positions furthest from the market. Here is the way it works! The advisor calculates the revenue earned over a particular interval (variety of days). If any revenue is made throughout this era (it is potential 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 path to shut unprofitable positions (drop-down record):
Purchase
PromoteAuto
Deciding on a path whose shedding positions can be closed
Purchase – unprofitable positions within the Purchase path can be closed on the expense of AB
Promote – unprofitable positions within the Promote path can be closed on the expense of AB
Auto – AB will shut unprofitable positions within the path with the upper total market quantity. In different phrases, if the general market quantity is increased within the Purchase path, Purchase positions can be closed.
Threshold to activate AB – the AB activation threshold. Specified within the whole variety of heaps for the chosen path.
Instance: We set this parameter to 0.05. We opened a purchase place with a quantity of 0.01 heaps. When the worth declined, we opened two extra positions at 0.01 every, for a complete of 0.03. For us, these are acceptable dangers, and we need not shut something. When the whole purchase quantity reaches 0.05 or extra, AB is activated and can examine whether or not the amassed revenue over the chosen interval is ample to shut the purchase place furthest from the present worth. Whether it is, the place can be closed instantly. It is potential that the amassed revenue will not be ample instantly. Nonetheless, throughout a pullback, the loss on the furthest place will lower, and when the amassed revenue is ample, it is going to 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?
% use AB – The share of amassed revenue that can be used to shut shedding positions. If you wish to hold some for your self.
Lot calculation mode for closing a shedding place (drop-down record):
% of the whole quantity of the path
Fastened lot
This setting permits you to choose the lot calculation mode for closing a shedding place.
% of the whole quantity of the path – The share of the whole quantity of the shedding path. For instance, the purchase path grid is shedding cash, its whole quantity is 0.5 heaps. If the ___ Worth for Lot Calculation Mode parameter is about to 10, then we are going to shut 0.5 * 10/100 = 0.05 heaps, or the whole place if its lot dimension is smaller.
Fastened lot – Will shut the lot specified within the ___ Worth parameter for Lot calculation mode or the whole place if its lot is much less.
___ Worth for Lot calculation mode – Worth for Lot calculation mode for closing a shedding place .
“Visualization” settings block

Drawing the Subsequent Stage Opening – If you wish to see the opening degree of the subsequent 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 motive, these ranges can be drawn in grey. Hovering over the extent will show a tooltip. It shows the opening path, the subsequent lot, and the rationale for the prohibition (if any). If you choose the Order TYPE for opening the grid = Cease , two strains can be drawn. One is the order placement degree (strong line), and the second line is the worth degree at which this order can be positioned (dashed line).
Drawing Breakeven Ranges – Draw breakeven ranges. Enabling this setting will assist you to see the breakeven ranges calculated by the Knowledgeable Advisor.
The blue degree is for the Purchase path, the pink degree is for the Promote path, and the pink degree is frequent for each instructions (if it may be calculated). Ranges is not going to be drawn if there is just one place in every path.
“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 Time-frame – the time-frame 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
