This article upgrades a visual MT5 flag-pattern detector into a reliable signal source for automated trading. Chart objects are kept for human readability, but breakouts are published through indicator buffers so an EA can consume them deterministically via CopyBuffer().
The indicator outputs three buffers: buy, sell, and pole height. Buy/sell stay EMPTY_VALUE until a candle closes beyond the flag boundary; the pole-height buffer records the measured structure size on the same bar for proportional SL/TP sizing. Signals are written only once, using prev_calculated logic to avoid repainting and to keep backtests consistent.
The EA becomes a thin execution layer: load the indicator with iCustom(), read the latest closed bar on new-bar events, apply optional trend/volume filters, and place trades once per confirmed signal. A one-time startup scan capt...
๐ Read | Quotes | @mql5dev
#MQL5 #MT5 #AlgoTrading
The indicator outputs three buffers: buy, sell, and pole height. Buy/sell stay EMPTY_VALUE until a candle closes beyond the flag boundary; the pole-height buffer records the measured structure size on the same bar for proportional SL/TP sizing. Signals are written only once, using prev_calculated logic to avoid repainting and to keep backtests consistent.
The EA becomes a thin execution layer: load the indicator with iCustom(), read the latest closed bar on new-bar events, apply optional trend/volume filters, and place trades once per confirmed signal. A one-time startup scan capt...
๐ Read | Quotes | @mql5dev
#MQL5 #MT5 #AlgoTrading
โค27๐8โก2๐1
This article replaces a compile-time CSV and in-memory state with a single SQLite database shared by live charts and Strategy Tester agents via the terminal common folder. Live mode upserts calendar events from the MQL5 Calendar API into disk, while the tester loads the same events by time-window queries with no mode-specific code paths.
The schema uses an events table keyed by calendar value_id (so revisions overwrite cleanly) and a triggered table keyed by event_id to persist trade deduplication across restarts. Time-based indexing accelerates window queries; old rows are pruned to keep the store bounded.
Historical ranges can be downloaded on demand without recompiling, with a canvas progress bar showing population status. On startup, the EA restores triggered IDs from the last 24 hours to prevent duplicate orders after terminal reboots.
๐ Read | NeuroBook | @mql5dev
#MQL5 #MT5 #AlgoTrading
The schema uses an events table keyed by calendar value_id (so revisions overwrite cleanly) and a triggered table keyed by event_id to persist trade deduplication across restarts. Time-based indexing accelerates window queries; old rows are pruned to keep the store bounded.
Historical ranges can be downloaded on demand without recompiling, with a canvas progress bar showing population status. On startup, the EA restores triggered IDs from the last 24 hours to prevent duplicate orders after terminal reboots.
๐ Read | NeuroBook | @mql5dev
#MQL5 #MT5 #AlgoTrading
โค36๐8๐ฏ3
Markets behave less like Gaussian random walks and more like noisy fractal systems: heavy tails, volatility clustering, and scale invariance make linear risk metrics unreliable. Fractal tools model this โwild randomnessโ and explain why similar structures appear across timeframes.
The Hurst exponent quantifies long-memory (trend persistence vs mean reversion) and links directly to fractal dimension, giving a practical switch for trend-following or counter-trend logic. Multifractal methods (MF-DFA and variants) extend this by measuring how small and large moves scale differently; spectrum width can proxy complexity and tail risk.
Chaos and fractal market ideas frame prices as constrained by attractor-like regimes, with structure breaking during crises. For MT5 developers, these metrics can drive regime filters, adaptive stops/position sizing, and ML f...
๐ Read | VPS | @mql5dev
#MQL5 #MT5 #Strategy
The Hurst exponent quantifies long-memory (trend persistence vs mean reversion) and links directly to fractal dimension, giving a practical switch for trend-following or counter-trend logic. Multifractal methods (MF-DFA and variants) extend this by measuring how small and large moves scale differently; spectrum width can proxy complexity and tail risk.
Chaos and fractal market ideas frame prices as constrained by attractor-like regimes, with structure breaking during crises. For MT5 developers, these metrics can drive regime filters, adaptive stops/position sizing, and ML f...
๐ Read | VPS | @mql5dev
#MQL5 #MT5 #Strategy
โค20๐4๐2๐ฅ1
Part 3 extends the MT5 microstructure foundation with ARFIMA diagnostics by estimating the fractional differencing parameter d using the GewekeโPorterโHudak log-periodogram regression. This complements the Hurst exponent: H signals persistence direction, while d quantifies how much differencing is actually needed to reach stationarity.
Two additions to MicroStructure_Foundation.mqhโGPHEstimator() and PopulateARFIMAAnalysis()โcompute d from validated M1 log returns, store arfima_d and arfima_confidence, and cross-check consistency via H = d + 0.5. Disagreements beyond 0.1 are flagged to isolate short-range autocorrelation or session-mixing effects.
On 72 US100 M1 NY sessions, pooled d is ~0 (โ0.006) with near-zero regression fit, implying standard log returns are the right default. Session-level d varies widely, enabling regime tagging for trend, mean...
๐ Read | NeuroBook | @mql5dev
Two additions to MicroStructure_Foundation.mqhโGPHEstimator() and PopulateARFIMAAnalysis()โcompute d from validated M1 log returns, store arfima_d and arfima_confidence, and cross-check consistency via H = d + 0.5. Disagreements beyond 0.1 are flagged to isolate short-range autocorrelation or session-mixing effects.
On 72 US100 M1 NY sessions, pooled d is ~0 (โ0.006) with near-zero regression fit, implying standard log returns are the right default. Session-level d varies widely, enabling regime tagging for trend, mean...
๐ Read | NeuroBook | @mql5dev
โค23๐9๐3
MetaTrader 5 lacks a built-in way to automatically detect broadening โmegaphoneโ formations, so the article builds an MQL5 indicator that turns the pattern into a repeatable, testable workflow.
The design starts with swing-high/low extraction over a configurable lookback window, using a confirmation depth to filter noise. Detected swings are then refined to true extremes within each leg, improving anchor accuracy before any lines are drawn.
Validation rejects patterns where candles close across either expanding trend line before the structure completes, and applies a proportional range cap (example: max 150%) to avoid distorted setups. After the 4th swing, the indicator waits for a close beyond the boundary to confirm breakout.
Trade levels are derived from geometry: SL at the structure midpoint near breakout, TP projected by the patternโs height, b...
๐ Read | Quotes | @mql5dev
The design starts with swing-high/low extraction over a configurable lookback window, using a confirmation depth to filter noise. Detected swings are then refined to true extremes within each leg, improving anchor accuracy before any lines are drawn.
Validation rejects patterns where candles close across either expanding trend line before the structure completes, and applies a proportional range cap (example: max 150%) to avoid distorted setups. After the 4th swing, the indicator waits for a close beyond the boundary to confirm breakout.
Trade levels are derived from geometry: SL at the structure midpoint near breakout, TP projected by the patternโs height, b...
๐ Read | Quotes | @mql5dev
โค26๐12๐4โก3๐ฅ2
The article shows how to convert BOS/CHOCH market-structure concepts into reliable MQL5 code, focusing on precise swing-high/low detection, break validation, and filtering conditions that reduce false signals.
The โMarket Structure Sentinelโ indicator runs event-driven: it processes only on new candles, checks closes beyond the active swing for BOS/CHOCH, then confirms new pivots using left/right bar comparisons. Trend state is derived from the latest valid swing pair, adapting to imperfect real markets instead of relying on a single swing type.
It also prioritizes clean chart UX: standardized enums/structures, reusable drawing utilities, midpoint time normalization for label placement, and a toggleable mini dashboard (double-click H/S). Initialization scans history via a single MqlRates array for faster synchronization and consistent startup context.
๐ Read | Forum | @mql5dev
The โMarket Structure Sentinelโ indicator runs event-driven: it processes only on new candles, checks closes beyond the active swing for BOS/CHOCH, then confirms new pivots using left/right bar comparisons. Trend state is derived from the latest valid swing pair, adapting to imperfect real markets instead of relying on a single swing type.
It also prioritizes clean chart UX: standardized enums/structures, reusable drawing utilities, midpoint time normalization for label placement, and a toggleable mini dashboard (double-click H/S). Initialization scans history via a single MqlRates array for faster synchronization and consistent startup context.
๐ Read | Forum | @mql5dev
โค44๐12๐3
Arithmetic volume profiles and common moving averages rely on arithmetic means. In markets with heavy-tailed volume, a single spike can dominate the window and keep levels biased long after order flow has moved on. That creates stale support and resistance zones that no longer reflect active liquidity.
Institutional tooling often uses harmonic math to estimate mass, density, and flow. Applying the harmonic mean to tick execution density produces a gravity-center line tied to where trading frequency actually balanced, with reduced sensitivity to outliers.
Typical components include a harmonic central tendency line, reversion targets when price deviates too far, and symmetric deviation bands derived from harmonic variance to mark zones where liquidity thins. Implementations usually optimize reciprocal operations (1/x) with vectorized arrays to minim...
๐ Read | NeuroBook | @mql5dev
Institutional tooling often uses harmonic math to estimate mass, density, and flow. Applying the harmonic mean to tick execution density produces a gravity-center line tied to where trading frequency actually balanced, with reduced sensitivity to outliers.
Typical components include a harmonic central tendency line, reversion targets when price deviates too far, and symmetric deviation bands derived from harmonic variance to mark zones where liquidity thins. Implementations usually optimize reciprocal operations (1/x) with vectorized arrays to minim...
๐ Read | NeuroBook | @mql5dev
โค26๐5๐4
Spread widening and negative swaps can quietly degrade PnL, especially around scheduled news volatility and rollover. A compact on-chart information panel keeps contract parameters visible without repeatedly opening the Market Watch symbol properties.
The dashboard shows the active symbol name, current spread in points, and swap values for long and short positions. Data refreshes on every tick, with an optional timer-based update cadence of once per second for steadier visibility during low activity.
Inputs support practical customization: InpTextColor sets font color for light or dark themes, InpFontSize adjusts readability on high-DPI displays, and InpCorner anchors the panel to any of the four chart corners.
Applicable across symbols including FX, metals, and crypto, and works on any timeframe.
๐ Read | Forum | @mql5dev
The dashboard shows the active symbol name, current spread in points, and swap values for long and short positions. Data refreshes on every tick, with an optional timer-based update cadence of once per second for steadier visibility during low activity.
Inputs support practical customization: InpTextColor sets font color for light or dark themes, InpFontSize adjusts readability on high-DPI displays, and InpCorner anchors the panel to any of the four chart corners.
Applicable across symbols including FX, metals, and crypto, and works on any timeframe.
๐ Read | Forum | @mql5dev
โค24๐7๐2
MQL5 news handling often defaults to either ignoring events or applying fixed time blocks. That misses unscheduled volatility and revisions, then backtests fail to match live execution due to spread and slippage shifts.
A news filter module can be built using only MetaTrader 5 calendar functions. It pauses trading ahead of high-impact events, resumes after a configurable delay, and can optionally reduce position size on event-heavy days instead of fully blocking.
The MT5 Calendar API exposes six functions, backed by MqlCalendarEvent and MqlCalendarValue. Core flow: fetch events by ISO country code, filter by importance, then pull scheduled timestamps via value history. The API is unavailable in Strategy Tester, so a companion logger generates a CSV calendar for test runs.
Integration is minimal: include the module, initialize once, then gate entry log...
๐ Read | AlgoBook | @mql5dev
A news filter module can be built using only MetaTrader 5 calendar functions. It pauses trading ahead of high-impact events, resumes after a configurable delay, and can optionally reduce position size on event-heavy days instead of fully blocking.
The MT5 Calendar API exposes six functions, backed by MqlCalendarEvent and MqlCalendarValue. Core flow: fetch events by ISO country code, filter by importance, then pull scheduled timestamps via value history. The API is unavailable in Strategy Tester, so a companion logger generates a CSV calendar for test runs.
Integration is minimal: include the module, initialize once, then gate entry log...
๐ Read | AlgoBook | @mql5dev
โค16๐15๐3
This build adds an ML filter to Smart Money Concepts in MT5, solving the real problem: too many OB/FVG/BOS signals and inconsistent manual filtering on fast markets like XAUUSD.
A Python pipeline pulls MT5 OHLCV, detects the same SMC events as the EA, labels outcomes via TP/SL simulation, and trains an XGBoost classifier. Signals become a 12-feature vector covering structure, ATR-normalized zone geometry, RSI/ADX, volatility, and session timing (sin/cos). The model is exported to ONNX and embedded as an EA resource, so it runs in the Strategy Tester without path dependencies.
On new bars the EA detects setups, scores them via ONNX, blocks low-confidence trades, and applies ATR-aware SL/TP plus tick-driven trailing. A chart panel explains signal type, AI confidence, and derived trend strength for auditability.
๐ Read | NeuroBook | @mql5dev
A Python pipeline pulls MT5 OHLCV, detects the same SMC events as the EA, labels outcomes via TP/SL simulation, and trains an XGBoost classifier. Signals become a 12-feature vector covering structure, ATR-normalized zone geometry, RSI/ADX, volatility, and session timing (sin/cos). The model is exported to ONNX and embedded as an EA resource, so it runs in the Strategy Tester without path dependencies.
On new bars the EA detects setups, scores them via ONNX, blocks low-confidence trades, and applies ATR-aware SL/TP plus tick-driven trailing. A chart panel explains signal type, AI confidence, and derived trend strength for auditability.
๐ Read | NeuroBook | @mql5dev
โค24๐5๐ฅ2๐2
A dynamic Single-Timeframe liquidity sweep indicator is built in MQL5 to detect stop-hunt style moves without relying on fixed time windows or simple wick checks. It targets buy-side and sell-side liquidity around swing highs/lows and ranges, where clustered orders often sit.
Detection combines wick-sweep rejection with a dual-candle model: a breach followed by a reclaim candle that must form an engulfing pattern. Wick-ratio validation filters weak probes, while โone sweep per levelโ plus post-violation invalidation reduces duplicates and stale signals.
Implementation focuses on robust state management: a struct for sweep candidates, arrays for swept/violated levels, swing scanning via configurable left-right bars, new-candle execution to cut load, and chart objects for clear visualization.
๐ Read | NeuroBook | @mql5dev
Detection combines wick-sweep rejection with a dual-candle model: a breach followed by a reclaim candle that must form an engulfing pattern. Wick-ratio validation filters weak probes, while โone sweep per levelโ plus post-violation invalidation reduces duplicates and stale signals.
Implementation focuses on robust state management: a struct for sweep candidates, arrays for swept/violated levels, swing scanning via configurable left-right bars, new-candle execution to cut load, and chart objects for clear visualization.
๐ Read | NeuroBook | @mql5dev
โค19๐4๐2
CMA-ES remains a practical choice for tuning trading robot parameters on ill-conditioned objective functions. Core sampling follows x_k ~ N(m, ฯยฒC), where m is the current mean, ฯ is global step size, and C captures local geometry via covariance adaptation.
A variant replaces the Gaussian with a power distribution: x_k ~ PowerDist(m, ฯยฒC). This increases tail probability for larger jumps while keeping covariance learning and step-size control.
Key mechanics include two evolutionary paths (pc for covariance, ps for step size), plus rank-one and rank-ฮผ covariance updates driven by maximum-likelihood estimation. A Heaviside-style hsig gate reduces rank-one influence during stagnation.
Implementation notes: O(nยฒ) memory for C and O(nยณ) eigendecomposition for B,D, with periodic eigen updates. Class design separates Init, Moving (offspring generation via B*D*z), an...
๐ Read | Signals | @mql5dev
A variant replaces the Gaussian with a power distribution: x_k ~ PowerDist(m, ฯยฒC). This increases tail probability for larger jumps while keeping covariance learning and step-size control.
Key mechanics include two evolutionary paths (pc for covariance, ps for step size), plus rank-one and rank-ฮผ covariance updates driven by maximum-likelihood estimation. A Heaviside-style hsig gate reduces rank-one influence during stagnation.
Implementation notes: O(nยฒ) memory for C and O(nยณ) eigendecomposition for B,D, with periodic eigen updates. Class design separates Init, Moving (offspring generation via B*D*z), an...
๐ Read | Signals | @mql5dev
โค22๐5โก2๐2
Media is too big
VIEW IN TELEGRAM
Chart trading in MetaTrader 5 for iOS has been completely redesigned. You now have access to a full-featured trading dialog that combines quick operations, detailed order configuration, and position management.
The trading panel opens directly over the chart and supports multiple modes. In compact mode, it provides quick actions such as switching trade operation types, managing volume, and setting stop levels. The expanded view offers advanced trading parameters and a tick chart for precise price control.
The new chart trading experience in MetaTrader 5 for iOS makes order management faster, more intuitive, and more precise โ from instant operations to advanced risk management.
Discuss the video:
๐ MQL5.community for traders
๐ MetaQuotes official YouTube channel
The trading panel opens directly over the chart and supports multiple modes. In compact mode, it provides quick actions such as switching trade operation types, managing volume, and setting stop levels. The expanded view offers advanced trading parameters and a tick chart for precise price control.
The new chart trading experience in MetaTrader 5 for iOS makes order management faster, more intuitive, and more precise โ from instant operations to advanced risk management.
Discuss the video:
๐ MQL5.community for traders
๐ MetaQuotes official YouTube channel
โค31๐11๐2๐2โก1
Triple-barrier labeling often hard-codes min_ret (0.5โ1.0%) or assumes a legacy spread. If min_ret is below true round-trip cost, the pipeline labels cost-driven noise as signal. The resulting dataset inflates apparent edge, and models fit the labeling artifact instead of market structure.
TransactionCostCollector.mq5 automates transaction-cost collection per symbol. It samples historical spread via CopySpread() over a configurable bar window, reads swap rates and swap mode (plus triple-swap weekday), and captures commission diagnostics where direct per-lot commission is not available. Output is a structured CSV with sections for symbol properties, swap, commission notes, spread summary percentiles, and spread-by-hour means (UTC) to surface session effects.
A companion Python class TransactionCostModel converts costs to fractional returns and compu...
๐ Read | Signals | @mql5dev
TransactionCostCollector.mq5 automates transaction-cost collection per symbol. It samples historical spread via CopySpread() over a configurable bar window, reads swap rates and swap mode (plus triple-swap weekday), and captures commission diagnostics where direct per-lot commission is not available. Output is a structured CSV with sections for symbol properties, swap, commission notes, spread summary percentiles, and spread-by-hour means (UTC) to surface session effects.
A companion Python class TransactionCostModel converts costs to fractional returns and compu...
๐ Read | Signals | @mql5dev
โค19๐5๐2
RSI breaks down in strong trends because it keeps firing mean-reversion entries when โoversoldโ is structural, not temporary. On EURUSD H1, the 2022 downtrend turned repeated oversold crossovers into compounding losses and deep drawdown.
The article applies Lรณpez de Pradoโs meta-labeling: RSI stays as the side selector, while a Random Forest judges each signal using 27 context features at the signal bar. Trades are labeled with triple-barrier outcomes, filtered by a probability threshold, then sized proportionally to model confidence.
Key engineering details: trend/volatility context (ADX, ATR, stretch vs EMA50, distance to recent highs/lows) plus robust time encoding (sin/cos cycles and session volatility). Walk-forward is strict MT5 data with real spread costs.
Even with below-chance classifier accuracy, filtering slashes exposure and drawdown; co...
๐ Read | Docs | @mql5dev
The article applies Lรณpez de Pradoโs meta-labeling: RSI stays as the side selector, while a Random Forest judges each signal using 27 context features at the signal bar. Trades are labeled with triple-barrier outcomes, filtered by a probability threshold, then sized proportionally to model confidence.
Key engineering details: trend/volatility context (ADX, ATR, stretch vs EMA50, distance to recent highs/lows) plus robust time encoding (sin/cos cycles and session volatility). Walk-forward is strict MT5 data with real spread costs.
Even with below-chance classifier accuracy, filtering slashes exposure and drawdown; co...
๐ Read | Docs | @mql5dev
๐13โค8๐3
Joint Recurrence Quantification Analysis (JRQA) extends RQA/CRQA by measuring synchronized recurrence. A joint recurrence at (i,j) requires X(i) close to X(j) and Y(i) close to Y(j) with aligned indices, producing a square symmetric matrix with a defined main diagonal.
The implementation adds CJRQAMatrix, CJRQAMetrics, and CJRQAWindow plus a CJRQA facade. CJRQAWindow runs rolling JRQA with OpenCL GPU acceleration and CPU fallback, and an indicator plots JRR, JDET, JLAM, JENTR, and JTREND in real time.
JRQA uses separate epsilons per series, or a shared epsilon after normalization. Key signals are JRR for simultaneous recurrence density, JDET for structured coupling, and JTREND for changes in synchronization over time.
๐ Read | Signals | @mql5dev
The implementation adds CJRQAMatrix, CJRQAMetrics, and CJRQAWindow plus a CJRQA facade. CJRQAWindow runs rolling JRQA with OpenCL GPU acceleration and CPU fallback, and an indicator plots JRR, JDET, JLAM, JENTR, and JTREND in real time.
JRQA uses separate epsilons per series, or a shared epsilon after normalization. Key signals are JRR for simultaneous recurrence density, JDET for structured coupling, and JTREND for changes in synchronization over time.
๐ Read | Signals | @mql5dev
โค16๐4๐2๐1
MetaTrader 5 EAs often keep critical trade logic only in runtime memory, so a VPS restart or terminal crash can erase virtual SL/TP, breakeven, trailing progress, and sync context while the broker-side position remains open.
The solution is a persistent trade-state architecture: continuously serialize the EAโs operational state into a local SQLite database, then rebuild the in-memory model on startup to restore continuity.
This part designs the foundation: an STradeState recovery model, EA lifecycle states (starting, recovering, running, safe mode), timer-driven background checks independent of ticks, and a database layer that opens/creates the DB, ensures a TradeState table exists, and safely closes the connection.
๐ Read | Quotes | @mql5dev
The solution is a persistent trade-state architecture: continuously serialize the EAโs operational state into a local SQLite database, then rebuild the in-memory model on startup to restore continuity.
This part designs the foundation: an STradeState recovery model, EA lifecycle states (starting, recovering, running, safe mode), timer-driven background checks independent of ticks, and a database layer that opens/creates the DB, ensures a TradeState table exists, and safely closes the connection.
๐ Read | Quotes | @mql5dev
โค16๐6
This article builds a practical pipeline for detecting self-similar (fractal/multifractal) structures in price series and turning them into tradable ML signals, using Python with deployment to MetaTrader 5 via ONNX.
Patterns are found by sliding a window across history and measuring Pearson correlation between the left half and a mirrored, sign-inverted right half to capture symmetry. Numba JIT accelerates the heavy loop, returning the best correlation and its window size per bar, with plotting tools to sanity-check top matches across multiple scales.
Trades are labeled from future outcomes only when correlation exceeds a threshold: high-symmetry segments get averaged buy/sell labels, while low-symmetry areas default to โno tradeโ. Two classifiers are trained: one for direction (buy vs sell) and a meta-model for participation. Tests on EURUSD H1 show str...
๐ Read | AppStore | @mql5dev
Patterns are found by sliding a window across history and measuring Pearson correlation between the left half and a mirrored, sign-inverted right half to capture symmetry. Numba JIT accelerates the heavy loop, returning the best correlation and its window size per bar, with plotting tools to sanity-check top matches across multiple scales.
Trades are labeled from future outcomes only when correlation exceeds a threshold: high-symmetry segments get averaged buy/sell labels, while low-symmetry areas default to โno tradeโ. Two classifiers are trained: one for direction (buy vs sell) and a meta-model for participation. Tests on EURUSD H1 show str...
๐ Read | AppStore | @mql5dev
๐11โค8โก3
Grey modeling (Deng Julong, 1982) is a time-series method designed for incomplete or noisy data. In trading use-cases it applies cumulative summation to convert non-stationary prices into a strictly increasing โgrey seriesโ, reducing short-term noise as the window grows.
A common setup is GM(1,1): fit a linear relationship on the grey series, often with a TheilโSen slope. Unlike SMA, results depend on price order, so trend direction impacts the estimate. Extensions include quadratic and power-law fits, enabling alternative moving averages and fast-reacting signals.
Derived indicators include Grey MA, Grey CCI (using a GM-based dispersion proxy), and Grey Bands. Example EAs use price-vs-indicator divergence, dual-Grey MA comparisons, and Grey CCI level/zero-cross rules, with parameter tuning required under volatility and regime shifts.
๐ Read | Quotes | @mql5dev
A common setup is GM(1,1): fit a linear relationship on the grey series, often with a TheilโSen slope. Unlike SMA, results depend on price order, so trend direction impacts the estimate. Extensions include quadratic and power-law fits, enabling alternative moving averages and fast-reacting signals.
Derived indicators include Grey MA, Grey CCI (using a GM-based dispersion proxy), and Grey Bands. Example EAs use price-vs-indicator divergence, dual-Grey MA comparisons, and Grey CCI level/zero-cross rules, with parameter tuning required under volatility and regime shifts.
๐ Read | Quotes | @mql5dev
โค24๐11๐พ4
Runs bars complete the AFML Chapter 1 bar set by capturing dominant-side activity rather than net order-flow. Unlike imbalance bars that close on a signed cumulative threshold, runs bars track buy and sell contributions separately and close when the larger side exceeds its target, making them robust to choppy, alternating flow where net imbalance stays near zero.
Python extends make_bars() with tick/volume/dollar runs bars using the same tick rule and aggregation pipeline; only the boundary detector changes, expanding state to buy/sell accumulators plus per-side EWM expectations. Calibration also splits into separate buy and sell initial estimates to avoid biased thresholds.
MQL5 adds CRunsBar with tick-by-tick logic, parity-checked against Python on identical tick streams. Persistence is tightened by storing extra accumulators and the tick-ruleโs ...
๐ Read | Docs | @mql5dev
Python extends make_bars() with tick/volume/dollar runs bars using the same tick rule and aggregation pipeline; only the boundary detector changes, expanding state to buy/sell accumulators plus per-side EWM expectations. Calibration also splits into separate buy and sell initial estimates to avoid biased thresholds.
MQL5 adds CRunsBar with tick-by-tick logic, parity-checked against Python on identical tick streams. Persistence is tightened by storing extra accumulators and the tick-ruleโs ...
๐ Read | Docs | @mql5dev
โค20๐11๐2
MetaTrader 5 chart panels can host self-contained documentation rendered directly in-terminal, without external files. A canvas-based engine built on CCanvas supports tabs, scrollable rich text, inline images, theming, and supersampled anti-aliased UI elements.
Implementation details include embedding bitmaps via #resource, defining paragraph types, and parsing inline markup into styled runs. Rendering uses a two-pass alpha reconstruction method to preserve glyph transparency on any background, then blends via Porter-Duff over.
Images are loaded from resources, scaled with bicubic interpolation, and cached per panel width. Paragraphs are wrapped into encoded display lines with helpers to decode type, indent, and image slots during paint and scroll.
๐ Read | Quotes | @mql5dev
Implementation details include embedding bitmaps via #resource, defining paragraph types, and parsing inline markup into styled runs. Rendering uses a two-pass alpha reconstruction method to preserve glyph transparency on any background, then blends via Porter-Duff over.
Images are loaded from resources, scaled with bicubic interpolation, and cached per panel width. Paragraphs are wrapped into encoded display lines with helpers to decode type, indent, and image slots during paint and scroll.
๐ Read | Quotes | @mql5dev
๐13โค10๐2