ST-Expert reframes market forecasting as a regime-adaptive problem, addressing how correlation structures collapse during shocks like COVID-era shifts and policy cycles. Instead of fitting one stable dependency graph, it maintains multiple specialized โexpertsโ that each represent a distinct market behavior.
Regimes are extracted by splitting history into time intervals that maximize structural dissimilarity using Kendallโs tau, solved via dynamic programming (MSGD). Each interval trains an expert graphon: a probabilistic graph generator that models links between assets as connection probabilities, sampled with Gumbel-Softmax to reduce noisy edges.
Training uses episodic learning: one expert forecasts while a gating network learns to mix the remaining experts to reproduce the active regime. At inference, the gate weights experts from live signals,...
๐ Read | Calendar | @mql5dev
Regimes are extracted by splitting history into time intervals that maximize structural dissimilarity using Kendallโs tau, solved via dynamic programming (MSGD). Each interval trains an expert graphon: a probabilistic graph generator that models links between assets as connection probabilities, sampled with Gumbel-Softmax to reduce noisy edges.
Training uses episodic learning: one expert forecasts while a gating network learns to mix the remaining experts to reproduce the active regime. At inference, the gate weights experts from live signals,...
๐ Read | Calendar | @mql5dev
โค20๐4๐คฉ4๐2๐ฅ1๐1
This article builds an MQL5 dashboard to answer a practical question: how trade holding time relates to net profit in a specific account, beyond aggregate win rate.
A script extracts every closed trade, recovers true open time via position ID, computes duration in minutes, and calculates net P/L including swap and commission. Results are plotted as a CCanvas scatter plot (one dot per trade), colored by symbol, with a per-symbol summary table.
It overlays a least-squares regression (slope, intercept, Rยฒ) to quantify the overall duration-profit trend, and adds a simple short/medium/long bucket analysis to surface ranges that outperform even when a single line is misleading. A log-scaled duration axis keeps long-tail hold times readable while preserving โprofit per minuteโ on linear data.
๐ Read | NeuroBook | @mql5dev
A script extracts every closed trade, recovers true open time via position ID, computes duration in minutes, and calculates net P/L including swap and commission. Results are plotted as a CCanvas scatter plot (one dot per trade), colored by symbol, with a per-symbol summary table.
It overlays a least-squares regression (slope, intercept, Rยฒ) to quantify the overall duration-profit trend, and adds a simple short/medium/long bucket analysis to surface ranges that outperform even when a single line is misleading. A log-scaled duration axis keeps long-tail hold times readable while preserving โprofit per minuteโ on linear data.
๐ Read | NeuroBook | @mql5dev
โค13๐8๐ฅ2๐2๐คฉ1
APARCH support is added to the MQL5 volatility library as CAparchProcess under CVolatilityProcess, targeting cases where fixing the power term delta constrains estimation. Standard ARCH-family models predefine the exponent, which can mask better-fitting transformations and interact with asymmetry terms.
APARCH jointly estimates delta with omega, alpha, beta, and gamma. Delta governs whether dynamics align closer to squared or absolute residuals, consistent with the Taylor effect evidence that intermediate powers often retain stronger autocorrelation than squares. Gamma is bounded in (-1, 1) to keep the shifted shock term valid under fractional powers.
Implementation details include VOL_APARCH registration, new ArchParameters fields (aparch_delta, aparch_common_asym), a dedicated aparch_recursion() using raw residuals, repacking logic for fixed delta or...
๐ Read | AppStore | @mql5dev
APARCH jointly estimates delta with omega, alpha, beta, and gamma. Delta governs whether dynamics align closer to squared or absolute residuals, consistent with the Taylor effect evidence that intermediate powers often retain stronger autocorrelation than squares. Gamma is bounded in (-1, 1) to keep the shifted shock term valid under fractional powers.
Implementation details include VOL_APARCH registration, new ArchParameters fields (aparch_delta, aparch_common_asym), a dedicated aparch_recursion() using raw residuals, repacking logic for fixed delta or...
๐ Read | AppStore | @mql5dev
โค14๐คฉ9๐ฅ7๐4๐1๐1
Market behavior rarely fits a single variable; meaningful models require joint distributions that capture how multiple assets and factors move together.
The article lays out multivariate CDF/PDF mechanics, emphasizing that marginals are only projections: knowing each seriesโ standalone distribution cannot reconstruct dependence. Singular joint structures matter in practice because they reveal hard constraints, including deterministic links between instruments.
Dependence is formalized via factorization: independence holds only when the joint distribution equals the product of marginals, making conditional and unconditional distributions identical. This reframes independence as โcontext adds no information.โ
Conditional distributions lead directly to conditional expectation as the regression function. Many forecasting and ML models can be viewed as approxima...
๐ Read | Calendar | @mql5dev
The article lays out multivariate CDF/PDF mechanics, emphasizing that marginals are only projections: knowing each seriesโ standalone distribution cannot reconstruct dependence. Singular joint structures matter in practice because they reveal hard constraints, including deterministic links between instruments.
Dependence is formalized via factorization: independence holds only when the joint distribution equals the product of marginals, making conditional and unconditional distributions identical. This reframes independence as โcontext adds no information.โ
Conditional distributions lead directly to conditional expectation as the regression function. Many forecasting and ML models can be viewed as approxima...
๐ Read | Calendar | @mql5dev
โค14๐10๐ฅ8๐คฉ5๐1
Price windows can be compressed into fixed-length words to enable indexing and large-scale comparisons without revisiting raw series. SAX typically does this via z-normalization, PAA averages, and a shared Gaussian breakpoint table, but the bit budget wยทlog2(a) is rarely evaluated for efficiency.
SFA replaces PAA with low-frequency DFT coefficients and replaces the shared bin table with Multiple Coefficient Binning, learning per-position quantiles so each letter is used. This avoids collapsing low-variance coefficients into a single symbol and supports three bin modes, including a Gaussian ablation.
A full similarity harness compares MinDist, ApproxDist, and TrueDist, validating a sound lower bound with the required factor-of-two from conjugate symmetry. Results show SFA gains when the alphabet is deep over few positions, shrinking as bits spread across many po...
๐ Read | Freelance | @mql5dev
SFA replaces PAA with low-frequency DFT coefficients and replaces the shared bin table with Multiple Coefficient Binning, learning per-position quantiles so each letter is used. This avoids collapsing low-variance coefficients into a single symbol and supports three bin modes, including a Gaussian ablation.
A full similarity harness compares MinDist, ApproxDist, and TrueDist, validating a sound lower bound with the required factor-of-two from conjugate symmetry. Results show SFA gains when the alphabet is deep over few positions, shrinking as bits spread across many po...
๐ Read | Freelance | @mql5dev
โค17๐13๐ฅ12๐คฉ7โ1๐1
Impulse candles can be formalized instead of identified visually. This indicator flags momentum bars with fixed rules and draws arrows: green below bullish impulses and red above bearish impulses.
A bar is marked when its body is at least ATR(InpAtrPeriod) * InpImpulseAtrMult, the body is at least InpMinBodyRatio of the full range, and the close is located in the top or bottom segment of the bar based on InpMinCloseLoc. Optional confirmation requires tick volume to exceed InpVolumeMult times the average of the prior InpVolumePeriod bars.
Signals are stable after close because calculations use only the current bar. The active bar can repaint until it closes; automation should read shift 1. For EAs, buffer 0 is bullish and buffer 1 bearish; non-zero values hold the arrow price via iCustom/CopyBuffer.
Defaults target M1โM15 on volatile symbols. On H1+ ...
๐ Read | Freelance | @mql5dev
A bar is marked when its body is at least ATR(InpAtrPeriod) * InpImpulseAtrMult, the body is at least InpMinBodyRatio of the full range, and the close is located in the top or bottom segment of the bar based on InpMinCloseLoc. Optional confirmation requires tick volume to exceed InpVolumeMult times the average of the prior InpVolumePeriod bars.
Signals are stable after close because calculations use only the current bar. The active bar can repaint until it closes; automation should read shift 1. For EAs, buffer 0 is bullish and buffer 1 bearish; non-zero values hold the arrow price via iCustom/CopyBuffer.
Defaults target M1โM15 on volatile symbols. On H1+ ...
๐ Read | Freelance | @mql5dev
๐17โค13๐คฉ12๐ฅ8๐จโ๐ป3๐2
Stormbreaker ADX is an MT5 Expert Advisor that trades only on completed candles, combining a Supertrend trend filter with ADX strength and the +DI/โDI relationship. Signals are evaluated once per new H4 bar using the previous barโs indicator values, then orders are sent with an ATR-derived stop.
Default parameters use Supertrend ATR(10) factor 3.0, ADX(14) with entry at 23 and exit at 18. Buy requires bullish Supertrend, ADX โฅ 23, and +DI > โDI. Sell requires bearish Supertrend, ADX โฅ 23, and โDI > +DI. Exits occur on ADX < 18, Supertrend reversal, or an opposite qualifying signal; no fixed take-profit is used.
Position sizing targets 0.5% equity risk via OrderCalcProfit against the proposed stop, with volume rounded to broker steps and margin checked. Realized risk can differ due to spread, gaps, and execution. The source is provided for testing and modificatio...
๐ Read | NeuroBook | @mql5dev
Default parameters use Supertrend ATR(10) factor 3.0, ADX(14) with entry at 23 and exit at 18. Buy requires bullish Supertrend, ADX โฅ 23, and +DI > โDI. Sell requires bearish Supertrend, ADX โฅ 23, and โDI > +DI. Exits occur on ADX < 18, Supertrend reversal, or an opposite qualifying signal; no fixed take-profit is used.
Position sizing targets 0.5% equity risk via OrderCalcProfit against the proposed stop, with volume rounded to broker steps and margin checked. Realized risk can differ due to spread, gaps, and execution. The source is provided for testing and modificatio...
๐ Read | NeuroBook | @mql5dev
๐22โค21๐ฅ13๐คฉ8โก2๐1
The updated MT5 walk-forward auto-optimizer focuses on speed, multi-asset runs, and lower memory usage by removing mutex-based report generation and reducing expensive file operations.
A new date auto-complete window splits a chosen period into alternating historical and forward windows: historical ranges can overlap, forward ranges are continuous, and both use fixed step sizes. The calculation is isolated behind a singleton data model and event-driven updates, with tools to bulk-clear and reapply ranges via a sub-window wrapper.
ReportManager.dll adds a user-defined optimization coefficient, keeps compatibility with older reports, and extends sorting options. On the MQL5 side, robots can supply this coefficient via a callback passed into the uploader.
Report export is accelerated by buffering passes in C# and writing the full report in one shot, ...
๐ Read | Forum | @mql5dev
A new date auto-complete window splits a chosen period into alternating historical and forward windows: historical ranges can overlap, forward ranges are continuous, and both use fixed step sizes. The calculation is isolated behind a singleton data model and event-driven updates, with tools to bulk-clear and reapply ranges via a sub-window wrapper.
ReportManager.dll adds a user-defined optimization coefficient, keeps compatibility with older reports, and extends sorting options. On the MQL5 side, robots can supply this coefficient via a callback passed into the uploader.
Report export is accelerated by buffering passes in C# and writing the full report in one shot, ...
๐ Read | Forum | @mql5dev
โค56๐ฅ16๐14๐คฉ7โก3๐2๐1
Inversion Fair Value Gaps adds automated fair value gap detection with bar-close confirmation and no repaint behavior.
Gaps are tracked until a candle body closes through the zone, marking an inversion event. After inversion, the tool monitors for bounce reactions off the inverted area and generates signals.
Options include a midline, filled-zone removal, and adjustable color settings for zones and markers. Alert routing is supported via popup, sound, push notification, e-mail, and Telegram.
๐ Read | Docs | @mql5dev
Gaps are tracked until a candle body closes through the zone, marking an inversion event. After inversion, the tool monitors for bounce reactions off the inverted area and generates signals.
Options include a midline, filled-zone removal, and adjustable color settings for zones and markers. Alert routing is supported via popup, sound, push notification, e-mail, and Telegram.
๐ Read | Docs | @mql5dev
โค31๐16๐ฅ9๐คฉ9โ8๐จโ๐ป4๐2
Entry/exit points remain the core problem in algorithmic trading because recognizable patterns are usually visible only after the move. Trend and flat regimes are easy to label visually, but unreliable as predictive signals without quantified probabilities.
Price formation can be described via market vs limit orders. Limit orders populate the order book, market orders consume it. Spread is the gap between best bid/ask. Stop Loss/Take Profit placement creates distributed trigger levels that can amplify acceleration or reversal.
From a probabilistic view, discrete ticks imply a random process where expected payoff for random entries converges to zero, excluding spread. Expected value and profit factor can be expressed through conditional events: closing by stops vs signals, with nested probabilities per stop configuration.
Regime detection can be fr...
๐ Read | AlgoBook | @mql5dev
Price formation can be described via market vs limit orders. Limit orders populate the order book, market orders consume it. Spread is the gap between best bid/ask. Stop Loss/Take Profit placement creates distributed trigger levels that can amplify acceleration or reversal.
From a probabilistic view, discrete ticks imply a random process where expected payoff for random entries converges to zero, excluding spread. Expected value and profit factor can be expressed through conditional events: closing by stops vs signals, with nested probabilities per stop configuration.
Regime detection can be fr...
๐ Read | AlgoBook | @mql5dev
โค68๐23๐ฅ14๐คฉ10๐7๐5๐จโ๐ป1
ZoneUS30 is a simplified Expert Advisor focused on the US30 index and limited to SELL-only execution. The logic targets overextended upside moves where price may revert toward a prior reference area, triggering entries when internal conditions align.
The model combines mean-reversion behavior with the practical impact of swap. When a broker pays positive overnight swap on US30 shorts, holding positions across multiple sessions can add carry while waiting for a correction, without treating swap as the primary edge.
Trading is closer to swing or position holding than scalping, with some trades lasting days. The public build exposes only two inputs: lot size and the signal timeframe; remaining parameters are fixed.
Key risk: this is counter-trend selling in strong uptrends, with potential for extended adverse movement. Swap terms can change by broker rules an...
๐ Read | CodeBase | @mql5dev
The model combines mean-reversion behavior with the practical impact of swap. When a broker pays positive overnight swap on US30 shorts, holding positions across multiple sessions can add carry while waiting for a correction, without treating swap as the primary edge.
Trading is closer to swing or position holding than scalping, with some trades lasting days. The public build exposes only two inputs: lot size and the signal timeframe; remaining parameters are fixed.
Key risk: this is counter-trend selling in strong uptrends, with potential for extended adverse movement. Swap terms can change by broker rules an...
๐ Read | CodeBase | @mql5dev
โค31๐7๐ฅ5๐คฉ3โก2๐2
RSI Exhaustion Reversal - EURUSD is an open-source MQL5 Expert Advisor built for strategy research, historical testing, and education. It is restricted to the MetaTrader 5 Strategy Tester and will not place trades when attached to a regular chart. Full source code is included for inspection and modification.
The strategy targets EURUSD on M5 with SELL-only logic. It watches RSI(14) for an overbought exhaustion condition around level 65 during the 14:00โ18:00 broker/server-time session. Before entry, spread is checked against volatility using a max Spread/ATR ratio of 0.15.
Risk controls use ATR(14) to size SL and TP at 4x ATR, cap position duration to 96 candles, and enforce a single concurrent position. User inputs are limited to internal timeframe, fixed lot size, and magic number.
Backtests are recommended on real ticks where available; results vary by broke...
๐ Read | VPS | @mql5dev
The strategy targets EURUSD on M5 with SELL-only logic. It watches RSI(14) for an overbought exhaustion condition around level 65 during the 14:00โ18:00 broker/server-time session. Before entry, spread is checked against volatility using a max Spread/ATR ratio of 0.15.
Risk controls use ATR(14) to size SL and TP at 4x ATR, cap position duration to 96 candles, and enforce a single concurrent position. User inputs are limited to internal timeframe, fixed lot size, and magic number.
Backtests are recommended on real ticks where available; results vary by broke...
๐ Read | VPS | @mql5dev
โค16๐10๐ฅ4๐คฉ4๐1๐จโ๐ป1
An Adaptive Kalman Trend Filter indicator is designed to reduce short-term price noise and present a clearer view of the underlying trend. It applies Kalman-style state estimation to smooth input data while retaining enough responsiveness to reflect meaningful movement.
The adaptive component modifies the filterโs sensitivity as volatility and market structure change. In lower-noise phases it can prioritize smoothness; during faster moves it can react sooner to shifts in direction.
Typical usage focuses on trend bias, momentum change points, and timing confirmations when combined with risk rules and other signals. As with any filter, parameter selection and out-of-sample checks remain critical to avoid overfitting.
๐ Read | Signals | @mql5dev
The adaptive component modifies the filterโs sensitivity as volatility and market structure change. In lower-noise phases it can prioritize smoothness; during faster moves it can react sooner to shifts in direction.
Typical usage focuses on trend bias, momentum change points, and timing confirmations when combined with risk rules and other signals. As with any filter, parameter selection and out-of-sample checks remain critical to avoid overfitting.
๐ Read | Signals | @mql5dev
โค24๐ฅ5๐คฉ4๐2๐2๐จโ๐ป1
A specification panel reflects the brokerโs current contract report. Broker Contract Change Watch logs when selected contract properties differ from the last saved observation, with a baseline stored per account server, login, and chart symbol.
Watched fields include digits, point size, minimum tick, contract size, volume min/max/step and directional limit, stops and freeze levels. It also tracks trading and execution modes, filling flags and allowed order flags, plus swap mode, long/short swap values, and the triple-swap weekday.
After reattachment or terminal restart, the next valid observation is compared to the saved baseline. A compact panel shows the latest change, volume settings, and stop restrictions. CSV output records local time, property, previous value, and new value. Spread and currency-converted tick value are excluded to avoid routine marke...
๐ Read | CodeBase | @mql5dev
Watched fields include digits, point size, minimum tick, contract size, volume min/max/step and directional limit, stops and freeze levels. It also tracks trading and execution modes, filling flags and allowed order flags, plus swap mode, long/short swap values, and the triple-swap weekday.
After reattachment or terminal restart, the next valid observation is compared to the saved baseline. A compact panel shows the latest change, volume settings, and stop restrictions. CSV output records local time, property, previous value, and new value. Spread and currency-converted tick value are excluded to avoid routine marke...
๐ Read | CodeBase | @mql5dev
โค17๐7๐คฉ3๐ฅ2๐1
MetaTrader 5 EAs often keep critical strategy state only in RAM (grid depth, recovery steps, daily counters, online-trained model weights). After a terminal restart, the EA can mismanage existing positions because its internal context is gone.
A common persistence bug is overwriting the live state file: a crash mid-write truncates it, leaving โvalid-lookingโ but wrong data. The proposed fix is atomic-style saving: write to a temporary file, flush/close it, then replace the live file using FileMove, without DLLs.
To detect silent damage from edits or partial copies, the file includes a header with a magic identifier, a format version, and a checksum. On load, the store rebuilds a canonical body and verifies the checksum, returning an empty state if integrity fails.
Beyond scalars, the utility persists double arrays, making it practical to restore rolling statisti...
๐ Read | Forum | @mql5dev
A common persistence bug is overwriting the live state file: a crash mid-write truncates it, leaving โvalid-lookingโ but wrong data. The proposed fix is atomic-style saving: write to a temporary file, flush/close it, then replace the live file using FileMove, without DLLs.
To detect silent damage from edits or partial copies, the file includes a header with a magic identifier, a format version, and a checksum. On load, the store rebuilds a canonical body and verifies the checksum, returning an empty state if integrity fails.
Beyond scalars, the utility persists double arrays, making it practical to restore rolling statisti...
๐ Read | Forum | @mql5dev
โค14๐6๐คฉ3๐1
Refactor proposal for MQL5 divergence logic: extract oscillator, pivot detection, divergence classification, and state tracking from Adaptive SuperTrend into a reusable header, DivergenceEngine.mqh.
The module owns settings, optional RSI handle, buffers, and state (last pivots, divergence type, bars-since). Public access stays narrow: last divergence type, age, oscillator value, reset, and required lookback.
Integration pattern stays consistent across indicators and EAs: init engine, compute lookback, resize buffers, seed boundary at limit+1, refresh RSI buffer if selected, run a backward per-bar loop calling CalculateOscillator and DetectDivergence, then query and act outside the engine, and release on deinit.
Demonstration case uses Parabolic SAR: adapt its Acceleration Factor when an opposing divergence is recent, highlighting reuse without coupling to ...
๐ Read | AlgoBook | @mql5dev
The module owns settings, optional RSI handle, buffers, and state (last pivots, divergence type, bars-since). Public access stays narrow: last divergence type, age, oscillator value, reset, and required lookback.
Integration pattern stays consistent across indicators and EAs: init engine, compute lookback, resize buffers, seed boundary at limit+1, refresh RSI buffer if selected, run a backward per-bar loop calling CalculateOscillator and DetectDivergence, then query and act outside the engine, and release on deinit.
Demonstration case uses Parabolic SAR: adapt its Acceleration Factor when an opposing divergence is recent, highlighting reuse without coupling to ...
๐ Read | AlgoBook | @mql5dev
โค13๐5๐ฅ2๐คฉ2
ST-Expert reframes forecasting as a spatiotemporal problem: price history plus a dynamic network of cross-asset links. Using a Mixture of Experts, it shifts weight between specialist blocks as market drivers change, improving resilience, and exposing which relationships influenced a signal.
The article moves from concept to MQL5 implementation by integrating ST-Expert components into Extralongerโs three-route Transformer (temporal, spatial, mixed). A key idea is replacing classic Self-Attentionโs Query/Key logits with a graphon-derived connectivity graph, keeping only Value paths.
A new CNeuronGraphAttention module builds attention from ST-Expert graphs, applies SoftMax to produce interpretable weights, and uses residual paths to retain contextโaiming for fewer noise-driven signals when correlations break or rotate.
๐ Read | Docs | @mql5dev
The article moves from concept to MQL5 implementation by integrating ST-Expert components into Extralongerโs three-route Transformer (temporal, spatial, mixed). A key idea is replacing classic Self-Attentionโs Query/Key logits with a graphon-derived connectivity graph, keeping only Value paths.
A new CNeuronGraphAttention module builds attention from ST-Expert graphs, applies SoftMax to produce interpretable weights, and uses residual paths to retain contextโaiming for fewer noise-driven signals when correlations break or rotate.
๐ Read | Docs | @mql5dev
โค8๐4โก1๐ฅ1๐คฉ1
Media is too big
VIEW IN TELEGRAM
With Model Context Protocol (MCP), AI can work directly with MetaTrader 5 data and tools โ turning the built-in AI Assistant into an agent capable of handling complex, multi-step tasks.
Analyze markets and trading history, review open positions, work with charts, test and optimize Expert Advisors, and perform supported trading operations โ all through natural-language instructions.
Instead of manually collecting data and switching between tools, simply describe what you want to achieve and let the AI Assistant coordinate the necessary steps.
Watch the video to see how MCP works in MetaTrader 5 and explore practical AI workflows for trading, analysis, and algorithmic development.
Discuss the video:
๐ MQL5.community for traders
๐ MetaQuotes official YouTube channel
Analyze markets and trading history, review open positions, work with charts, test and optimize Expert Advisors, and perform supported trading operations โ all through natural-language instructions.
Instead of manually collecting data and switching between tools, simply describe what you want to achieve and let the AI Assistant coordinate the necessary steps.
Watch the video to see how MCP works in MetaTrader 5 and explore practical AI workflows for trading, analysis, and algorithmic development.
Discuss the video:
๐ MQL5.community for traders
๐ MetaQuotes official YouTube channel
โค17๐4๐ฅ4๐คฉ4
Running one strategy across multiple symbols and hours creates separate variants, and account-level metrics can hide where performance differs. A dashboard script addresses this by grouping closed deals by symbol and UTC closing hour, then computing win rate and payoff-based edge ratio per cell.
The pipeline reduces each deal to symbol, close-hour, and net profit, aggregates into symbol-hour cells, and renders two CCanvas heatmaps: win rate and edge ratio. Undefined ratios (all wins or all losses) are explicitly flagged and shown as neutral cells, not zero.
Breakeven deals count toward volume but are excluded from win/loss buckets to avoid ratio distortion and divide-by-zero. An Experts-tab table lists best and worst symbol-hour combinations by win rate with minimum-trade filtering. Limitations include linear scans, fixed color boundaries, server-time a...
๐ Read | AppStore | @mql5dev
The pipeline reduces each deal to symbol, close-hour, and net profit, aggregates into symbol-hour cells, and renders two CCanvas heatmaps: win rate and edge ratio. Undefined ratios (all wins or all losses) are explicitly flagged and shown as neutral cells, not zero.
Breakeven deals count toward volume but are excluded from win/loss buckets to avoid ratio distortion and divide-by-zero. An Experts-tab table lists best and worst symbol-hour combinations by win rate with minimum-trade filtering. Limitations include linear scans, fixed color boundaries, server-time a...
๐ Read | AppStore | @mql5dev
โค10๐4๐คฉ2๐ฅ1๐1
Adaptive EA design using random graph theory instead of a fixed market map.
A state-transition network encodes each closed bar via EMA spread/ATR, ATR regime, and optional RSI buckets, producing 45 states. Transitions update a decayed, Laplace-smoothed Markov matrix. A k-step matrix power yields the distribution k bars ahead, converted into a bounded directional expectation plus an entropy-based confidence gate.
A second outcome graph manages exits as an R-multiple random walk across milestones. Smoothed survival probabilities trigger closes when the next hop becomes unlikely.
A structural filter binarizes edges above a uniform baseline, measures clustering, then compares it to an ErdosโRenyi G(n,p) null via z-score. Near-zero separation is treated as a โstay flatโ condition.
๐ Read | AppStore | @mql5dev
A state-transition network encodes each closed bar via EMA spread/ATR, ATR regime, and optional RSI buckets, producing 45 states. Transitions update a decayed, Laplace-smoothed Markov matrix. A k-step matrix power yields the distribution k bars ahead, converted into a bounded directional expectation plus an entropy-based confidence gate.
A second outcome graph manages exits as an R-multiple random walk across milestones. Smoothed survival probabilities trigger closes when the next hop becomes unlikely.
A structural filter binarizes edges above a uniform baseline, measures clustering, then compares it to an ErdosโRenyi G(n,p) null via z-score. Near-zero separation is treated as a โstay flatโ condition.
๐ Read | AppStore | @mql5dev
โค9๐2๐คฉ2
Markov chains offer a practical way to model market uncertainty by turning price behavior into discrete states and estimating transition probabilities between them. The key constraint is โmemorylessnessโ: forecasts depend only on the current state, which can still work well for changing, nonstationary conditions.
The article shows two implementations: a simple 3-state regime model (down/flat/up) using a transition matrix, and a richer chain built from price differences bucketed into multiple states. Forecasts can be generated step-by-step via vectorโmatrix multiplication, with accuracy degrading as multi-step probabilities flatten.
It also extends beyond forecasting: a 2-state win/loss chain updates in real time to adjust expected value and win probability after each trade, enabling adaptive position sizing and risk-aware scenario planning in MT5 s...
๐ Read | Freelance | @mql5dev
The article shows two implementations: a simple 3-state regime model (down/flat/up) using a transition matrix, and a richer chain built from price differences bucketed into multiple states. Forecasts can be generated step-by-step via vectorโmatrix multiplication, with accuracy degrading as multi-step probabilities flatten.
It also extends beyond forecasting: a 2-state win/loss chain updates in real time to adjust expected value and win probability after each trade, enabling adaptive position sizing and risk-aware scenario planning in MT5 s...
๐ Read | Freelance | @mql5dev
โค3