GOLD Pyramid MT5 — Input Parameters Guide

7 August 2026, 09:46
Sugianto
0
37
GOLD Pyramid v1.36 — Input Parameters Guide

A detailed reference for every input of the GOLD Pyramid MT5 EA, using the labels shown in the terminal's Inputs tab. Updated for build v1.36.

How the EA Works, in One Paragraph

GOLD Pyramid opens a first trade from a moving-average based entry method, then builds a grid of additional trades in the same direction as price moves against (or with) it, sizing each new leg according to the selected lot progression — fixed, martingale, anti-martingale (pyramid) or mixed. The basket is managed as a whole: averaging trailing, break-even, partial closes and a total-profit target all operate on the combined position rather than on individual trades. Because it is a grid/averaging system, the lot progression, the maximum number of trades and the drawdown controls are the parameters that decide whether the account survives — not the entry method.

Two notes on units: all distances labelled in pips are entered in pips and normalised internally for 2/3/4/5-digit feeds, and all money values are in the deposit currency.

Inputs (General)

Expert Advisor (default: GOLD Pyramid ) — A free-text label at the top of the inputs list. Cosmetic only; it does not affect trading.


Manage Open Position

Trade Buy (default: true) — Allows the EA to open buy trades. Turn it off to run the EA sell-side only.

Trade Sell (default: true) — Allows the EA to open sell trades. Turn it off to run the EA buy-side only. Switching one side off is the usual way to align the EA with a longer-term bias.

Continue New Cycle (default: true) — Master switch for starting a new cycle after the previous basket has been closed. When off, the EA finishes the current cycle and then stops opening first trades — the correct setting when you want to wind the EA down without detaching it mid-basket.

Select Entry Method (default: Rare) — Chooses the internal signal that opens the first trade of each cycle. All variants are EMA-based; they differ in how strict the conditions are and therefore in how often a cycle starts:

  • Rare — the most selective. Requires a four-EMA (10/20/100/200) alignment, so cycles start infrequently.
  • Frequent 1 / Frequent 2 — EMA cross and candle-through-EMA conditions on a 10/20/100 stack. More entries, less confirmation.
  • Continuous 1 / 2 / 3 — loosest conditions; the EA is close to always in the market. Use with the smallest lot progression you are willing to run.
  • FLOW — a Donchian-style breakout of the recent high/low with an EMA filter, rather than an EMA cross.
  • Wave — the same alignment logic as Rare, but additionally gated by the distance between the fast and slow EMA, measured in pips. This is the only method that uses the two Wave inputs below.

Once a cycle is open, this setting no longer applies — grid additions are governed by the Manage GRID group.

Minimum Wave (default: 100) — The minimum EMA spread, in pips, required for a Wave entry. Below this the market is treated as too flat to be worth entering. Only used when Select Entry Method = Wave.

Maximum Wave (default: 200) — The maximum EMA spread, in pips, allowed for a Wave entry. Above this the move is treated as overextended. Only used when Select Entry Method = Wave.

Reverse (default: false) — Inverts every signal: what the entry method calls a buy is traded as a sell and vice versa. Useful for testing whether a losing setting is losing because it is systematically wrong.


Manage Lot and Money

This is the most consequential group in the EA. The lot progression decides how quickly exposure grows as the grid deepens.

Type Lot (default: Martingale 3) — The lot progression applied to each successive trade in a cycle:

Option Progression Character
Fixed Lot 0.01 / 0.01 / 0.01 / 0.01 … Flat exposure. Safest, slowest recovery.
Anti Martingale 1 0.01 / 0.02 / 0.03 / 0.04 … Adds into winners, linearly.
Anti Martingale 2 0.01 / 0.02 / 0.04 / 0.08 … Adds into winners, geometrically (uses Multiplier).
Martingale 1 0.01 ×3 / 0.02 ×3 / 0.03 ×3 … Steps up every third trade, linearly.
Martingale 2 0.01 ×5 / 0.02 ×5 / 0.03 ×5 … Steps up every fifth trade. Slowest martingale.
Martingale 3 0.01 / 0.02 / 0.03 / 0.04 … Linear step-up on every trade. Default.
Martingale 4 0.01 / 0.02 / 0.04 / 0.08 … Geometric step-up (uses Multiplier). Most aggressive.
Mix 1 … Mix 5 Linear or geometric variants Combinations of the above, applied to whichever side of the basket is furthest offside.

Geometric options grow exposure exponentially with grid depth. A 10-leg geometric grid at 1.6× is roughly 40× the starting lot on the last leg — check the total against your balance before running it live.

AutoLot (default: false) — When on, the starting lot is derived from account balance instead of the fixed Start Lot. When off, Start Lot is used as-is.

if AutoLot=true, fill in Money to manage, $ (default: 500) — The money-per-lot-step base used when AutoLot is on. The EA sizes the starting lot as round(balance ÷ this value) × broker lot step — so with a 5,000 balance and a value of 500, the starting lot is ten lot steps. A smaller number produces a larger starting lot; keep it above 0.

if Autolot=false, fill in Start Lot (default: 0.01) — The fixed starting lot for the first trade of every cycle. Every progression in the table above is expressed as a multiple of this value.

Multiplier for Martingale 4/Anti Martingale 2/Mix Lot 3-5 (default: 1.6) — The geometric coefficient applied to the previous leg's lot. Only the progressions named in the label use it — it is ignored for fixed and linear types. Values above ~1.6 compound very quickly at depth.

Maximal Lots (default: 0.1) — A hard ceiling on the lot of any single trade, whatever the progression calculates. This is the single most effective brake on a runaway martingale — set it deliberately rather than leaving it at the default.


Manage GRID

Add grid only in the direction of the trend (default: true) — When on, a new grid leg is only added if the current signal agrees with the direction of the basket. When off, the grid keeps adding regardless of signal. Leaving it on reduces the number of legs added into a sustained move against the basket.

Step (in pips) (default: 30) — The base distance in pips between grid levels. Price must move this far beyond the last entry before the next leg is placed.

Expanding Step Coefficient (default: 1.5) — Widens the grid as it deepens. The required distance for leg n is Step × coefficient^n , so with the defaults the gaps run roughly 30 → 45 → 68 → 101 pips. Set it to 1.0 for a uniform grid. Raising it is the cheapest way to make a deep grid survive a trend.

MaxTrade Buy (default: 10) — Maximum number of simultaneous buy trades in a cycle. The grid stops adding on the buy side once this is reached.

MaxTrade Sell (default: 10) — Maximum number of simultaneous sell trades. Together with Maximal Lots and the expanding step, this bounds the worst-case exposure of a single cycle.


Manage SLTP

Use Stoploss & Takeprofit (in pips) (default: false) — Master switch for per-trade SL/TP. Off by default because in a grid system the basket, not the individual trade, is what gets managed. Turn it on only if you intend each leg to be capped independently.

Stop Loss (in pips), 0 = no stoploss (default: 0) — Per-trade stop distance in pips. 0 = no stop loss.

Take Profit (in pips), 0 = no takeprofit (default: 0) — Per-trade take-profit distance in pips. 0 = no take profit.


Manage Trailing

Averaging Trailing (default: false) — Master switch for trailing the basket. With a single open trade the EA trails that trade's stop; once two or more trades are open it trails from the average price of the basket, so the whole cycle is closed together when the trail is hit.

Trailing Start, in pips (default: 10) — Profit in pips, measured from the average entry price, required before trailing engages.

Trailing Step, in pips (default: 5) — The minimum further move before the trail is shifted again. Prevents constant micro-modifications.


Manage Break Even

Use Break Even (default: false) — Moves the stop to the basket's break-even point once the position is far enough in profit.

Break Even Start, in pips (default: 15) — Profit in pips required before break-even is applied.

Break Even Step, in pips (default: 3) — A small offset beyond break-even, so the cycle locks a few pips instead of exactly zero.


Manage Drawdown Reduction

Three independent partial-close engines. They exist to shrink an offside basket by closing profitable legs against losing ones, which reduces total exposure without waiting for the whole cycle to come back. You can run more than one, but start with one until you understand its behaviour.

Partial Close 1

Use Auto Close Partial (default: true) — Master switch for the first partial-close engine.

Select Close Partial Method (default: Close Partial Buy/Sell) — Which pairing is used: Close Partial Buy & Sell treats both sides together, Close Partial Buy/Sell handles each side separately, and Close Partial All 1 / All 2 apply progressively broader matching across the whole basket.

Number of trade to activate partial close (default: 2) — The basket must contain at least this many trades before partial closing starts.

Select Partial Takeprofit Method (default: Partial TakeProfit in money) — Whether the minimum profit below is read in pips or in money.

Minimum profit for close partial (default: 20) — The profit the matched trades must show before they are closed. Units follow the method above — 20 means 20 pips or 20 in deposit currency, not both.

Partial Close 2 (percentage-based)

Use Auto Close Partial, in percentage (default: false) — Master switch for the percentage-based engine.

Select Close Partial Method (default: Close Partial 1) — Selects between the two percentage variants.

Number of trade to activate partial close (default: 4) — Minimum basket size before this engine acts.

1st Percentage profit to close partial, % (default: 40) — The first profit threshold, as a percentage, at which a portion of the basket is closed.

2nd Percentage profit to close partial, % (default: 60) — The second, higher threshold for the remaining portion.

Partial Close 3 (lot-based)

Auto Close Partial 3 (default: false) — Master switch for the lot-based engine, aimed at baskets where the deepest legs have grown large.

Select Close Partial 3 Method (default: Close Partial Mode 1) — Chooses between the two mode variants.

Number of open trade to activate partial close 3 (default: 2) — Minimum basket size before this engine acts.

Lots to start close partial (default: 0.5) — Only trades at or above this lot size are eligible. This is what targets the engine at the large legs specifically.

min Profit to close (in pips) (default: 30) — The profit in pips an eligible trade must show before part of it is closed.

Partial close percentage, % (default: 50) — How much of the eligible trade's volume is closed each time. 50 means half.


Manage Close

Close opposite (default: false) — Closes trades on the opposite side when a new signal appears, so the EA does not hold both directions at once.

Close All Profit (default: false) — Master switch for the basket profit target. When the whole basket reaches the target, everything is closed and the cycle ends.

Select Profit in Money Or Percentages (default: Percentages) — Whether the target below is read as deposit currency or as a percentage of balance.

The value for 'Money Or Percentages' (default: 100.0) — The target itself. With Percentages selected, 100.0 means 100% of balance — deliberately unreachable, so set this to a realistic figure (for example 1–5%) before enabling Close All Profit, otherwise the switch appears to do nothing.

Use Cut loss (in money) (default: false) — Enables a hard loss cut on the basket, in deposit currency.

Cut loss if loss $ (default: 100.0) — Closes the entire basket once floating loss reaches this figure. Trading resumes the next day.

Use Cut loss by Drawdown (in percentage) (default: false) — The same cut, expressed as account drawdown instead of money.

Cut loss if Drawdown % (default: 25.0) — Closes the basket once drawdown reaches this percentage. For a grid EA this is the last line of defence; leaving both cut-loss options off means the cycle can only end in profit or in a margin call.


Manage Lock

Locking hedges an offside basket rather than closing it: the EA opens an opposing position that freezes the floating loss at its current level, buying time instead of realising the loss. It is an alternative to cut-loss, not a substitute for it.

Use Lock (default: false) — Master switch for the lock/hedge mechanism.

Select Lock Type (default: Lock by Drawdown) — Which trigger arms the lock: Lock by Drawdown, Lock by Loss in money, or Lock by Loss in Pips. Only the matching threshold below applies.

Lock if Drawdown, % (default: 25.0) — Drawdown percentage that triggers the lock, in Lock by Drawdown mode.

Lock if loss, in money ($) (default: 100.0) — Floating loss in deposit currency that triggers the lock, in Lock by Loss in money mode.

Lock if loss, in pips (default: 100) — Distance in pips against the basket that triggers the lock, in Lock by Loss in Pips mode.


Time Management

Use time control, in broker's server time (default: false) — Master switch for the trading-hours filter. When off, the EA may open trades at any time.

Trade Start Time (default: 01:00) — Server time at which new entries become allowed.

Trade End Time (default: 14:00) — Server time after which new entries stop. Management of open positions continues outside the window.

Trade in Monday … Trade in Friday (default: all true) — Per-day switches. Turn off any day you want the EA to sit out — the day after a long weekend, or Friday if you would rather not carry a basket over the weekend gap.


Continue New Cycle Management

A second, finer time filter that applies specifically to starting new cycles. It lets you allow first trades only during liquid sessions while leaving existing baskets managed around the clock.

Manage Continue New Cycle, in broker's server time (default: false) — Master switch. When off, session windows are ignored.

Use Session 1 (default: true) — Enables the first window.

Session 1 Start / Session 1 End (defaults: 01:01 / 11:59) — The first window, in server time.

Use Session 2 (default: true) — Enables the second window.

Session 2 Start / Session 2 End (defaults: 18:01 / 23:59) — The second window.

Use Session 3 (default: false) — Enables the third window.

Session 3 Start / Session 3 End (defaults: 00:00 / 23:59) — The third window, off by default.


Manage News

Stop Trade by News (default: false) — Master switch for the economic-news filter. When on, the EA pauses new entries around scheduled events.

Show News Only This Chart Currency (default: false) — Restricts news objects and filtering to the currencies of the chart symbol. For gold, leaving this off keeps USD events in scope.

High importance (default: true) — Include high-impact events in the filter.

High importance color (default: Red) — Colour of the high-impact markers on the chart. Cosmetic.

Medium importance (default: false) — Include medium-impact events.

Medium importance color (default: Blue) — Cosmetic.

Low importance (default: false) — Include low-impact events.

Low importance color (default: Green) — Cosmetic.

Show description of objects (default: false) — Prints the event name next to each marker.

Stop trade X seconds before the news (default: 3600) — How long before an event new entries stop. 3600 = one hour.

Stop trade X seconds after the news (default: 3600) — How long after an event the EA stays out. 3600 = one hour.

Show timer before and after news (default: true) — Displays a countdown on the chart so the pause is visible.

Period news updates in seconds (default: 86400) — How often the calendar is refreshed. 86400 = once per day.


Manage Others

Max Spread (in Pips) (default: 20) — The maximum spread the EA will trade through. Above this, new entries and grid additions are blocked. Gold spreads widen sharply at the daily rollover and around news — this is what keeps entries out of those windows.

Max Slippage (in Pips) (default: 3) — Maximum deviation accepted on execution.

Coefficient (if Freeze=0 Or StopsLevels=0) (default: 1) — A fallback minimum distance used when the broker reports a zero freeze level or zero stop level, so SL/TP modifications are not rejected. Leave at 1 unless your broker rejects modifications.

Magic number (default: 8055) — The ID tagging this EA's trades. Give each chart or instance its own number. Setting it to 0 makes the EA manage every position on the symbol, including manual ones.

Show additional info (default: true) — Shows the on-chart information panel. Visual only.

Text Color (default: White Smoke) — Panel and chart text colour. Cosmetic.

Font Size (default: 10) — Panel and chart text size. Cosmetic.

Line Width (default: 2) — Width of the level lines the EA draws. Cosmetic.

Show Button (default: true) — Displays the on-chart manual control buttons.

Corner Side button placement (default: Left Upper) — Which chart corner the buttons anchor to.

Button X Axis (default: 120) — Horizontal offset of the button block, in pixels.

Button Y Axis (default: 20) — Vertical offset of the button block, in pixels.

Button Text Color (default: White) — Cosmetic.


Which Parameters Actually Matter

If you change nothing else, get these five right:

  1. Type Lot — geometric progressions (Martingale 4, Anti Martingale 2, Mix 3–5) are where accounts are lost. Start with Fixed Lot or Martingale 2.
  2. Maximal Lots — the hard ceiling. Set it against your balance, not against the default.
  3. MaxTrade Buy / MaxTrade Sell — bounds the depth of a single cycle.
  4. Expanding Step Coefficient — a value above 1.0 makes a deep grid far more survivable in a trend.
  5. Cut loss if Drawdown % — with every cut-loss option off, a cycle can only end in profit or in a margin call. Enable one.

Built-in Safeguards (automatic, not inputs)

These behaviours are always active and shape how the inputs play out:

  • Spread gate — new entries and grid additions are blocked whenever spread exceeds Max Spread, so the EA does not build a grid through a rollover or news spike.
  • Trade-count cap — the grid stops adding once MaxTrade Buy + MaxTrade Sell is reached, regardless of signal.
  • Lot ceiling — every calculated lot is capped at Maximal Lots and validated against the broker's minimum, maximum and step before submission.
  • Volume pre-check — at initialisation the EA validates Start Lot against the broker's contract specification and reports a clear error rather than failing silently at the first trade.
  • Basket-level management — trailing, break-even and partial closes are computed from the basket's average price once more than one trade is open, so the cycle is managed as a unit.
  • Daily stop after cut-loss — when a cut-loss triggers, the EA stops for the remainder of the day and resumes the next session, instead of immediately rebuilding into the same move.
  • Order retry — order sends are retried on recoverable broker errors rather than being abandoned on the first requote.
  • Pip normalisation — all pip-denominated inputs are converted once at initialisation, so settings behave identically on 2, 3, 4 and 5-digit feeds.

Risk Note

GOLD Pyramid is a grid and averaging system. Baskets are closed as a unit, which means floating drawdown during a cycle is normal and expected — but a sustained trend against an unbounded grid is what ends accounts running this class of EA. Test any settings you intend to run on a demo account through at least one high-volatility period before committing capital, and treat Maximal Lots, MaxTrade, and the cut-loss options as required settings rather than optional ones.