Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Experts

GSLP Active Research EA for Gold - expert for MetaTrader 5

FXLINER; Smart Liquidity Hunter / FOREXREVIEW.TOP (MIT portions)
Published by:
Sondang Manik
Sondang Manik
Forex Trader | MetaTrader Tools & Broker Research
Forex trader based in Indonesia, with a focus on price action, market structure and disciplined risk management. I take a structured approach to chart analysis, position sizing and reviewing trading decisions.
Views:
24
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

GSLP Active Research EA - XAUUSD M5, three selectable strategy engines

Three Gold Entry Models. One Transparent Research EA.

GSLP Active Research EA is a free, source-code Expert Advisor for studying active gold trading in MetaTrader 5. It combines three selectable entry models, ATR-based protection, risk-based position sizing and a separate tester cost ledger.

The visible settings stay compact: 17 inputs, including three strategy controls. Select an entry model, set the stop distance and choose the reward-to-risk target. The source is available for inspection and reproducible experiments.

Research status: version 2.30 increased trading activity, but the historical experiments lost money after modeled costs. This is an educational research implementation. A profitable trading edge has not been demonstrated.

How the Three Entry Models Work

Model Trading idea
Trend Pullback A pullback and resumption within an EMA20/50 trend context.
Channel Breakout A completed-candle breakout of a 12-bar channel.
Sweep and Reclaim A sweep of a 12-bar channel boundary followed by a reclaim.

One model operates at a time. Signals use completed candles of the attached chart timeframe, with one decision per new bar. Accepted signals use market orders. The default stop is 1.5 ATR; take-profit distance is a multiple of the initial stop distance.

The historical research reference is XAUUSD M5 on a USD account. Version 2.31 uses the attached chart symbol and timeframe and account-currency money calculations. Other configurations can be tested, but the published gold results do not establish performance elsewhere. London and New York entry sessions include daylight-saving adjustments; session, spread and risk gates still apply. Broker clock settings must match the broker.

Execution and Risk Features

  • Risk-based sizing includes estimated costs and a margin-use check.
  • One position at a time, with stop-loss and take-profit submitted at entry.
  • Checks for spread, quote freshness, position ownership, recovery state and trade-server results.
  • A daily equity-loss lock blocks further entries at the configured threshold.
  • A compact dashboard displays operating conditions.
  • No martingale, grid or lot escalation after losses.

This active design disables daily/session trade-count limits, loss-streak limits, partial closing, breakeven and trailing. Calendar-news filtering and the fixed US macro pause are disabled.

The daily loss setting is an entry lock, not a guaranteed loss cap. It does not close an existing position or cap cumulative drawdown.

Inputs and Defaults

Input Default Purpose
ActiveSignalEngine Trend Pullback Select the entry model.
ActiveStopATR 1.50 ATR multiple for the stop distance.
FinalTargetR 1.50 Take-profit distance divided by initial stop distance.
RiskPercent 0.50 Equity percentage budget per entry, including estimated costs.
DailyLossLimitPct 3.00 Daily equity-loss threshold for blocking entries.
MaxSpreadPoints 100 Maximum spread in broker points.
BrokerClock BROKER_EU_DST Broker clock adjustment convention.
BrokerWinterUTCOffsetHours 2 Winter server-time offset from UTC.
MagicNumber 210931230 Identifier for this EA's activity.
EnableTrading true Enable the EA's trading logic.
AllowLiveTrading false Real-account trading disabled by default.
ShowDashboard true Show the chart dashboard.
EstCommissionPerLotRT 7.0 Estimated commission per lot, round turn, in account currency.
EstSlippagePointsPerSide 10 Estimated slippage per fill, in broker points.
TesterCostModel true Enable the supplemental tester cost ledger.
ResearchRunId active Label for research output.
VerboseLogs false Additional diagnostic logging.

Broker points are not necessarily pips. Review symbol digits, point value, contract specifications and costs before testing. EstCommissionPerLotRT is entered in account-currency units: 7 means USD 7 on a USD account or EUR 7 on a EUR account. It is not an automatic conversion of a fixed USD amount.

Published Experiment: Results and Limitations

The version 2.30 historical comparison used MetaQuotes-Demo XAUUSD M5, USD 10,000 starting balance, 1:100 leverage and 0.5% risk per entry. The tester interval was 1 June 2025 to 25 November 2026 (end date exclusive). MT5 reports recorded 100% real ticks.

These figures describe Trend Pullback with a 2R target. The source defaults to 1.5R.

Metric Pullback 2R result
Completed positions 1,800
Average entries per month 101.12
Native net result -USD 2,700.20
Net after supplemental cost model -USD 5,540.87
Profit factor after modeled costs 0.8756
Native equity drawdown 46.94%
EA-observed cost-model drawdown 64.74%

Main assumptions: USD 7 commission per lot round turn, 10 points of estimated slippage per fill and 50 ms native execution delay. The ledger supplements native costs and affects the EA's effective equity. It does not change native fill prices or debit the tester's actual balance. Native and modeled drawdown are shown separately.

All six strategy/target combinations lost money after modeled costs in training. The 2R pullback was retained only as a diagnostic candidate. The later historical period was not an untouched holdout. New forward results and independent three-broker validation are not available.

Version 2.31: Chart Compatibility

This update removes the Gold/M5 and USD-only initialization restrictions. The EA now uses its existing chart-based signal and execution logic on the selected symbol and timeframe. The dashboard shows the actual timeframe, and commission units are explicit. Signal rules, position sizing, stops, risk limits and all 17 input defaults are unchanged.

This is a compatibility correction. The historical performance figures above remain the version 2.30 gold research results. Initialization on a chart does not guarantee entries: history, session, spread, minimum-lot and other risk checks must still pass.

Installation and First Test

  1. Save GSLP_Active_Research_EA.mq5 in the terminal's MQL5\Experts folder.
  2. Open it in MetaEditor and compile. Custom modules are embedded; remaining includes use the standard MT5 library. The publication source compiled with 0 errors and 0 warnings.
  3. Open Strategy Tester; select XAUUSD M5 to reproduce the research reference, and real ticks where available. Select other symbols and timeframes only for separate compatibility or strategy experiments.
  4. Check the account currency, broker clock, spread and cost assumptions. Use a USD test account when reproducing the published gold results. The default target is 1.5R; use 2R when deliberately reproducing the diagnostic configuration.

Operational limitations: this version does not restore stop-loss or take-profit levels deleted after entry. Real-account trading is disabled by default; demo trading can operate when the EA and terminal trading permissions are enabled. Begin in Strategy Tester.

GSLP Active Research EA - official project logo

Round Number Reaction Map: Touch, Reject or Break at 00 and 50 Levels Round Number Reaction Map: Touch, Reject or Break at 00 and 50 Levels

Tracks every touch of a round "00" or "50" level and keeps a running scorecard of how often price rejects versus breaks through — then maps that history onto the levels nearest to current price.

Range Expansion Clock: When the Day's Range Actually Gets Made. Range Expansion Clock: When the Day's Range Actually Gets Made.

A per-hour profile of when the day's range actually gets built, plus a live readout of whether today is running ahead of or behind its usual pace

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.