Log In
Expert Advisor

Glean Trader Manual

Last updated 2026-08-30 17:17:09

Glean Trader — Manual

Getting Started

Attach Glean Trader from the Navigator's Expert Advisors list, the same way you would any other EA. It manages only the symbol of the chart it's attached to — it never touches or displays any other instrument.

What It Does

Glean Trader combines a trend-following engine with a martingale entry system:

Every trend decision is based only on fully closed bars — the engine never repaints history.

Glean Trader has no web dashboard or remote control of any kind. Every setting comes from its inputs or the on-chart panel itself — nothing is ever pushed to it from outside MT5.

---

The On-Chart Panel

Shows license status, PIN expiry warnings, current trend direction, buy/sell martingale depth, and live Buy/Sell/Total P/L. If support sends a message, it appears directly on the chart with an "I've Read This" acknowledge button.

Emergency Stop — Enable BUY / Enable SELL. Two on-chart toggles. Turning a direction off blocks every source of new exposure in that direction — automated entries, pending order placement, manual clicks, and the Reopen mechanic — and immediately cancels any not-yet-filled pending order in that direction. It does not close anything already open; existing positions keep running under their own management.

Profit-Add: ON / Loss-Add: ON. Two live toggles controlling whether each martingale add-on pathway is currently permitted to fire at all (see the Martingale section below for what each pathway means).

Scale button — cycles the whole panel through 1x/2x/3x magnification.

Lot field, Close All / Close Buys / Close Sells, Close Buy Profit / Close Sell Profit, and manual BUY/SELL buttons — see Manual Panel Controls below.

---

Automated Trading

Off by default. Requires EnableAutoTrading = true to do anything at all.

Dry-Run Mode

Turn on DryRunMode alongside EnableAutoTrading. Every signal is evaluated and logged to the Journal exactly as it would trade, but no real order is ever sent — the best way to watch how the trend engine and martingale chain actually behave before risking anything.

The Trend Engine

This can genuinely lag during a strong, volatility-expanding move — a deliberate trade-off for fewer, more confirmed flips.

Candle Color Confirmation (always on, no setting)

Every signal — the initial flip and every martingale add-on, in both directions — additionally requires the candle that produced it to genuinely be that color: bearish (close below its own open) for a sell signal, bullish (close above its own open) for a buy signal. If a candle breaks the relevant level but is the wrong color, nothing happens at all — no entry, and for add-ons, the reference level is left unchanged rather than partially updated. There is no input to disable this.

Entry Confirmation Mode

EntryConfirmMode — applies to both the initial flip and every martingale add-on:

Initial Entry vs. Martingale Add-Ons

Martingale Add-On Gating — mandatory, dual pathway

Every add-on (level 2 and beyond) must qualify through one of two pathways — there is no case where an add-on proceeds without satisfying either:

These are independent — each is checked on its own terms, and whichever one the most recent entry actually satisfies (and is currently enabled) is the one that applies. With both enabled, a single ongoing sequence can genuinely add via the profit pathway at one point and the loss pathway at another, decided fresh each time. If the most recent entry is in the ambiguous middle — some floating profit but not yet secured — neither pathway is satisfied and the add-on is blocked, regardless of either toggle.

Each pathway has its own minimum distance requirement — ProfitAddDistanceValue/ProfitAddDistanceUnit and LossAddDistanceValue/LossAddDistanceUnit — checked against every entry currently in that direction's stack (open positions and still-pending orders alike), not just the most recent one. For a pending order, the check uses its own eventual trigger price, not current market price. For Amount-unit distances, the conversion always uses a freshly-computed base lot size (matching what a fresh level-1 entry would use right now), never a lookup against a specific historical position — this stays correct even if the original level-1 position has since closed while later members remain open.

Martingale Depth & Sizing

Pending Orders

UsePendingOrders — every entry, instead of filling immediately, is placed as a Stop order at PendingOrderDistance points beyond current price. Auto-cancelled if the trend reverses before it fills — the moment a flip happens, any stale pending order from the old direction is pulled immediately.

Entry Time Window

UseEntryTimeWindow with EntryStartTime/EntryEndTime (HH:MM) and EntryTimeBasis (Broker/GMT) — restricts only the first entry in a direction's stack to a time window; correctly handles a window spanning midnight. This gates the signal itself, not just the final order — a qualifying signal outside the window is skipped entirely rather than queued to fire once the window opens. Every martingale add-on, manual entry, and the Reopen mechanic are completely unaffected by this setting regardless of time. If either time string is malformed, entries are blocked (not silently allowed) until corrected — check the Journal at startup for a warning if this happens.

Stop Loss

UseSL/SLUnit/SLValue — turning this off does not mean risk goes uncalculated: the distance is still used for Risk % sizing either way, it simply isn't sent to the broker as a real stop.

MaxSpreadPoints — a new entry is skipped entirely if the current spread exceeds this.

Position Sizing (level 1 only)

SizingMethod — Fixed Lot or Risk %. Every level beyond 1 scales up via LotMultiplier, not a fresh Risk % calculation each time.

---

Trailing

UseTrailing with TrailStartValue/TrailLockValue/TrailStepValue:

TrailScopeAll Trades trails every position, win or lose. Profit Trades Only leaves losing positions completely alone, and is required for the Reopen mechanic.

Reopen Mechanic (Profit Trades Only scope only)

When a position closes via its own trail while profitable, its entry price is remembered. If price later returns to that level and a fresh valid signal fires in the same direction, it reopens automatically at the same lot size — with no limit on repeats.

---

Averaging Trail

A fundamentally different way of managing exits, built specifically around this EA's own martingale stacking.

AveragingTrail — when on, individual per-position trailing stops sending anything to the broker. Instead, each position silently checks its own crossing of Trail Start; the moment it does, it becomes a permanently locked-in basket member — that lock-in never reverses, even if price later retreats. Positions that haven't crossed Trail Start yet are unaffected by any of this, and still count toward the depth cap and minimum-distance gates exactly as if Averaging Trail were off.

The basket — a single lot-weighted average entry price is computed live across every currently-open, locked-in member. A level-3 entry at 4× the base lot counts 4× as heavily in that average as a level-1 entry.

The virtual stop — since MT5 has no broker-side concept of a basket stop, this is tracked entirely by the EA as software-side state, ratcheting exactly like a real trailing stop using the same Trail Start/Lock/Step values — applied to the basket average instead of one position's own entry. Because it's software-side, it only protects while the EA is actually running and connected — unlike a real SL, a terminal disconnect at the wrong moment means nothing closes automatically.

Lot-ratio scaling — Trail Start/Lock/Step values are entered per-position; the basket's actual targets scale by "equivalent positions" — total basket lots divided by a freshly-computed base lot — so a basket with more exposure genuinely needs proportionally more favorable movement before each stage engages. This applies in both Points and Amount modes.

Once armed, the virtual stop stays armed — the crossing-check runs every tick regardless of whether the basket's live average profit temporarily dips back under Trail Start again (which can happen simply from ordinary price movement, or a new losing position being added to the direction). A previously-armed stop is never silently disarmed.

When the virtual stop is crossed, two things happen together:

The chart linesBuyBasketLineColor/SellBasketLineColor control two dashed horizontal lines, automatically shown only while AveragingTrail is on and that direction has an active basket, tracking the current virtual stop level live.

---

Trade Management

---

Manual Panel Controls

Lot field — the size used by the manual Buy/Sell buttons specifically; has no effect on automated sizing.

Close All / Close Buys / Close Sells — closes positions on this symbol immediately, after confirmation.

Close Buy Profit / Close Sell Profit — closes only the currently-profitable positions in that direction; anything currently losing stays untouched.

Manual BUY/SELL — deliberately bypasses every automated guard (spread, daily loss, minimum distance, the entry time window) — your click is the approval. It does get assigned the correct next martingale level and a full trade record, so it correctly counts toward the depth cap and distance gates for whatever automated entries follow.

---

Important Risk Warnings

Martingale depth defaults to 50, uncapped by default trail behavior on top. Know your worst-case exposure before enabling real trading.

Turning off the Stop Loss does not cap your real risk — the position's actual downside is uncapped until trailing engages, and trailing only starts after a profit threshold, meaning a real, unprotected window early in every trade.

The Reopen mechanic has no cap.

Averaging Trail's virtual stop is software-side, not a real broker SL — it does not protect you if the terminal disconnects.

Manual entries bypass every automated guard, including the entry time window.

Test everything on a demo account first, ideally with Dry-Run Mode on before that.

---

Troubleshooting

Settings changes don't seem to apply — do a genuine remove-and-reattach, not just a recompile; MT5 doesn't always push code changes into an already-running chart.

A signal seems to fire but no trade opens — check the Journal. Common causes: EnableAutoTrading off, that direction's Emergency Stop toggle off, the relevant add-on pathway toggle off, the daily loss limit hit, spread wider than MaxSpreadPoints, the depth cap reached, or the entry time window currently closed.

Martingale add-ons never seem to fire — check whether the most recent entry is genuinely profit-secured or at a loss; the ambiguous middle zone (some floating profit, not yet locked in) blocks both pathways by design.

A manual Buy/Sell button did nothing — check whether Enable BUY/SELL is currently off for that direction.