Golden Zone OB Lock and Trail MT5
200 USD
Demo downloaded:
26
Published:
20 September 2025
Current version:
5.30
Didn't find a suitable robot?
Order your own one
on Freelance
Go to Freelance
Order your own one
on Freelance
How to buy а trading robot or an indicator
Run your EA on
virtual hosting
virtual hosting
Test аn indicator/trading robot before buying
Want to earn in the Market?
How to present a product for a sell-through
Version 5.30
2025.12.08
Stability and functional improvements plus auto-management of manual trades.
Version 5.29
2025.10.09
Stability Improvements.
Version 5.28
2025.09.25
Golden Zone OB Lock & Trail MT5 — v5.28
Golden Zone OB Lock & Trail MT5 is a proprietary Expert Advisor by William Kaumba Daka that trades from mapped order-block (OB) zones using a three-line trap—TOP, MED, and BOT—and then protects with a dynamic BE → lock → trail stack. OB bands are derived from swing structure with ATR-scaled offsets so the system adapts as volatility breathes.
Core trade logic
The engine maps internal/swing OB snapshots into a compact SMC model (bias + top/median/bottom), detects first-touches at those levels, and scores bull/bear sides independently using configurable weights per level. The final long/short gate requires threshold and side dominance. (Optional median line plotting is included for visual context.)
A Golden Band module lets you validate or re-base traps against a 61.8–78.6 zone from the most relevant swing (VALIDATE / INTERSECT / SNAP modes), with tolerance and minimum-overlap controls.
Execution: traps & orders
You can run “touch at market” or place real pending LIMIT/STOP orders at TOP/MED/BOT, with legality/orientation checks and caps per trap and per order. Maximum traps per side, offsets, and price tolerances are input-driven. Visuals are configurable, including a per-ticket toggle to prevent on-chart clutter.
Signals & filters
Signals can incorporate your fast/slow MAs, RSI, MACD, ATR, and a higher-timeframe look; a switch enforces inside-zone only entries so signals must occur inside the active OB. Asset-class presets adapt spread-vs-ATR gates, effective modify distances, and ATR scaling per instrument.
Risk, sizing & broker hygiene
Position sizing respects RiskPercent and normalizes lots strictly to broker min/step/max; a margin-fit routine can auto-shrink size to what the account can carry. A dynamic volume cap caches broker rejections to avoid repeat “too large” errors. Order-send paths are filling-mode aware (with a user-selectable filling mode and optional strictness), and symbol-class presets screen openings via spread/ATR before any trade is attempted.
Protection stack: BE → Locker → Trail
Break-even advances through 30% → 20% → 10% → 0% of original risk with ATR-gating, minimum-seconds spacing, optional one-stage-per-bar, close confirmation, and an optional re-engage that can reseed protection to a percent of original risk if trailing hasn’t locked enough yet. A hard BE floor can prevent any SL from drifting back below entry once BE is achieved.
The Pure Money Locker is the primary protector: it locks profit in cash steps tied to TP progress, with sticky/live TP anchoring, tick-sensitive minimums, and optional ATR hysteresis; the Monetary TP Trail runs as a smart backup (25/50/75% of TP cash) and defers when the Locker is already doing the job. All stop moves are unified and monotonic (no loosening), aligned to ticks, and pre-filtered by freeze/min-distance guards to avoid broker rejections.
News & LDN
News windows are pluggable: MT5 calendar, CSV, lightweight web probes, or Global Variables; you can cluster events, set look-aheads, and run a lightweight “Pro/LDN” workflow with a guarded attempts-per-window. (Legacy LDN hooks are present behind compile-time gates.)
UX & control
The EA exposes compact inputs for toggling trading and pause states, selecting trailing aggressiveness, managing positions across all symbol positions or just the EA’s magic, and switching trap visuals (including the per-ticket option). Optional SMC score labels assist quick read-outs.
What’s new in v5.28
Dual-tally SMC scoring. Bull and bear sides score independently with per-level weights; entries require threshold and side dominance. (Includes optional median plotting.)
Golden Band modes. Validate, intersect, or snap traps to a 61.8–78.6 band with tolerance and overlap controls.
Trap UI upgrade. Pending traps at TOP/MED/BOT with legality/orientation checks, per-trap lot caps, per-side limits, and a per-ticket visuals toggle to prevent clutter.
Asset-class presets (integrated). Spread-vs-ATR gating, effective min-distance multipliers, and ATR scaling vary by symbol class; guards screen opens before sending.
BE & protection refinements. Re-engage options, BE hard-lock at entry, money-locker “primary” with ATR hysteresis, and a monetary trail “backup” that defers appropriately—everything funneled through a monotonic UnifiedStop with freeze/min-distance prechecks.
Legal / Metadata
Version and copyright are embedded in the code header; the EA is proprietary and distributed under license.
Golden Zone OB Lock & Trail MT5 is a proprietary Expert Advisor by William Kaumba Daka that trades from mapped order-block (OB) zones using a three-line trap—TOP, MED, and BOT—and then protects with a dynamic BE → lock → trail stack. OB bands are derived from swing structure with ATR-scaled offsets so the system adapts as volatility breathes.
Core trade logic
The engine maps internal/swing OB snapshots into a compact SMC model (bias + top/median/bottom), detects first-touches at those levels, and scores bull/bear sides independently using configurable weights per level. The final long/short gate requires threshold and side dominance. (Optional median line plotting is included for visual context.)
A Golden Band module lets you validate or re-base traps against a 61.8–78.6 zone from the most relevant swing (VALIDATE / INTERSECT / SNAP modes), with tolerance and minimum-overlap controls.
Execution: traps & orders
You can run “touch at market” or place real pending LIMIT/STOP orders at TOP/MED/BOT, with legality/orientation checks and caps per trap and per order. Maximum traps per side, offsets, and price tolerances are input-driven. Visuals are configurable, including a per-ticket toggle to prevent on-chart clutter.
Signals & filters
Signals can incorporate your fast/slow MAs, RSI, MACD, ATR, and a higher-timeframe look; a switch enforces inside-zone only entries so signals must occur inside the active OB. Asset-class presets adapt spread-vs-ATR gates, effective modify distances, and ATR scaling per instrument.
Risk, sizing & broker hygiene
Position sizing respects RiskPercent and normalizes lots strictly to broker min/step/max; a margin-fit routine can auto-shrink size to what the account can carry. A dynamic volume cap caches broker rejections to avoid repeat “too large” errors. Order-send paths are filling-mode aware (with a user-selectable filling mode and optional strictness), and symbol-class presets screen openings via spread/ATR before any trade is attempted.
Protection stack: BE → Locker → Trail
Break-even advances through 30% → 20% → 10% → 0% of original risk with ATR-gating, minimum-seconds spacing, optional one-stage-per-bar, close confirmation, and an optional re-engage that can reseed protection to a percent of original risk if trailing hasn’t locked enough yet. A hard BE floor can prevent any SL from drifting back below entry once BE is achieved.
The Pure Money Locker is the primary protector: it locks profit in cash steps tied to TP progress, with sticky/live TP anchoring, tick-sensitive minimums, and optional ATR hysteresis; the Monetary TP Trail runs as a smart backup (25/50/75% of TP cash) and defers when the Locker is already doing the job. All stop moves are unified and monotonic (no loosening), aligned to ticks, and pre-filtered by freeze/min-distance guards to avoid broker rejections.
News & LDN
News windows are pluggable: MT5 calendar, CSV, lightweight web probes, or Global Variables; you can cluster events, set look-aheads, and run a lightweight “Pro/LDN” workflow with a guarded attempts-per-window. (Legacy LDN hooks are present behind compile-time gates.)
UX & control
The EA exposes compact inputs for toggling trading and pause states, selecting trailing aggressiveness, managing positions across all symbol positions or just the EA’s magic, and switching trap visuals (including the per-ticket option). Optional SMC score labels assist quick read-outs.
What’s new in v5.28
Dual-tally SMC scoring. Bull and bear sides score independently with per-level weights; entries require threshold and side dominance. (Includes optional median plotting.)
Golden Band modes. Validate, intersect, or snap traps to a 61.8–78.6 band with tolerance and overlap controls.
Trap UI upgrade. Pending traps at TOP/MED/BOT with legality/orientation checks, per-trap lot caps, per-side limits, and a per-ticket visuals toggle to prevent clutter.
Asset-class presets (integrated). Spread-vs-ATR gating, effective min-distance multipliers, and ATR scaling vary by symbol class; guards screen opens before sending.
BE & protection refinements. Re-engage options, BE hard-lock at entry, money-locker “primary” with ATR hysteresis, and a monetary trail “backup” that defers appropriately—everything funneled through a monotonic UnifiedStop with freeze/min-distance prechecks.
Legal / Metadata
Version and copyright are embedded in the code header; the EA is proprietary and distributed under license.
Version 5.27
2025.09.22
Golden Zone OB Lock & Trail MT5 — Update
Release notes
New
ProNews one-press preset (tied to the LDN: ON button): auto news bias + MT5 calendar gating; new NEWS_GLOBALVARS mode reads LDN_NEWS_START/END.
Asset Manager presets (FOREX/METAL/CRYPTO/INDEX/ENERGY/SOFT): per-asset spread-to-ATR checks, effective min-distance & ATR scaling on entries/modifies.
Pure Money Locker (primary) + Monetary TP Trail (backup): locks profit in 5% TP steps with sticky/dynamic TP anchor and ATR hysteresis.
Break-Even engine v2: staged 30→20→10→0% with ATR gating, time/close confirmation, one-stage-per-bar, hand-off to trailing and optional re-engage.
Trap engine upgrades: optional real pendings at TOP/MED/BOT, per-trap execution caps, auto flip wrong pending type, zone visuals, compact TRP:<id> comments.
Robust order send: fill-mode rotation (IOC/FOK/RETURN), margin-fit, dynamic volume caps + side allowance guard, smart cooldowns.
Broker overrides (min lot, step, contract size) + “manage all symbol positions” switch.
GUI: LDN toggle, trailing CONS/AGG toggle, quick close buttons, live labels (composite & LDN scores).
Improvements
Unified stop modifier with monotonic only + hard BE lock; freeze-level and min-distance aware; millisecond debounce.
Pending safety: legal SL/TP vs pending price, tick alignment, one-tick cushion.
Auto seed of missing original SL (OB or 1.5×ATR) so BE math is always valid.
Synth TP anchor (3×ATR) so Locker can operate even w/o a set TP.
Fixes/Hardening
Stage-4 BE deferred until there’s real room vs broker min-distance (prevents SL < entry).
Avoid RETURN on market orders unless it’s the only allowed mode.
Better handling of volume-limit rejects (shrink & learn server caps).
News engine back-off; ProNews OFF clears windows & bias cleanly.
Quick-start inputs (change only these first)
Risk & basics
RiskPercent = 1.50 (start lower if needed)
MinLotUser = 0.01 (or your broker’s min)
TradeMagicNumber = unique per chart
AllowLongs/AllowShorts = true
MaxOrdersPerSide = 1
ShowUI = true
Stops & trailing (good defaults)
BE_HardLockAtBreakeven = true
PureLocker_Enable = true (primary)
MonetaryTPTrail_Enable = off (enable later if you want backup)
LDN_TrailingAggressiveness = LDN_TRAIL_CONSERV
Traps (optional to start)
EnableTraps = false (learn the EA first)
When ready: set true, keep Trap_PlacePendingsAtLines = false initially.
News
Easiest: leave NEWS_Mode = NEWS_GLOBALVARS (no gating unless you publish GVs).
Or set NEWS_MT5 to use the MT5 calendar.
Filling/broker
OrderFillingType = ORDER_FILLING_IOC
StrictMarketFill = true (especially in tester)
Leave broker overrides off unless your server misreports values.
Quick-start guide (5–7 minutes)
Attach the EA to a liquid symbol (e.g., EURUSD or XAUUSD) on your preferred TF. Default HTF = H4; LDN uses M30 internally.
Enable Algo Trading in MT5 and make sure the symbol is trade-enabled.
Set a unique TradeMagicNumber per chart/symbol.
Risk: tune RiskPercent (e.g., 0.25–1.0% while learning).
(Optional) News gating:
MT5 calendar: set NEWS_Mode = NEWS_MT5.
External windows: create MT5 Global Variables LDN_NEWS_START / LDN_NEWS_END (epoch seconds); EA will read them.
(Optional) Traps: when comfortable, set EnableTraps = true. Start with market-on-touch (leave pendings off).
GUI on chart:
Toggle Trading ON/OFF, Pause, Trailing CONS/AGG.
Click LDN: ON to enable the new LDN engine; this also applies the ProNews preset (auto news bias). Click again to turn it off.
Let it run. The EA opens only when entries are inside its OB “golden zone” (61.8–78.6) and confluence gates pass.
Watch logs with Diagnostics = true for clear reasons on skips/entries (spread/ATR, news windows, caps, etc.).
Backtest with StrictMarketFill = true and (optionally) DryRun = true for a quick safety shakedown.
Tips
Magic numbers: unique per chart; set ManageAllSymbolPositions = false unless you intentionally want to manage every position on the symbol.
Broker constraints: high freeze/stops levels? Increase BufferPoints or set UseATRInModifyMinDist = false to relax modify distance.
Volume limits: if you see “VOLUME LIMIT” messages, the EA will auto-shrink and learn caps. You can also lower risk or lots.
Pending orientation: if you enable pendings and get “Invalid price”, set Trap_AutoFlipToCorrectType = true or increase TrapOffsetPoints.
BE staging: stage-4 (true BE) only occurs when there’s enough room vs broker min-distance; this is on purpose.
Locker + Monetary: Locker is primary; Monetary acts as a backup when the locker lags your chosen stage.
News preset: turning LDN OFF clears the ProNews bias & news window; turning it ON re-primes the news scan.
Testing first: try DryRun = true for a live-like dry-run (logs only), then flip it off to go live.
Symbols: start with majors or XAUUSD; avoid illiquid exotics while tuning.
UI closers: “Close All/Longs/Shorts” respect your slippage setting (MaxSlippagePoints).
// ───────────────────────── ENUMS USED BY INPUTS ─────────────────────────
enum NEWS_Source { NEWS_AUTO=0, NEWS_MT5=1, NEWS_FILE_CSV=2, NEWS_WEB_FF=3, NEWS_WEB_INV=4, NEWS_GLOBALVARS=5 };
enum ENUM_LDN_TRAIL { LDN_TRAIL_CONSERV = 0, LDN_TRAIL_BALANCED = 1, LDN_TRAIL_AGGRESSIVE = 2 };
enum ENUM_LDN_MODE { LDN_ReduceRisk = 0, LDN_ExploitBreakout = 1 }; // legacy block
enum LDN_BiasMode { LDN_BIAS_NONE=0, LDN_BIAS_FILTER=1, LDN_BIAS_TILT=2 }; // new LDN engine
enum LDN_TrailMode { LDN_TRAIL_ATR=0, LDN_TRAIL_STEP=1, LDN_TRAIL_CHAN=2 }; // new LDN engine
// ───────────────────────── CORE / STRATEGY INPUTS ─────────────────────────
input int FastMA_Length = 20;
input int SlowMA_Length = 50;
input int HMA_Length = 100;
input ENUM_TIMEFRAMES HigherTF = PERIOD_H4;
input int RSI_Length = 14;
input int MACD_Fast = 12;
input int MACD_Slow = 26;
input int MACD_Signal = 9;
input int ATR_Length = 14;
input int Lookback = 20;
input int Volume_SMA_Length = 20;
input double RiskPercent = 1.50;
input double MinLotUser = 0.01;
input bool AllowShorts = true;
input bool AllowLongs = true;
input bool UseFallback = true;
input bool ShowUI = true;
input int MaxSlippagePoints = 200;
input int TradeMagicNumber = 20250827;
input bool LogTrapSkips = false;
input bool ManageAllSymbolPositions = false;
// ───────────────────────── ORDER / BROKER OVERRIDES ─────────────────────────
input ENUM_ORDER_TYPE_FILLING OrderFillingType = ORDER_FILLING_IOC;
input bool StrictMarketFill = true;
input bool UseBrokerOverrides = false;
input double BrokerMinLot = 0.0;
input double BrokerLotStep = 0.0;
input double BrokerContractSize = 0.0;
// ───────────────────────── TRAP ENGINE ─────────────────────────
input bool EnableTraps = true;
input bool TrapVisuals = true;
input int TrapOffsetPoints = 10;
input int MaxTrapsPerSide = 3;
input double TrapLotPercent = 50.0;
input int TrapPriceTolerancePts = 5;
input double TrapZoneBandATRmult = 1.0;
// ───────────────────────── NEWS ENGINE ─────────────────────────
input NEWS_Source NEWS_Mode = NEWS_GLOBALVARS;
input int NEWS_MinImpact = 2;
input int NEWS_LookaheadMin= 120;
input int NEWS_RescanSec = 30;
input string NEWS_CSV_File = "ldn_news.csv";
input string NEWS_FF_URL = "https://www.forexfactory.com/calendar?day=today";
input string NEWS_INV_URL = "https://www.investing.com/economic-calendar/";
input string NEWS_HTTP_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64)";
input int NEWS_HTTP_TimeoutMs = 4000;
input int NEWS_Web_TimeShiftMinutes = 0;
input bool NEWS_MergeCluster = true;
input int NEWS_ClusterGapSec= 240;
input bool NEWS_DebugLog = false;
// LDN attempts per news window
input int LDN_AttemptsPerNewsWindow = 2;
// OB SL distance outside the zone
input double OB_SL_OutsideFrac = 0.60;
// use ATR in modify-min-distance
input bool UseATRInModifyMinDist = false;
// ───────────────────────── TRAP EXECUTION LIMITS ─────────────────────────
input bool EnableTrapExecutionLimit = true;
input int MaxTradesPerTrap = 3;
input bool Trap_PlacePendingsAtLines = true;
input bool Trap_AutoFlipToCorrectType = false;
input double TrapMaxLotsPerOrder = 0.0;
// ───────────────────────── MISC SAFETY / TUNING ─────────────────────────
input int BufferPoints = 1;
input int ModifyDebounceMs = 800;
input int ModifyChangePoints = 3;
input bool AlignPriceToTick = true;
input bool Diagnostics = true;
input bool DryRun = false;
input double ATR_SL_Multiplier = 0.0;
input int PendingModifyAvoidPoints = 5;
input bool RequireSignalEntriesInsideZones = true;
// ───────────────────────── TRAILING PRESETS ─────────────────────────
input double TrailingATRMultiplier = 1.00;
input double TrailingATRMultiplierAggressive = 0.40;
input double TrailingATRMultiplierConservative = 0.65;
input double Trail_Activate_ATR = 0.60;
input ENUM_LDN_TRAIL LDN_TrailingAggressiveness = LDN_TRAIL_BALANCED;
// ───────────────────────── MONETARY TP TRAIL + LOCKER ─────────────────────────
input bool MonetaryTPTrail_Enable = true;
input bool MonetaryTPTrail_TieToBE = true;
input bool BE_HardLockAtBreakeven = true;
input bool Locker_AsPrimary = true;
input bool Monetary_AsBackup = true;
input int Monetary_Backup_WaitSec = 20;
input double Monetary_Backup_MinGapFrac = 0.10;
input bool PureLocker_Enable = true;
input bool PureLocker_StartAfterBE = false;
input bool Locker_AnchorSticky = true;
input double Locker_Step_TPFrac = 0.05;
input int Locker_Step_MinTicks = 2;
input bool Locker_ATRHysteresis = true;
input double Locker_ATR_Hyst_Cons = 0.30;
input double Locker_ATR_Hyst_Agg = 0.15;
// ───────────────────────── GUI LIMITS ─────────────────────────
input int MaxOrdersPerSide = 3;
// ───────────────────────── LEGACY LDN-NYC MODE (compiled in this build) ─────────────────────────
input bool EnableLDNNYC_Mode = false;
input bool LDN_NYC_AutoEnable = false;
input int LDN_UseLocalTimeOffset = 0;
input int LDN_StartHour_CAT = 7;
input int LDN_EndHour_CAT = 11;
input double LDN_LotMultiplier = 1.0;
input double LDN_MaxSpread = 30.0; // pts
input double LDN_ATRThreshold = 0.0;
input int LDN_CooldownAfterFail_s = 10;
input double LDN_PartialClosePercent = 50.0;
input bool LDN_AutoCancelIfHTFViolation = true;
input int LDN_FalseBreakoutTimeout = 30; // seconds
input int LDN_MinRetestLookback = 6;
input int LDN_MinRetests = 1;
input int LDN_ConfirmBars = 1;
input int LDN_VolumeAvgLength = 20;
input double LDN_VolumeMultiplier = 1.5;
input double LDN_Breakout_ATR_Mult = 0.5;
input int LDN_MaxTradesPerWindow = 3;
// ───────────────────────── BREAK-EVEN ENGINE (+ RE-ENGAGE) ─────────────────────────
input bool BE_UseProfitATR_Gating = true;
input double BE_Start_ATR = 0.30;
input double BE_Step_ATR = 0.15;
input int BE_MinSecondsFromEntry = 45;
input int BE_MinSecondsBetweenStages = 30;
input bool BE_OneStagePerBar = false;
input bool BE_RequireCloseConfirm = false;
input int BE_CloseConfirmBars = 1;
input double BE_Handover_ProfitATR = 0.00;
input bool BE_ReengageEnabled = false;
input int BE_Reengage_MinLocks = 1;
input double BE_Reengage_Percent = 0.30;
input int BE_Reengage_AllowSeconds = 120;
input double BE_Reengage_ExtraBufferATRMult= 0.10;
// ───────────────────────── NEW LDN / NYC BREAKOUT ENGINE (v5.24-pro+) ─────────────────────────
input bool LDN_Enable = true;
input bool LDN_AutoOn = false;
input bool LDN_ContinueManageWhenDisabled = false;
input bool LDN_ManageOnlyLDNTrades = true;
input ENUM_TIMEFRAMES LDN_TF = PERIOD_M30;
input int LDN_OpenHour_Local = 8;
input int LDN_CloseHour_Local = 17;
input int LDN_PivotLeftRight = 5;
input int LDN_LookbackForShelves = 200;
input double LDN_BandRatePct = 3.0;
input int LDN_MinTestsInBand = 2;
input int LDN_ConfirmBarsAfterBreak = 1;
input double LDN_MinShelfScore = 2.5;
input int LDN_FalseReentryBars = 2;
input bool LDN_FalseReentryUseClose = true;
input bool LDN_StopAtHTFEnd = false;
input bool LDN_DynFalseWindow = true;
input double LDN_FalseWindowAtrFactor = 0.60;
input bool LDN_UseNewsWindows = true;
input int LDN_NewsPreWindowSec = 60;
input int LDN_NewsPostWindowSec = 90;
input bool LDN_AggressiveNewsIntrabar = true;
input double LDN_IntrabarBreakBufferPips = 0.5;
input int LDN_CooldownSecAfterClose = 30;
input LDN_BiasMode LDN_FundamentalBiasMode = LDN_BIAS_NONE;
input double LDN_TiltLoosenFactor = 0.75;
input double LDN_TiltTightenFactor = 1.25;
// Smart News Engine (SNE)
input bool SNE_Enable = false;
input int SNE_MinImpactForBias = 2;
input int SNE_StaleSeconds = 900;
input double SNE_BiasThreshold = 0.20;
input bool SNE_AllowRiskTilt = true;
input double SNE_RiskBoostMax = 0.35;
// Market quality guards
input double LDN_MaxSpreadPips = 2.0;
input double LDN_MinTickRateHz = 2.0;
input int LDN_TickRateWindow = 30;
// Internal BE (news mode)
input bool LDN_BE_Enable = true;
input int LDN_BE_ATR_Period = 50;
input ENUM_TIMEFRAMES LDN_BE_ATR_TF = PERIOD_M5;
input double LDN_BE_TriggerAtrMult = 0.50;
input double LDN_BE_TriggerPips = 5.0;
input double LDN_BE_OffsetPips = 0.2;
input int LDN_BE_MinHoldSeconds = 2;
input double LDN_BE_TriggerAtrMult_News = 0.35;
input double LDN_BE_TriggerPips_News = 3.0;
// Internal trailing
input bool LDN_Trail_Enable = false;
input LDN_TrailMode LDN_Trail_Mode = LDN_TRAIL_ATR;
input int LDN_Trail_ATR_Period = 50;
input ENUM_TIMEFRAMES LDN_Trail_ATR_TF = PERIOD_M5;
input double LDN_Trail_ATRMult = 1.20;
input double LDN_Trail_MinStepPips = 2.5;
input int LDN_Trail_MinMillisBetweenUpdates = 400;
// Chandelier variant
input int LDN_Trail_Chan_Period = 22;
input double LDN_Trail_Chan_MultATR = 2.0;
// Misc / risk
input double LDN_ShelfBufferPips = 0.4;
input double LDN_DefaultRiskPct = 0.5;
// Asset Manager (AM)
input bool AM_Enable = true;
input int AM_ATR_Period = 14;
input ENUM_TIMEFRAMES AM_ATR_TF = PERIOD_M5;
input int AM_ATR_LookbackDays = 60;
input double AM_MinATRPercentile = 70.0;
input bool AM_NewsRelevance_Enable = true;
// Portfolio Manager (PM)
input bool PM_Enable = true;
input double PM_MaxGroupRiskPct = 1.50;
input bool PM_GroupByNewsCurrency = true;
Release notes
New
ProNews one-press preset (tied to the LDN: ON button): auto news bias + MT5 calendar gating; new NEWS_GLOBALVARS mode reads LDN_NEWS_START/END.
Asset Manager presets (FOREX/METAL/CRYPTO/INDEX/ENERGY/SOFT): per-asset spread-to-ATR checks, effective min-distance & ATR scaling on entries/modifies.
Pure Money Locker (primary) + Monetary TP Trail (backup): locks profit in 5% TP steps with sticky/dynamic TP anchor and ATR hysteresis.
Break-Even engine v2: staged 30→20→10→0% with ATR gating, time/close confirmation, one-stage-per-bar, hand-off to trailing and optional re-engage.
Trap engine upgrades: optional real pendings at TOP/MED/BOT, per-trap execution caps, auto flip wrong pending type, zone visuals, compact TRP:<id> comments.
Robust order send: fill-mode rotation (IOC/FOK/RETURN), margin-fit, dynamic volume caps + side allowance guard, smart cooldowns.
Broker overrides (min lot, step, contract size) + “manage all symbol positions” switch.
GUI: LDN toggle, trailing CONS/AGG toggle, quick close buttons, live labels (composite & LDN scores).
Improvements
Unified stop modifier with monotonic only + hard BE lock; freeze-level and min-distance aware; millisecond debounce.
Pending safety: legal SL/TP vs pending price, tick alignment, one-tick cushion.
Auto seed of missing original SL (OB or 1.5×ATR) so BE math is always valid.
Synth TP anchor (3×ATR) so Locker can operate even w/o a set TP.
Fixes/Hardening
Stage-4 BE deferred until there’s real room vs broker min-distance (prevents SL < entry).
Avoid RETURN on market orders unless it’s the only allowed mode.
Better handling of volume-limit rejects (shrink & learn server caps).
News engine back-off; ProNews OFF clears windows & bias cleanly.
Quick-start inputs (change only these first)
Risk & basics
RiskPercent = 1.50 (start lower if needed)
MinLotUser = 0.01 (or your broker’s min)
TradeMagicNumber = unique per chart
AllowLongs/AllowShorts = true
MaxOrdersPerSide = 1
ShowUI = true
Stops & trailing (good defaults)
BE_HardLockAtBreakeven = true
PureLocker_Enable = true (primary)
MonetaryTPTrail_Enable = off (enable later if you want backup)
LDN_TrailingAggressiveness = LDN_TRAIL_CONSERV
Traps (optional to start)
EnableTraps = false (learn the EA first)
When ready: set true, keep Trap_PlacePendingsAtLines = false initially.
News
Easiest: leave NEWS_Mode = NEWS_GLOBALVARS (no gating unless you publish GVs).
Or set NEWS_MT5 to use the MT5 calendar.
Filling/broker
OrderFillingType = ORDER_FILLING_IOC
StrictMarketFill = true (especially in tester)
Leave broker overrides off unless your server misreports values.
Quick-start guide (5–7 minutes)
Attach the EA to a liquid symbol (e.g., EURUSD or XAUUSD) on your preferred TF. Default HTF = H4; LDN uses M30 internally.
Enable Algo Trading in MT5 and make sure the symbol is trade-enabled.
Set a unique TradeMagicNumber per chart/symbol.
Risk: tune RiskPercent (e.g., 0.25–1.0% while learning).
(Optional) News gating:
MT5 calendar: set NEWS_Mode = NEWS_MT5.
External windows: create MT5 Global Variables LDN_NEWS_START / LDN_NEWS_END (epoch seconds); EA will read them.
(Optional) Traps: when comfortable, set EnableTraps = true. Start with market-on-touch (leave pendings off).
GUI on chart:
Toggle Trading ON/OFF, Pause, Trailing CONS/AGG.
Click LDN: ON to enable the new LDN engine; this also applies the ProNews preset (auto news bias). Click again to turn it off.
Let it run. The EA opens only when entries are inside its OB “golden zone” (61.8–78.6) and confluence gates pass.
Watch logs with Diagnostics = true for clear reasons on skips/entries (spread/ATR, news windows, caps, etc.).
Backtest with StrictMarketFill = true and (optionally) DryRun = true for a quick safety shakedown.
Tips
Magic numbers: unique per chart; set ManageAllSymbolPositions = false unless you intentionally want to manage every position on the symbol.
Broker constraints: high freeze/stops levels? Increase BufferPoints or set UseATRInModifyMinDist = false to relax modify distance.
Volume limits: if you see “VOLUME LIMIT” messages, the EA will auto-shrink and learn caps. You can also lower risk or lots.
Pending orientation: if you enable pendings and get “Invalid price”, set Trap_AutoFlipToCorrectType = true or increase TrapOffsetPoints.
BE staging: stage-4 (true BE) only occurs when there’s enough room vs broker min-distance; this is on purpose.
Locker + Monetary: Locker is primary; Monetary acts as a backup when the locker lags your chosen stage.
News preset: turning LDN OFF clears the ProNews bias & news window; turning it ON re-primes the news scan.
Testing first: try DryRun = true for a live-like dry-run (logs only), then flip it off to go live.
Symbols: start with majors or XAUUSD; avoid illiquid exotics while tuning.
UI closers: “Close All/Longs/Shorts” respect your slippage setting (MaxSlippagePoints).
// ───────────────────────── ENUMS USED BY INPUTS ─────────────────────────
enum NEWS_Source { NEWS_AUTO=0, NEWS_MT5=1, NEWS_FILE_CSV=2, NEWS_WEB_FF=3, NEWS_WEB_INV=4, NEWS_GLOBALVARS=5 };
enum ENUM_LDN_TRAIL { LDN_TRAIL_CONSERV = 0, LDN_TRAIL_BALANCED = 1, LDN_TRAIL_AGGRESSIVE = 2 };
enum ENUM_LDN_MODE { LDN_ReduceRisk = 0, LDN_ExploitBreakout = 1 }; // legacy block
enum LDN_BiasMode { LDN_BIAS_NONE=0, LDN_BIAS_FILTER=1, LDN_BIAS_TILT=2 }; // new LDN engine
enum LDN_TrailMode { LDN_TRAIL_ATR=0, LDN_TRAIL_STEP=1, LDN_TRAIL_CHAN=2 }; // new LDN engine
// ───────────────────────── CORE / STRATEGY INPUTS ─────────────────────────
input int FastMA_Length = 20;
input int SlowMA_Length = 50;
input int HMA_Length = 100;
input ENUM_TIMEFRAMES HigherTF = PERIOD_H4;
input int RSI_Length = 14;
input int MACD_Fast = 12;
input int MACD_Slow = 26;
input int MACD_Signal = 9;
input int ATR_Length = 14;
input int Lookback = 20;
input int Volume_SMA_Length = 20;
input double RiskPercent = 1.50;
input double MinLotUser = 0.01;
input bool AllowShorts = true;
input bool AllowLongs = true;
input bool UseFallback = true;
input bool ShowUI = true;
input int MaxSlippagePoints = 200;
input int TradeMagicNumber = 20250827;
input bool LogTrapSkips = false;
input bool ManageAllSymbolPositions = false;
// ───────────────────────── ORDER / BROKER OVERRIDES ─────────────────────────
input ENUM_ORDER_TYPE_FILLING OrderFillingType = ORDER_FILLING_IOC;
input bool StrictMarketFill = true;
input bool UseBrokerOverrides = false;
input double BrokerMinLot = 0.0;
input double BrokerLotStep = 0.0;
input double BrokerContractSize = 0.0;
// ───────────────────────── TRAP ENGINE ─────────────────────────
input bool EnableTraps = true;
input bool TrapVisuals = true;
input int TrapOffsetPoints = 10;
input int MaxTrapsPerSide = 3;
input double TrapLotPercent = 50.0;
input int TrapPriceTolerancePts = 5;
input double TrapZoneBandATRmult = 1.0;
// ───────────────────────── NEWS ENGINE ─────────────────────────
input NEWS_Source NEWS_Mode = NEWS_GLOBALVARS;
input int NEWS_MinImpact = 2;
input int NEWS_LookaheadMin= 120;
input int NEWS_RescanSec = 30;
input string NEWS_CSV_File = "ldn_news.csv";
input string NEWS_FF_URL = "https://www.forexfactory.com/calendar?day=today";
input string NEWS_INV_URL = "https://www.investing.com/economic-calendar/";
input string NEWS_HTTP_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64)";
input int NEWS_HTTP_TimeoutMs = 4000;
input int NEWS_Web_TimeShiftMinutes = 0;
input bool NEWS_MergeCluster = true;
input int NEWS_ClusterGapSec= 240;
input bool NEWS_DebugLog = false;
// LDN attempts per news window
input int LDN_AttemptsPerNewsWindow = 2;
// OB SL distance outside the zone
input double OB_SL_OutsideFrac = 0.60;
// use ATR in modify-min-distance
input bool UseATRInModifyMinDist = false;
// ───────────────────────── TRAP EXECUTION LIMITS ─────────────────────────
input bool EnableTrapExecutionLimit = true;
input int MaxTradesPerTrap = 3;
input bool Trap_PlacePendingsAtLines = true;
input bool Trap_AutoFlipToCorrectType = false;
input double TrapMaxLotsPerOrder = 0.0;
// ───────────────────────── MISC SAFETY / TUNING ─────────────────────────
input int BufferPoints = 1;
input int ModifyDebounceMs = 800;
input int ModifyChangePoints = 3;
input bool AlignPriceToTick = true;
input bool Diagnostics = true;
input bool DryRun = false;
input double ATR_SL_Multiplier = 0.0;
input int PendingModifyAvoidPoints = 5;
input bool RequireSignalEntriesInsideZones = true;
// ───────────────────────── TRAILING PRESETS ─────────────────────────
input double TrailingATRMultiplier = 1.00;
input double TrailingATRMultiplierAggressive = 0.40;
input double TrailingATRMultiplierConservative = 0.65;
input double Trail_Activate_ATR = 0.60;
input ENUM_LDN_TRAIL LDN_TrailingAggressiveness = LDN_TRAIL_BALANCED;
// ───────────────────────── MONETARY TP TRAIL + LOCKER ─────────────────────────
input bool MonetaryTPTrail_Enable = true;
input bool MonetaryTPTrail_TieToBE = true;
input bool BE_HardLockAtBreakeven = true;
input bool Locker_AsPrimary = true;
input bool Monetary_AsBackup = true;
input int Monetary_Backup_WaitSec = 20;
input double Monetary_Backup_MinGapFrac = 0.10;
input bool PureLocker_Enable = true;
input bool PureLocker_StartAfterBE = false;
input bool Locker_AnchorSticky = true;
input double Locker_Step_TPFrac = 0.05;
input int Locker_Step_MinTicks = 2;
input bool Locker_ATRHysteresis = true;
input double Locker_ATR_Hyst_Cons = 0.30;
input double Locker_ATR_Hyst_Agg = 0.15;
// ───────────────────────── GUI LIMITS ─────────────────────────
input int MaxOrdersPerSide = 3;
// ───────────────────────── LEGACY LDN-NYC MODE (compiled in this build) ─────────────────────────
input bool EnableLDNNYC_Mode = false;
input bool LDN_NYC_AutoEnable = false;
input int LDN_UseLocalTimeOffset = 0;
input int LDN_StartHour_CAT = 7;
input int LDN_EndHour_CAT = 11;
input double LDN_LotMultiplier = 1.0;
input double LDN_MaxSpread = 30.0; // pts
input double LDN_ATRThreshold = 0.0;
input int LDN_CooldownAfterFail_s = 10;
input double LDN_PartialClosePercent = 50.0;
input bool LDN_AutoCancelIfHTFViolation = true;
input int LDN_FalseBreakoutTimeout = 30; // seconds
input int LDN_MinRetestLookback = 6;
input int LDN_MinRetests = 1;
input int LDN_ConfirmBars = 1;
input int LDN_VolumeAvgLength = 20;
input double LDN_VolumeMultiplier = 1.5;
input double LDN_Breakout_ATR_Mult = 0.5;
input int LDN_MaxTradesPerWindow = 3;
// ───────────────────────── BREAK-EVEN ENGINE (+ RE-ENGAGE) ─────────────────────────
input bool BE_UseProfitATR_Gating = true;
input double BE_Start_ATR = 0.30;
input double BE_Step_ATR = 0.15;
input int BE_MinSecondsFromEntry = 45;
input int BE_MinSecondsBetweenStages = 30;
input bool BE_OneStagePerBar = false;
input bool BE_RequireCloseConfirm = false;
input int BE_CloseConfirmBars = 1;
input double BE_Handover_ProfitATR = 0.00;
input bool BE_ReengageEnabled = false;
input int BE_Reengage_MinLocks = 1;
input double BE_Reengage_Percent = 0.30;
input int BE_Reengage_AllowSeconds = 120;
input double BE_Reengage_ExtraBufferATRMult= 0.10;
// ───────────────────────── NEW LDN / NYC BREAKOUT ENGINE (v5.24-pro+) ─────────────────────────
input bool LDN_Enable = true;
input bool LDN_AutoOn = false;
input bool LDN_ContinueManageWhenDisabled = false;
input bool LDN_ManageOnlyLDNTrades = true;
input ENUM_TIMEFRAMES LDN_TF = PERIOD_M30;
input int LDN_OpenHour_Local = 8;
input int LDN_CloseHour_Local = 17;
input int LDN_PivotLeftRight = 5;
input int LDN_LookbackForShelves = 200;
input double LDN_BandRatePct = 3.0;
input int LDN_MinTestsInBand = 2;
input int LDN_ConfirmBarsAfterBreak = 1;
input double LDN_MinShelfScore = 2.5;
input int LDN_FalseReentryBars = 2;
input bool LDN_FalseReentryUseClose = true;
input bool LDN_StopAtHTFEnd = false;
input bool LDN_DynFalseWindow = true;
input double LDN_FalseWindowAtrFactor = 0.60;
input bool LDN_UseNewsWindows = true;
input int LDN_NewsPreWindowSec = 60;
input int LDN_NewsPostWindowSec = 90;
input bool LDN_AggressiveNewsIntrabar = true;
input double LDN_IntrabarBreakBufferPips = 0.5;
input int LDN_CooldownSecAfterClose = 30;
input LDN_BiasMode LDN_FundamentalBiasMode = LDN_BIAS_NONE;
input double LDN_TiltLoosenFactor = 0.75;
input double LDN_TiltTightenFactor = 1.25;
// Smart News Engine (SNE)
input bool SNE_Enable = false;
input int SNE_MinImpactForBias = 2;
input int SNE_StaleSeconds = 900;
input double SNE_BiasThreshold = 0.20;
input bool SNE_AllowRiskTilt = true;
input double SNE_RiskBoostMax = 0.35;
// Market quality guards
input double LDN_MaxSpreadPips = 2.0;
input double LDN_MinTickRateHz = 2.0;
input int LDN_TickRateWindow = 30;
// Internal BE (news mode)
input bool LDN_BE_Enable = true;
input int LDN_BE_ATR_Period = 50;
input ENUM_TIMEFRAMES LDN_BE_ATR_TF = PERIOD_M5;
input double LDN_BE_TriggerAtrMult = 0.50;
input double LDN_BE_TriggerPips = 5.0;
input double LDN_BE_OffsetPips = 0.2;
input int LDN_BE_MinHoldSeconds = 2;
input double LDN_BE_TriggerAtrMult_News = 0.35;
input double LDN_BE_TriggerPips_News = 3.0;
// Internal trailing
input bool LDN_Trail_Enable = false;
input LDN_TrailMode LDN_Trail_Mode = LDN_TRAIL_ATR;
input int LDN_Trail_ATR_Period = 50;
input ENUM_TIMEFRAMES LDN_Trail_ATR_TF = PERIOD_M5;
input double LDN_Trail_ATRMult = 1.20;
input double LDN_Trail_MinStepPips = 2.5;
input int LDN_Trail_MinMillisBetweenUpdates = 400;
// Chandelier variant
input int LDN_Trail_Chan_Period = 22;
input double LDN_Trail_Chan_MultATR = 2.0;
// Misc / risk
input double LDN_ShelfBufferPips = 0.4;
input double LDN_DefaultRiskPct = 0.5;
// Asset Manager (AM)
input bool AM_Enable = true;
input int AM_ATR_Period = 14;
input ENUM_TIMEFRAMES AM_ATR_TF = PERIOD_M5;
input int AM_ATR_LookbackDays = 60;
input double AM_MinATRPercentile = 70.0;
input bool AM_NewsRelevance_Enable = true;
// Portfolio Manager (PM)
input bool PM_Enable = true;
input double PM_MaxGroupRiskPct = 1.50;
input bool PM_GroupByNewsCurrency = true;
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
