A terminal script scans all instruments currently visible in Market Watch and applies two filters to identify trend candidates on H1.
First, a linear regression is calculated over a configurable window (50 bars by default). Trend smoothness is validated via the RΒ² coefficient; symbols with RΒ² below 0.70 are rejected as excessively noisy.
Second, ADX values are checked to confirm trend strength. Symbols with ADX below 25.0 are excluded.
For instruments passing both filters, the output includes direction (UP/DOWN), regression fit precision, and the ADX reading. Results are printed to the Experts tab.
Usage is straightforward: attach the script to any H1 chart to trigger an immediate scan and report.
π Read | Signals | @mql5dev
First, a linear regression is calculated over a configurable window (50 bars by default). Trend smoothness is validated via the RΒ² coefficient; symbols with RΒ² below 0.70 are rejected as excessively noisy.
Second, ADX values are checked to confirm trend strength. Symbols with ADX below 25.0 are excluded.
For instruments passing both filters, the output includes direction (UP/DOWN), regression fit precision, and the ADX reading. Results are printed to the Experts tab.
Usage is straightforward: attach the script to any H1 chart to trigger an immediate scan and report.
π Read | Signals | @mql5dev
π9β€5π€©5π₯2π2π1
Part 9 adds a Trade Activity Auditor for MetaTrader 5 that captures account-level trade changes, not just actions taken by one cooperating EA. It uses OnTradeTransaction() to log distinct stagesβrequests, order updates, deals, position changes, and history transitionsβwithout collapsing them into a single βtradeβ record, preserving evidence when callbacks arrive out of order or within the same second.
When the terminal was offline, it recovers missing context by scanning a configurable history window and appending ORDERS/DEALS not already journaled, marking rows as LIVE vs RECOVERED. The design separates responsibilities into modules: typed records, CSV journal with strict validation and export, transaction/history translation, and a chart panel for period summaries.
Practical benefits: reproducible trails for debugging multi-EA accounts, clearer attribution o...
π Read | Signals | @mql5dev
When the terminal was offline, it recovers missing context by scanning a configurable history window and appending ORDERS/DEALS not already journaled, marking rows as LIVE vs RECOVERED. The design separates responsibilities into modules: typed records, CSV journal with strict validation and export, transaction/history translation, and a chart panel for period summaries.
Practical benefits: reproducible trails for debugging multi-EA accounts, clearer attribution o...
π Read | Signals | @mql5dev
β€17π11π₯7π€©5π3π¨βπ»2π1
STE-FlowNet treats price action as an event stream rather than aggregated candles, preserving where/when order imbalance appears. This reduces response latency, avoids information loss from averaging, and captures spikes and underlying trend in one representation.
The article continues the implementation by adding an SEW-style residual block built for stability in spiking networks. The block is encapsulated as an OpenCL-backed class with a clean forward pass that chains submodules and merges the result with the original input for reliable gradient flow.
It then builds a full Flow Decoder as a separate component with two parallel paths (main features and flow), using transposed convolutions, skip connections, and encoder latent states (via ConvGRU) to reconstruct detailed spatiotemporal flow maps. Practical outcome: real-time micro-movement tracking that can feed ...
π Read | NeuroBook | @mql5dev
The article continues the implementation by adding an SEW-style residual block built for stability in spiking networks. The block is encapsulated as an OpenCL-backed class with a clean forward pass that chains submodules and merges the result with the original input for reliable gradient flow.
It then builds a full Flow Decoder as a separate component with two parallel paths (main features and flow), using transposed convolutions, skip connections, and encoder latent states (via ConvGRU) to reconstruct detailed spatiotemporal flow maps. Practical outcome: real-time micro-movement tracking that can feed ...
π Read | NeuroBook | @mql5dev
π11β€7π₯5π€©3π3
Renko forecasting moved from CatBoost classification to regression to predict the next barβs log-return, not only direction. This yields a continuous score usable for signal filtering and a 95% interval from OOF residual variance.
The core issue is forecast bias. A two-step fix is used: a residual cascade trained on honest TimeSeriesSplit OOF errors, then conditional bias correction split by sign (bull vs bear) with an MAE degradation guard.
Daily EURUSD (2024β2025) uses adaptive brick_size via 0.5ΓATR(14) (~0.004). Features describe the last 10 Renko bars (25 fields). The cascade accepted one residual stage; OOF-MAE improved 0.001306β0.001262, RΒ² to 0.718, while direction accuracy stayed ~64β65%.
A MetaTrader 5 script turns forecasts into orders with spread filtering, 2-brick SL, 3-brick TP, and 0.5% balance risk sizing, with explicit dry-run and trade...
π Read | Forum | @mql5dev
The core issue is forecast bias. A two-step fix is used: a residual cascade trained on honest TimeSeriesSplit OOF errors, then conditional bias correction split by sign (bull vs bear) with an MAE degradation guard.
Daily EURUSD (2024β2025) uses adaptive brick_size via 0.5ΓATR(14) (~0.004). Features describe the last 10 Renko bars (25 fields). The cascade accepted one residual stage; OOF-MAE improved 0.001306β0.001262, RΒ² to 0.718, while direction accuracy stayed ~64β65%.
A MetaTrader 5 script turns forecasts into orders with spread filtering, 2-brick SL, 3-brick TP, and 0.5% balance risk sizing, with explicit dry-run and trade...
π Read | Forum | @mql5dev
β€22π9π€©7π₯5π¨βπ»2π1
This article builds an MT5 indicator that treats changing market cycles as chirps (frequency drifting within the window) and uses the Fractional Fourier Transform to detect them by searching for the rotation order where energy becomes most concentrated.
Two common implementation traps are addressed: directly sampling the FrFT kernel breaks unitarity in the discrete case, and real-valued inputs make the entropy objective symmetric around a=1, destroying chirp-rate sign. The solution is a unitary FrFT built from DFT eigenvectors plus an analytic-signal step to preserve direction.
Per bar, the code detrends, computes the analytic window, runs a golden-section search minimizing RΓ©nyi entropy, and derives a chirp-rate estimate plus a causal cycle reconstruction from a narrow peak band. A βfocus gainβ metric filters low-confidence windows. Synthetic tests lo...
π Read | AppStore | @mql5dev
Two common implementation traps are addressed: directly sampling the FrFT kernel breaks unitarity in the discrete case, and real-valued inputs make the entropy objective symmetric around a=1, destroying chirp-rate sign. The solution is a unitary FrFT built from DFT eigenvectors plus an analytic-signal step to preserve direction.
Per bar, the code detrends, computes the analytic window, runs a golden-section search minimizing RΓ©nyi entropy, and derives a chirp-rate estimate plus a causal cycle reconstruction from a narrow peak band. A βfocus gainβ metric filters low-confidence windows. Synthetic tests lo...
π Read | AppStore | @mql5dev
β€23π15π₯6β2π€©2π2
Online Portfolio Selection replaces batch estimation with sequential updates and a regret guarantee versus the best constant rebalanced portfolio (BCRP) chosen in hindsight. It assumes strictly positive, bounded price relatives and enforces a floor to keep log-wealth defined.
Several allocators share a core primitive: exact Euclidean projection onto the long-only simplex (Duchi 2008). EG stays on-simplex via multiplicative updates; Coverβs universal portfolio mixes constant portfolios, with practical implementations relying on finite sampling and showing strong seed sensitivity at low sample counts.
Mean-reversion methods (PAMR, OLMAR) use thresholds and moving-average predictions, with edge cases like zero-variance updates and warmup handling affecting reproducibility. BCRP is computed via projected gradient ascent and verified against closed-form...
π Read | Signals | @mql5dev
Several allocators share a core primitive: exact Euclidean projection onto the long-only simplex (Duchi 2008). EG stays on-simplex via multiplicative updates; Coverβs universal portfolio mixes constant portfolios, with practical implementations relying on finite sampling and showing strong seed sensitivity at low sample counts.
Mean-reversion methods (PAMR, OLMAR) use thresholds and moving-average predictions, with edge cases like zero-variance updates and warmup handling affecting reproducibility. BCRP is computed via projected gradient ascent and verified against closed-form...
π Read | Signals | @mql5dev
β€21π10π₯9π€©6π2π2
Price series often contain multiple simultaneous cycles. Single-timeframe tools tend to isolate one band and suppress the rest.
A diagnostic MQL5 indicator is outlined to render a live Hilbert Spectrum via the Hilbert-Huang Transform. Empirical Mode Decomposition (EMD) extracts IMFs without a fixed basis, then Hilbert spectral analysis converts each IMF into per-bar instantaneous amplitude and frequency.
Implementation details include EMD sifting with cubic-spline envelopes solved via a tri-diagonal Thomas algorithm, SD-based convergence and iteration caps, plus a 65-tap windowed-FIR discrete Hilbert transform due to missing native analytic-signal support.
Per-IMF phase unwrapping enables instantaneous frequency, and a CCanvas heatmap bins energy into a time-frequency matrix in a separate subwindow, recalculated on bar close for cost control.
π Read | NeuroBook | @mql5dev
A diagnostic MQL5 indicator is outlined to render a live Hilbert Spectrum via the Hilbert-Huang Transform. Empirical Mode Decomposition (EMD) extracts IMFs without a fixed basis, then Hilbert spectral analysis converts each IMF into per-bar instantaneous amplitude and frequency.
Implementation details include EMD sifting with cubic-spline envelopes solved via a tri-diagonal Thomas algorithm, SD-based convergence and iteration caps, plus a 65-tap windowed-FIR discrete Hilbert transform due to missing native analytic-signal support.
Per-IMF phase unwrapping enables instantaneous frequency, and a CCanvas heatmap bins energy into a time-frequency matrix in a separate subwindow, recalculated on bar close for cost control.
π Read | NeuroBook | @mql5dev
β€16π11π€©9π₯4π3π1
This article translates two Linda Raschke swing setups into a single MT5 Expert Advisor optimized for H1/H4, where signal timing and stop precision matter more than multi-week patience.
The EA implements the 3/10 oscillator as an SMA-based MACD variant computed directly from price arrays, enabling the βAntiβ pattern: wait for the signal line to cross zero, require a true pullback where the fast line touches/crosses the signal line, then take only the first reversal cross with a bar-close direction check. Stops track the pullback extreme; exits use an opposite oscillator cross.
For βHoly Grail,β entries require ADX β₯ 30 and strengthening over two bars, a 20-EMA slope filter, and the first pullback that touches the EMA, with exits on ADX breakdown or an adverse EMA close. Two independent state machines share one EA, include restart-safe position recovery, and...
π Read | VPS | @mql5dev
The EA implements the 3/10 oscillator as an SMA-based MACD variant computed directly from price arrays, enabling the βAntiβ pattern: wait for the signal line to cross zero, require a true pullback where the fast line touches/crosses the signal line, then take only the first reversal cross with a bar-close direction check. Stops track the pullback extreme; exits use an opposite oscillator cross.
For βHoly Grail,β entries require ADX β₯ 30 and strengthening over two bars, a 20-EMA slope filter, and the first pullback that touches the EMA, with exits on ADX breakdown or an adverse EMA close. Two independent state machines share one EA, include restart-safe position recovery, and...
π Read | VPS | @mql5dev
β€25π11π₯9π€©8
Prop Firm Guard moves beyond showing balance/equity by computing three separate compliance metrics at runtime: daily drawdown from a trader-confirmed equity baseline, overall drawdown from the initial challenge balance using a static floor, and profit-target progress from realized balance. Keeping these references independent avoids mixing day-specific risk, challenge-level limits, and growth objectives.
A key design change is readiness-aware states. Each engine publishes results only if all required references and denominators validate; otherwise it stays βnot readyβ instead of defaulting to SAFE. Helper functions validate financial inputs, classify loss usage with correct severity priority, and reset states deterministically.
The EA then combines the three engines into one guard status: missing data forces NOT_READY, and risk states always outrank target ...
π Read | AppStore | @mql5dev
A key design change is readiness-aware states. Each engine publishes results only if all required references and denominators validate; otherwise it stays βnot readyβ instead of defaulting to SAFE. Helper functions validate financial inputs, classify loss usage with correct severity priority, and reset states deterministically.
The EA then combines the three engines into one guard status: missing data forces NOT_READY, and risk states always outrank target ...
π Read | AppStore | @mql5dev
π18β€8π₯8π€©4
This article rebuilds Market Profile for modern regimes without breaking Steidlmayerβs auction logic. It targets MT5 integration by using real tick trades with aggressor flags for exchange symbols (CopyTicksRange), plus a bar-based proxy for Forex.
Three structural flaws are addressed: single VA/POC in bimodal sessions, no aggressor context per level, and zero cross-session memory. Fixes include pairwise VA expansion, bimodality detection with a dead-zone and secondary POC, and a Delta Profile that tags absorption when delta is extreme at the POC.
A composite βmarket memoryβ layer adds exponentially decayed profiles, extracting HVN/LVN and tracking naked POCs efficiently via a triangular approximation, delivered as modular, performance-focused MQL5 components.
π Read | Calendar | @mql5dev
Three structural flaws are addressed: single VA/POC in bimodal sessions, no aggressor context per level, and zero cross-session memory. Fixes include pairwise VA expansion, bimodality detection with a dead-zone and secondary POC, and a Delta Profile that tags absorption when delta is extreme at the POC.
A composite βmarket memoryβ layer adds exponentially decayed profiles, extracting HVN/LVN and tracking naked POCs efficiently via a triangular approximation, delivered as modular, performance-focused MQL5 components.
π Read | Calendar | @mql5dev
π12π€©11π₯8β€4
This article turns a higher-timeframe candle into an explicit event sequence by modeling four context candles (A-B-C-D) and validating what happened inside them using lower-timeframe bars. A-B is fully closed before D starts and defines direction via a small set of strict, explainable relationships (continuation, reversal with sweep+recovery, or inside-bar compression).
C is not a visual pattern; it is accepted only if trigger-timeframe bars show a buffered retest of the reference level plus a structure break, with displacement filtered by a minimum body-to-range ratio. Compression is handled as a three-step breakout, retest, then break, with a fixed first-qualifying direction.
D provides a closed-bar confirmation window: a completed trigger bar must close beyond Cβs extreme plus buffer, while invalidation is based on closes crossing protected levels. The E...
π Read | VPS | @mql5dev
C is not a visual pattern; it is accepted only if trigger-timeframe bars show a buffered retest of the reference level plus a structure break, with displacement filtered by a minimum body-to-range ratio. Compression is handled as a three-step breakout, retest, then break, with a fixed first-qualifying direction.
D provides a closed-bar confirmation window: a completed trigger bar must close beyond Cβs extreme plus buffer, while invalidation is based on closes crossing protected levels. The E...
π Read | VPS | @mql5dev
π13π€©7β€6π₯5
An MT5 Expert Advisor executes fair value gap entries only when aligned with confirmed market structure. It consumes the same structure classes used by the companion indicator via SmcMarketStructure.mqh, ensuring the EAβs decisions match what is shown on chart without reimplementing the structure engine.
Longs require four conditions: uptrend with the last break as BoS, FVGs scanned only within the current leg up to the break bar, the leg high confirmed by IDM taking, and price returning into an eligible gap with a minimum retracement depth from B back toward A. FVGs are filtered by position within the leg, discount side relative to the broken level, and minimum size.
Entries trigger on touch at market. Stop sits beyond structure low A with a buffer. Target is R-multiple of risk, with risk-based sizing by default and broker stop-level validation. After CHoC...
π Read | Calendar | @mql5dev
Longs require four conditions: uptrend with the last break as BoS, FVGs scanned only within the current leg up to the break bar, the leg high confirmed by IDM taking, and price returning into an eligible gap with a minimum retracement depth from B back toward A. FVGs are filtered by position within the leg, discount side relative to the broken level, and minimum size.
Entries trigger on touch at market. Stop sits beyond structure low A with a buffer. Target is R-multiple of risk, with risk-based sizing by default and broker stop-level validation. After CHoC...
π Read | Calendar | @mql5dev
β€9π€©5π4π₯1
Equity Guard is a risk-management Expert Advisor for MetaTrader 5 designed for equity-based rule enforcement. It does not open trades; it monitors account equity and reacts when configured limits are reached.
Supported controls include a daily loss cap based on a percent of a day-start base and/or a fixed currency amount (stricter limit applied), an overall drawdown limit measured from initial balance or highest-equity trailing mode, plus an optional daily profit target. On trigger, it closes open positions, deletes pending orders, sends alerts (push optional), and can keep the account flat until the next trading day for daily rules or until manual reset for drawdown locks.
Day-start base can be balance, equity, or the higher of the two, with the trading day starting at a selectable server hour. State persists via terminal global variables across restarts, ...
π Read | VPS | @mql5dev
Supported controls include a daily loss cap based on a percent of a day-start base and/or a fixed currency amount (stricter limit applied), an overall drawdown limit measured from initial balance or highest-equity trailing mode, plus an optional daily profit target. On trigger, it closes open positions, deletes pending orders, sends alerts (push optional), and can keep the account flat until the next trading day for daily rules or until manual reset for drawdown locks.
Day-start base can be balance, equity, or the higher of the two, with the trading day starting at a selectable server hour. State persists via terminal global variables across restarts, ...
π Read | VPS | @mql5dev
π5β€4π€©4