An on-chart XAUUSD/Gold dashboard for MetaTrader 5 focused on learning, observation, and fast market context. It does not open or close trades, manage positions, or send signals. All values should be treated as informational market data.
The panel aggregates standard platform indicators and symbol info into a compact view: live spread (points), H1 ATR volatility, H1 EMA trend bias, H4 EMA trend filter, H1 RSI state, daily range (D1 high-low), a basic session label, and optional standard/cent account text detection. Three visual themes and a configurable refresh timer are included.
Usage is limited to attaching the indicator to an XAUUSD chart; it can be viewed on any timeframe since it reads H1/H4 internally. Parameters cover panel placement, ATR/EMA/RSI periods, low/high ATR thresholds, and a spread warning level. Educational utility only; no forecast...
π Read | Freelance | @mql5dev
The panel aggregates standard platform indicators and symbol info into a compact view: live spread (points), H1 ATR volatility, H1 EMA trend bias, H4 EMA trend filter, H1 RSI state, daily range (D1 high-low), a basic session label, and optional standard/cent account text detection. Three visual themes and a configurable refresh timer are included.
Usage is limited to attaching the indicator to an XAUUSD chart; it can be viewed on any timeframe since it reads H1/H4 internally. Parameters cover panel placement, ATR/EMA/RSI periods, low/high ATR thresholds, and a spread warning level. Educational utility only; no forecast...
π Read | Freelance | @mql5dev
β€43π24π2
A lightweight chart indicator displays a configurable info panel with spread statistics updated on every tick. The panel shows current spread in points and pips, plus session minimum, session maximum, and a running arithmetic mean since attachment.
Current spread output switches between two user-defined colors based on a wide-spread threshold in points. This supports quick identification of elevated execution costs during events such as session opens, scheduled news, or low-liquidity windows.
Configuration includes normal and wide colors, threshold level, font size, and X/Y offsets for placement. Implementation uses OBJ_LABEL only and does not draw indicator buffers, keeping the price chart unchanged. Statistics reset on reattach or terminal restart, and the tool works across all symbols and timeframes.
π Read | AlgoBook | @mql5dev
Current spread output switches between two user-defined colors based on a wide-spread threshold in points. This supports quick identification of elevated execution costs during events such as session opens, scheduled news, or low-liquidity windows.
Configuration includes normal and wide colors, threshold level, font size, and X/Y offsets for placement. Implementation uses OBJ_LABEL only and does not draw indicator buffers, keeping the price chart unchanged. Statistics reset on reattach or terminal restart, and the tool works across all symbols and timeframes.
π Read | AlgoBook | @mql5dev
β€69π8π3π3
A MetaTrader 4 release is available for the previously published MetaTrader 5 implementation of the Nadaraya-Watson estimator.
The MT4 version mirrors the MT5 logic, focusing on kernel-based smoothing for price series and producing the same type of output expected from the original indicator.
Recommendations remain unchanged from the MT5 release, including the same usage conditions, parameter considerations, and limits noted in the prior publication.
π Read | NeuroBook | @mql5dev
The MT4 version mirrors the MT5 logic, focusing on kernel-based smoothing for price series and producing the same type of output expected from the original indicator.
Recommendations remain unchanged from the MT5 release, including the same usage conditions, parameter considerations, and limits noted in the prior publication.
π Read | NeuroBook | @mql5dev
β€33π19π5π₯4
The article contrasts βstaticβ MT5 indicators built with compilation directives versus βdynamicβ ones configured at runtime through standard library calls. Removing directive-based plot definitions compiles but produces no output until buffers, plots, and color palettes are explicitly set in OnInit.
A key takeaway: runtime configuration enables changing visual behavior without recompiling, but it can hide options in the indicator dialog until after the first attach, and user color changes may reset when the chart is rebuilt (e.g., timeframe change).
The approach becomes practical when an indicator must adapt to chart modes. By reading the current mode via ChartGetInteger (ENUM_CHART_MODE), the code can switch drawing logic so Inside Bar rendering matches candles, bars, or line charts, improving robustness across chart types.
π Read | Docs | @mql5dev
A key takeaway: runtime configuration enables changing visual behavior without recompiling, but it can hide options in the indicator dialog until after the first attach, and user color changes may reset when the chart is rebuilt (e.g., timeframe change).
The approach becomes practical when an indicator must adapt to chart modes. By reading the current mode via ChartGetInteger (ENUM_CHART_MODE), the code can switch drawing logic so Inside Bar rendering matches candles, bars, or line charts, improving robustness across chart types.
π Read | Docs | @mql5dev
β€29π13π2
This part of the market simulation series shifts from basic SELECT queries to the core of relational design: primary and foreign keys, used to preserve data integrity and prevent duplicate or inconsistent records.
It also recommends moving beyond MetaEditorβs minimal SQLite support when learning database concepts, using DB Browser for SQLite to edit, save, and run SQL scripts in a database-focused environment.
The article ties SQL back to algorithmic trading infrastructure: MT5 tools can reach databases over sockets, enabling scalable data flows between terminals, Excel, and server-hosted SQL. The key takeaway is to rely on SQL and proper schema constraints instead of reinventing database behavior in code, keeping systems reusable across applications.
π Read | Calendar | @mql5dev
It also recommends moving beyond MetaEditorβs minimal SQLite support when learning database concepts, using DB Browser for SQLite to edit, save, and run SQL scripts in a database-focused environment.
The article ties SQL back to algorithmic trading infrastructure: MT5 tools can reach databases over sockets, enabling scalable data flows between terminals, Excel, and server-hosted SQL. The key takeaway is to rely on SQL and proper schema constraints instead of reinventing database behavior in code, keeping systems reusable across applications.
π Read | Calendar | @mql5dev
β€30π10π₯5π2
DEA (Dolphin Echolocation Algorithm) is a population-based optimizer aimed at trading-robot parameter tuning. Agents evaluate candidates, broadcast influence within an effective radius Re, and build an accumulated fitness (AF) prospectivity map. PP (predetermined probability) increases over epochs using Power to shift from wider sampling to stronger reuse of high-quality regions.
A key detail is AF reset for the current best location, which reduces early collapse into a single point and keeps neighborhood probing active. Re controls locality: small Re tightens search, mid values balance, large Re spreads influence but reduces precision.
Implementation notes cover S_Alternative and S_Coordinate storage, plus a DEA class with Init/Moving/Revision and internal routines for PP, AF, best-location reset, and next-location selection. Memory cost scales with...
π Read | Freelance | @mql5dev
A key detail is AF reset for the current best location, which reduces early collapse into a single point and keeps neighborhood probing active. Re controls locality: small Re tightens search, mid values balance, large Re spreads influence but reduces precision.
Implementation notes cover S_Alternative and S_Coordinate storage, plus a DEA class with Init/Moving/Revision and internal routines for PP, AF, best-location reset, and next-location selection. Memory cost scales with...
π Read | Freelance | @mql5dev
β€59π11π6π―5β4π₯3π2
Nadaraya and Watson (1964) proposed estimating values as a locally weighted average using a kernel as the weighting function.
This approach produces a non-causal, recalculating smoothed series. The output can be treated as an estimate of the underlying trend component, not as a forward-looking projection.
No extrapolation is applied, specifically to avoid misinterpretation as predictive signaling. The implementation follows prior work by luxAlgo adapted across trading platforms.
Operational guidance: use for discretionary assessment only. Avoid using the output as a trigger in any automated or rule-based signaling mode.
π Read | Forum | @mql5dev
This approach produces a non-causal, recalculating smoothed series. The output can be treated as an estimate of the underlying trend component, not as a forward-looking projection.
No extrapolation is applied, specifically to avoid misinterpretation as predictive signaling. The implementation follows prior work by luxAlgo adapted across trading platforms.
Operational guidance: use for discretionary assessment only. Avoid using the output as a trigger in any automated or rule-based signaling mode.
π Read | Forum | @mql5dev
β€41π12π2β‘1
Algorithmic execution by large participants can create time gaps: price crosses a zone fast enough that the chart shows minimal time-in-zone and low follow-through activity.
A MetaTrader 5 indicator concept formalizes this via a volume-based impact coefficient (VIC), emphasizing high volume plus short traversal time. Detection uses an adaptive price grid, zone forensics over historical bars, and strict sufficiency checks on absence duration, max stay time, speed, and volume impact.
Zones are tracked with dynamic βmemory strengthβ using decay plus session cyclicality, and marked closed when fully filled. Suggested tuning differs by asset class: FX lower thresholds, stocks session-aware, crypto higher thresholds with smaller minimum bars. Signals include boundary rebounds, full fills, and failed fill reversals.
π Read | Freelance | @mql5dev
A MetaTrader 5 indicator concept formalizes this via a volume-based impact coefficient (VIC), emphasizing high volume plus short traversal time. Detection uses an adaptive price grid, zone forensics over historical bars, and strict sufficiency checks on absence duration, max stay time, speed, and volume impact.
Zones are tracked with dynamic βmemory strengthβ using decay plus session cyclicality, and marked closed when fully filled. Suggested tuning differs by asset class: FX lower thresholds, stocks session-aware, crypto higher thresholds with smaller minimum bars. Signals include boundary rebounds, full fills, and failed fill reversals.
π Read | Freelance | @mql5dev
β€31π8π₯5π3
This article shows how to build a candle/bar counter in MT5 without harming terminal performance. The key is treating OnCalculate as a high-frequency event: it can fire on every tick, so detection of new bars must be constant-time and avoid unnecessary data access.
Instead of comparing datetime values from the Time[] series, the article favors using rates_total and prev_calculated to detect when a new bar appears. This integer-based check is simpler and faster, and it keeps indicators responsive even on volatile symbols.
It then shifts to chart objects: everything drawn is an object, either chart-coordinate or screen-coordinate based. A practical example uses an indicator to create and update a Linear Regression Channel by setting anchor points, and removes it on deinit. Updating the object on each recalculation produces a highly reactive, self-adjus...
π Read | Freelance | @mql5dev
Instead of comparing datetime values from the Time[] series, the article favors using rates_total and prev_calculated to detect when a new bar appears. This integer-based check is simpler and faster, and it keeps indicators responsive even on volatile symbols.
It then shifts to chart objects: everything drawn is an object, either chart-coordinate or screen-coordinate based. A practical example uses an indicator to create and update a Linear Regression Channel by setting anchor points, and removes it on deinit. Updating the object on each recalculation produces a highly reactive, self-adjus...
π Read | Freelance | @mql5dev
β€32π11π5
This article connects MT5 replication/simulation work to practical SQL use via SQLite, arguing that database features often replace large amounts of custom MQL5 state-handling code for orders and positions.
It contrasts SQLiteβs small set of storage classes with MySQL/PostgreSQLβs extensive type systems. The key takeaway is SQLiteβs flexible typing: columns donβt need rigid sizes, reducing schema maintenance while staying compatible with standard SQL patterns.
The example shifts from storing raw symbol strings in every quote record to a relational design using primary/foreign keys, so historical data remains stable even when tickers change. This lays groundwork for a command and order log suitable for strategy research and automation.
π Read | NeuroBook | @mql5dev
It contrasts SQLiteβs small set of storage classes with MySQL/PostgreSQLβs extensive type systems. The key takeaway is SQLiteβs flexible typing: columns donβt need rigid sizes, reducing schema maintenance while staying compatible with standard SQL patterns.
The example shifts from storing raw symbol strings in every quote record to a relational design using primary/foreign keys, so historical data remains stable even when tickers change. This lays groundwork for a command and order log suitable for strategy research and automation.
π Read | NeuroBook | @mql5dev
β€34π21π4β‘2π2
A new trading automation script supports creating multiple pending orders in a single run, focused on Buy Stop and Sell Stop entries. The order count is configurable, allowing batches such as 10 or 20 positions to be placed quickly and consistently.
Each pending order can be assigned risk controls and exit parameters at placement time, including Stop Loss and Take Profit levels. This reduces manual repetition, helps standardize execution rules, and limits configuration drift when placing multiple orders under the same setup.
Suitable for workflows that require scaling into breakouts with predefined targets and protective stops while maintaining consistent order parameters across a series.
π Read | CodeBase | @mql5dev
Each pending order can be assigned risk controls and exit parameters at placement time, including Stop Loss and Take Profit levels. This reduces manual repetition, helps standardize execution rules, and limits configuration drift when placing multiple orders under the same setup.
Suitable for workflows that require scaling into breakouts with predefined targets and protective stops while maintaining consistent order parameters across a series.
π Read | CodeBase | @mql5dev
β€31π15π4π3β2
IMR combines Hurst Exponent, ADX, and linear regression (slope + RΒ²) to help classify market phase and reduce timing errors in SMC/ICT execution. Many failures come from applying valid setups in the wrong regime: accumulation, distribution, or continuation.
RegScore expresses regression confidence: +100 or β100 implies a clean, disciplined move with RΒ² β₯ 0.60. Treat extremes as context, not entries. With Hurst < 0.45 (mean reversion), +100 flags upside overextension and a higher probability of retracement; β100 does the same for downside, favoring reversal frameworks such as ChoCh plus order blocks/breakers.
With Hurst > 0.55 (trend persistence), +100 supports continuation bias; avoid fading and wait for pullbacks into aligned order blocks. ADX adds trend strength: <25 weak conditions, 25β50 workable expansion, >50 often climactic pressure where reve...
π Read | Signals | @mql5dev
RegScore expresses regression confidence: +100 or β100 implies a clean, disciplined move with RΒ² β₯ 0.60. Treat extremes as context, not entries. With Hurst < 0.45 (mean reversion), +100 flags upside overextension and a higher probability of retracement; β100 does the same for downside, favoring reversal frameworks such as ChoCh plus order blocks/breakers.
With Hurst > 0.55 (trend persistence), +100 supports continuation bias; avoid fading and wait for pullbacks into aligned order blocks. ADX adds trend strength: <25 weak conditions, 25β50 workable expansion, >50 often climactic pressure where reve...
π Read | Signals | @mql5dev
β€34π9π3β2
Dynamic Fair Value Gap (FVG) is a custom MQL5 indicator built to detect unmitigated price imbalances based on a 3-candle pattern. It flags bullish gaps between Candle 1 High and Candle 3 Low, and bearish gaps between Candle 1 Low and Candle 3 High.
Mitigated zones are removed automatically once touched by later price action, keeping only active FVG areas on the chart. While untouched, each zone extends forward by a configurable number of bars (default 18) and remains labeled for monitoring.
The tool also plots previous daily high and low as horizontal liquidity references, refreshed at each new trading day. Alerting supports terminal pop-ups, sounds, and push notifications on new FVG formation, with scan depth controlled via BarsToKeep (default 300).
π Read | AlgoBook | @mql5dev
Mitigated zones are removed automatically once touched by later price action, keeping only active FVG areas on the chart. While untouched, each zone extends forward by a configurable number of bars (default 18) and remains labeled for monitoring.
The tool also plots previous daily high and low as horizontal liquidity references, refreshed at each new trading day. Alerting supports terminal pop-ups, sounds, and push notifications on new FVG formation, with scan depth controlled via BarsToKeep (default 300).
π Read | AlgoBook | @mql5dev
β€38π10π3π2
Backtracking Search Algorithm (BSA) is an evolutionary optimizer for real-valued problems that adds a simple but effective idea: keep a historical population (oldP) alongside the current population (P), and use that βmemoryβ to guide exploration.
Each iteration optionally refreshes oldP from P with 50% probability, then shuffles it (FisherβYates) to avoid fixed pairings. Mutation generates one directional candidate per individual using M = P + F*(oldP - P), where F controls step amplitude. Crossover is driven by a binary mask: either mixed coordinates via mixrate or a minimal-change mode that alters only one coordinate.
A greedy second selection stage rolls back any trial that worsens fitness, making the method stable for tuning trading parameters. The MT5-style class design separates Init, Moving, and Revision, with explicit arrays for oldP/M/T, fitness snapsho...
π Read | VPS | @mql5dev
Each iteration optionally refreshes oldP from P with 50% probability, then shuffles it (FisherβYates) to avoid fixed pairings. Mutation generates one directional candidate per individual using M = P + F*(oldP - P), where F controls step amplitude. Crossover is driven by a binary mask: either mixed coordinates via mixrate or a minimal-change mode that alters only one coordinate.
A greedy second selection stage rolls back any trial that worsens fitness, making the method stable for tuning trading parameters. The MT5-style class design separates Init, Moving, and Revision, with explicit arrays for oldP/M/T, fitness snapsho...
π Read | VPS | @mql5dev
β€20π20π2
Seasonality can be quantified in MT5 by aggregating average returns across recurring time buckets: day-of-month (1β31), day-of-week (MonβSun), or hour-of-day (0β23). The output fits well in a separate indicator window to keep the main chart clean.
Implementation in MQL5 typically uses three buffers: a histogram for average returns per bucket, a line for the current/next periods, and arrow points for the next two expected values. Inputs control bucket type, lookback bars, percent vs points, positive-only filtering, and optional forecast rendering.
Core logic sits in OnCalculate: compute per-bar returns, map each bar time to a bucket via GetPeriodIndex, maintain sums and counts, then normalize to averages. Forecasting cycles buckets with modular arithmetic, and on-chart text can report lookback size, next periods, and best/worst buckets.
π Read | CodeBase | @mql5dev
Implementation in MQL5 typically uses three buffers: a histogram for average returns per bucket, a line for the current/next periods, and arrow points for the next two expected values. Inputs control bucket type, lookback bars, percent vs points, positive-only filtering, and optional forecast rendering.
Core logic sits in OnCalculate: compute per-bar returns, map each bar time to a bucket via GetPeriodIndex, maintain sums and counts, then normalize to averages. Forecasting cycles buckets with modular arithmetic, and on-chart text can report lookback size, next periods, and best/worst buckets.
π Read | CodeBase | @mql5dev
β€40π10π3π1π1
Wyckoff remains one of the clearer cause-and-effect models for institutional supply and demand, but automation usually fails on context. Single events are easy to detect; the difficulty is validating the sequence that gives those events meaning.
An MQL5 EA can enforce that sequence with a finite state machine on H4: range after a prior trend, then spring or upthrust on low relative tick volume, then SOS or SOW on high relative volume, then LPS or LPSY pullback entries with ATR-based stops.
Tick volume is usable as a proxy because the logic relies on ratios versus a rolling baseline computed from the detected range, not absolute volume.
π Read | Docs | @mql5dev
An MQL5 EA can enforce that sequence with a finite state machine on H4: range after a prior trend, then spring or upthrust on low relative tick volume, then SOS or SOW on high relative volume, then LPS or LPSY pullback entries with ATR-based stops.
Tick volume is usable as a proxy because the logic relies on ratios versus a rolling baseline computed from the detected range, not absolute volume.
π Read | Docs | @mql5dev
β€35π11π2
This piece connects Python-side model validation to tick-accurate execution testing in MetaTrader 5, so edge is judged after spread, slippage, commission, and swap. The workflow exports a trained ONNX pipeline, probability calibrator parameters, feature ordering, and CPCV metadata, then runs each combinatorial path as a separate Strategy Tester agent to produce real-fill equity curves.
Key engineering constraints are made explicit: the StandardScaler is embedded in the ONNX graph, so MQL5 must feed raw features only; feature order must exactly match the recorded input tensor layout; and features must be computed on the last closed bar to avoid look-ahead.
CPCV logic stays in Python: it precomputes one timestamp mask per path, while the EA does fast membership checks, runs OnnxRun with correct (1, n_features) shape, applies isotonic or Platt calibration...
π Read | Forum | @mql5dev
Key engineering constraints are made explicit: the StandardScaler is embedded in the ONNX graph, so MQL5 must feed raw features only; feature order must exactly match the recorded input tensor layout; and features must be computed on the last closed bar to avoid look-ahead.
CPCV logic stays in Python: it precomputes one timestamp mask per path, while the EA does fast membership checks, runs OnnxRun with correct (1, n_features) shape, applies isotonic or Platt calibration...
π Read | Forum | @mql5dev
π18β€17β‘1π1
MQL5 chart tools hit a ceiling when they rely on native objects. Placement is simple, but post-placement interaction is constrained: limited hit-testing, no custom handle drag, no rubber-band preview, and no precise deletion.
A canvas-based architecture replaces terminal-managed objects with a bitmap layer and an internal array of drawing structs. Redraw iterates the array and renders pixel-level primitives, enabling selection states, hover feedback, dragging, handle suppression during edits, and consistent styling.
Core components include ARGB opacity helpers, Porter-Duff pixel blending, anti-aliased thick lines with subpixel coverage, and scalable dash patterns. New circle primitives support filled handles and borders. Line tools render strokes first, then conditional handles with hover halos, while hit-testing covers segments and info panels.
π Read | Forum | @mql5dev
A canvas-based architecture replaces terminal-managed objects with a bitmap layer and an internal array of drawing structs. Redraw iterates the array and renders pixel-level primitives, enabling selection states, hover feedback, dragging, handle suppression during edits, and consistent styling.
Core components include ARGB opacity helpers, Porter-Duff pixel blending, anti-aliased thick lines with subpixel coverage, and scalable dash patterns. New circle primitives support filled handles and borders. Line tools render strokes first, then conditional handles with hover halos, while hit-testing covers segments and info panels.
π Read | Forum | @mql5dev
β€15π13π3π1
Value Charts and Price Action Profile, published in 2002 by Helweg and Stendhal, added volatility-adaptive context to traditional charts. In 2010, Abrams and Walker applied both to MR Swing, a mean-reversion swing system that reported strong equity results and portfolio-level drawdown reduction.
MR Swing is notable for asymmetric bull/bear logic and volatility-normalized signals. A 200-day SMA-based Hysteresis Channel classifies regime using a high/low buffer and increment-only updates to reduce whipsaws.
Bull entries use Value Charts on lows with a 5-bar floating axis and alpha 0.16, triggering at -7.5. Bear signals use DVO with Percent-Rank over 252 days as a Price Action Profile equivalent. Bull exits use SVAPO exhaustion with dynamic bands and limit orders.
π Read | Freelance | @mql5dev
MR Swing is notable for asymmetric bull/bear logic and volatility-normalized signals. A 200-day SMA-based Hysteresis Channel classifies regime using a high/low buffer and increment-only updates to reduce whipsaws.
Bull entries use Value Charts on lows with a 5-bar floating axis and alpha 0.16, triggering at -7.5. Bear signals use DVO with Percent-Rank over 252 days as a Price Action Profile equivalent. Bull exits use SVAPO exhaustion with dynamic bands and limit orders.
π Read | Freelance | @mql5dev
β€44π10π3π―3β‘2
An optimized ZigZag implementation is available as a drop-in replacement for the legacy Zigzag.mq4 used since MT3-era MQL2. The goal is to reduce overhead when EAs rely on ZigZag values during strategy testing and live tick processing.
On the first run, the indicator computes the full visible history. On subsequent updates, it avoids full recalculation by locating the third extremum from the current bar and restarting from that point. Recalculation depth can be adjusted via the level parameter; setting it to 2 forces a restart from the second extremum.
External input names are preserved for compatibility. Minute-timeframe βfloatingβ extremums have also been removed to stabilize plotted turning points.
π Read | Forum | @mql5dev
On the first run, the indicator computes the full visible history. On subsequent updates, it avoids full recalculation by locating the third extremum from the current bar and restarting from that point. Recalculation depth can be adjusted via the level parameter; setting it to 2 forces a restart from the second extremum.
External input names are preserved for compatibility. Minute-timeframe βfloatingβ extremums have also been removed to stabilize plotted turning points.
π Read | Forum | @mql5dev
β€20π9π2