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π11π₯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π12π€©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
β€26π12π₯9π€©8π1
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
π19β€9π₯8π€©4π1
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
π13π€©11π₯8β€4π1
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
π14β€7π€©7π₯5β‘1π1
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
β€13π€©6π4π₯2β‘1π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
π7π€©5β€4π₯3π1
Telegram Trade Notifier for MT5 provides account event notifications via Telegram while the terminal is unattended. Attached to a single chart, it reports trade activity without opening, modifying, or closing positions.
Events include position open/close details with origin (EA and magic number, manual, mobile, web), pending order placement/cancel/expiry, and optional SL/TP change alerts. A daily summary at a configured server hour reports closed trades, win/loss counts, realized result, open positions, floating P/L, balance, and equity.
Delivery uses a queued timer-based sender to avoid blocking trade events. Failed sends retry up to five times; non-retriable issues (invalid token/chat ID) are written to the Experts journal. Preview mode is enabled by leaving the bot token empty, showing messages on-chart and in the journal only.
Setup requires a Telegram...
π Read | AlgoBook | @mql5dev
Events include position open/close details with origin (EA and magic number, manual, mobile, web), pending order placement/cancel/expiry, and optional SL/TP change alerts. A daily summary at a configured server hour reports closed trades, win/loss counts, realized result, open positions, floating P/L, balance, and equity.
Delivery uses a queued timer-based sender to avoid blocking trade events. Failed sends retry up to five times; non-retriable issues (invalid token/chat ID) are written to the Experts journal. Preview mode is enabled by leaving the bot token empty, showing messages on-chart and in the journal only.
Setup requires a Telegram...
π Read | AlgoBook | @mql5dev
β€8π5π₯5π€©4π1
Managing grids, averaging baskets, and hedges often means multiple positions per symbol with different entry prices. This indicator calculates and draws the basket break-even levels in real time, updating on every tick.
It plots Buy BE (all buy positions at zero), Sell BE (all sell positions at zero), and Net BE (buys and sells combined at zero, only when both sides exist). A Target line can be set in account currency to show the price where the basket reaches the specified profit.
An info panel displays buy/sell counts and volume, floating P/L, and the calculated basket levels. Calculation is based on aggregated lots and entry prices, optional swap inclusion, and current tick value; cross-currency symbols may be approximate. Spread and commissions are not included, so Buy BE aligns with Bid and Sell BE with Ask.
Planned entries can be added for cal...
π Read | AppStore | @mql5dev
It plots Buy BE (all buy positions at zero), Sell BE (all sell positions at zero), and Net BE (buys and sells combined at zero, only when both sides exist). A Target line can be set in account currency to show the price where the basket reaches the specified profit.
An info panel displays buy/sell counts and volume, floating P/L, and the calculated basket levels. Calculation is based on aggregated lots and entry prices, optional swap inclusion, and current tick value; cross-currency symbols may be approximate. Spread and commissions are not included, so Buy BE aligns with Bid and Sell BE with Ask.
Planned entries can be added for cal...
π Read | AppStore | @mql5dev
β€10π8π¨βπ»4π₯3π€©2π1
Backtesting and ML pipelines fail most often at the data layer. Common issues in free CSV exports include mixed timeframes, indicator repainting, and implicit lookahead that only shows up after weeks of work.
MultiβTF Data Grabber Lite exports deterministic, closedβbar market data from MT5 to CSV with a frozen time window and zero lookahead. The same inputs produce the same output. If a new bar opens midβexport, the run restarts with a fresh freeze to avoid partial corruption.
Run flow: open an XAUUSD chart, attach DataGrabber_Lite_v105, set From/To, enable indicators as needed, then start. Progress is shown with chunk, rows, elapsed time, and ETA, then the panel closes.
Output: three CSV files for M1/M15/H1 with 11 columns: time, OHLC, tick_volume, MA20, RSI14, MACD main/signal, ATR14. Files are stored under the terminal data folder in MQL5\Files\DataGrabb...
π Read | Signals | @mql5dev
MultiβTF Data Grabber Lite exports deterministic, closedβbar market data from MT5 to CSV with a frozen time window and zero lookahead. The same inputs produce the same output. If a new bar opens midβexport, the run restarts with a fresh freeze to avoid partial corruption.
Run flow: open an XAUUSD chart, attach DataGrabber_Lite_v105, set From/To, enable indicators as needed, then start. Progress is shown with chunk, rows, elapsed time, and ETA, then the panel closes.
Output: three CSV files for M1/M15/H1 with 11 columns: time, OHLC, tick_volume, MA20, RSI14, MACD main/signal, ATR14. Files are stored under the terminal data folder in MQL5\Files\DataGrabb...
π Read | Signals | @mql5dev
π15β€6π₯6π€©1π1
A compression-channel indicator tracks low-volatility stretches where ranges contract and closes cluster. It flags compression in real time, draws a gray channel after it persists long enough, then marks the breakout bar. Live channels also include an order-flow style volume split (buy vs sell) so dominance during the squeeze is visible.
Compression is detected by normalizing closes into the last 100-bar high/low range and monitoring the 14-bar standard deviation. A compression starts when the most recent extreme is the lowest deviation; a channel is confirmed when the high reappears after 10+ bars. Bands are sized at 0.5 ATR at formation, with optional nested channels.
Breakouts require either candle body midpoint beyond the channel edge or close-only logic. Arrows are exposed via buffers (10 bullish, 11 bearish) for EA access. Volume readouts suppo...
π Read | AlgoBook | @mql5dev
Compression is detected by normalizing closes into the last 100-bar high/low range and monitoring the 14-bar standard deviation. A compression starts when the most recent extreme is the lowest deviation; a channel is confirmed when the high reappears after 10+ bars. Bands are sized at 0.5 ATR at formation, with optional nested channels.
Breakouts require either candle body midpoint beyond the channel edge or close-only logic. Arrows are exposed via buffers (10 bullish, 11 bearish) for EA access. Volume readouts suppo...
π Read | AlgoBook | @mql5dev
β€9π4π₯4π€©2π1
BUZOA is a PSO-derived population optimizer that replaces a fixed velocity update with stochastic mode switching per agent. Each step selects one of three behaviors, changing the exploration/exploitation mix without adding extra state variables.
Agents maintain position L and an ability vector C (velocity-like), with pBest and gBest tracking. C is clamped to [-Cmax, +Cmax], where Cmax is half the search-range width per dimension. Position is updated by L = L + C, with boundary clipping and inertia damping via alpha1 *= wDamp.
Mode 001 updates C using inertia plus a pull to pBest. Mode 010 adds additional pBest and gBest attraction terms, increasing global movement pressure. Mode 100 resets: L is re-randomized over the full domain and C set to zero, acting as a built-in escape from local optima.
π Read | Quotes | @mql5dev
Agents maintain position L and an ability vector C (velocity-like), with pBest and gBest tracking. C is clamped to [-Cmax, +Cmax], where Cmax is half the search-range width per dimension. Position is updated by L = L + C, with boundary clipping and inertia damping via alpha1 *= wDamp.
Mode 001 updates C using inertia plus a pull to pBest. Mode 010 adds additional pBest and gBest attraction terms, increasing global movement pressure. Mode 100 resets: L is re-randomized over the full domain and C set to zero, acting as a built-in escape from local optima.
π Read | Quotes | @mql5dev
β€9π4π₯2