Session Sweep Reversal Detector flags intraday reversals around completed session boundaries. It plots the finished session high/low as forward reference lines, then monitors post-session price action for a liquidity sweep.
A sweep requires price to breach the frozen high/low by more than a configurable buffer, then close back inside the range within a limited number of bars. Breaches that fail to reverse in time are treated as breakouts and ignored.
Signals are shown as arrows: bullish when the session low is swept and price closes back above it, bearish when the session high is swept and price closes back below it. Key inputs include session start/end hours, sweep buffer in pips, reversal bar limit, and the number of prior sessions displayed. Most relevant on M5βM30, commonly aligned to London or New York hours on major FX pairs.
π Read | VPS | @mql5dev
A sweep requires price to breach the frozen high/low by more than a configurable buffer, then close back inside the range within a limited number of bars. Breaches that fail to reverse in time are treated as breakouts and ignored.
Signals are shown as arrows: bullish when the session low is swept and price closes back above it, bearish when the session high is swept and price closes back below it. Key inputs include session start/end hours, sweep buffer in pips, reversal bar limit, and the number of prior sessions displayed. Most relevant on M5βM30, commonly aligned to London or New York hours on major FX pairs.
π Read | VPS | @mql5dev
β€28π8π2π¨βπ»2
Trade Transaction Trace Logger is a read-only MT5 Expert Advisor designed to diagnose the lifecycle of orders, deals, and positions. It records OnTradeTransaction events in arrival order to a local CSV file and can optionally mirror a compact line to the Experts Journal.
Captured fields include a monotonic event sequence with server time, transaction type, symbol, resolved magic number, and order/deal/position tickets. It also logs order type and state, deal type, price, trigger, SL/TP, volume, plus request action and server retcode/comment. If an event lacks context, the core attempts resolution via request data, live orders, order history, deal history, or current positions.
Configuration covers symbol scope (chart or all), magic filtering (-1 or exact), CSV filename, Common Files storage, and Journal printing. The module sends no trade requests, uses no DLL/W...
π Read | AppStore | @mql5dev
Captured fields include a monotonic event sequence with server time, transaction type, symbol, resolved magic number, and order/deal/position tickets. It also logs order type and state, deal type, price, trigger, SL/TP, volume, plus request action and server retcode/comment. If an event lacks context, the core attempts resolution via request data, live orders, order history, deal history, or current positions.
Configuration covers symbol scope (chart or all), magic filtering (-1 or exact), CSV filename, Common Files storage, and Journal printing. The module sends no trade requests, uses no DLL/W...
π Read | AppStore | @mql5dev
β€22π12π3
Stop Geometry Visualizer for MT5 is a free, read-only indicator that renders broker Stops Level and Freeze Level as chart references.
It displays current Bid, Ask, spread, Stops/Freeze values in points and price distance, plus upper/lower geometry references for Buy Stop, Sell Stop, Buy Stop Loss, and Sell Stop Loss. Optional freeze reference lines can be enabled. It also reports tick size, volume min/step/max, and filling-mode flags.
A timer-based refresh is configurable via InpRefreshSeconds. Visibility of stop/freeze references and change logging is controlled by inputs, along with line color settings. When a broker reports zero Stops or Freeze, lines are omitted and the dashboard explicitly shows zero.
No orders are placed, modified, or deleted. Lines are diagnostic only; final validation should use the current broker state and OrderCheck.
π Read | Docs | @mql5dev
It displays current Bid, Ask, spread, Stops/Freeze values in points and price distance, plus upper/lower geometry references for Buy Stop, Sell Stop, Buy Stop Loss, and Sell Stop Loss. Optional freeze reference lines can be enabled. It also reports tick size, volume min/step/max, and filling-mode flags.
A timer-based refresh is configurable via InpRefreshSeconds. Visibility of stop/freeze references and change logging is controlled by inputs, along with line color settings. When a broker reports zero Stops or Freeze, lines are omitted and the dashboard explicitly shows zero.
No orders are placed, modified, or deleted. Lines are diagnostic only; final validation should use the current broker state and OrderCheck.
π Read | Docs | @mql5dev
π16β€13π2β‘1
Round Trip Cost Reconciler is a free, read-only MT5 utility that generates two CSV outputs for trade cost accounting. One file contains filtered deal records. The second aggregates buy/sell deals by DEAL_POSITION_ID to produce position-level round-trip figures.
Partial fills are consolidated into volume-weighted entry and exit prices. Commission, swap, and fee remain separated from gross trading result, enabling cleaner reconciliation of broker-recorded costs versus PnL.
Reports include deal/order/position identifiers, symbol, magic number, direction, entry type, timestamps, price/volume, broker profit and costs, total entry/exit volume, weighted prices, gross result, total costs, net result, deal count, and lifecycle status.
Lifecycle states: COMPLETE, OPEN_OR_INCOMPLETE, EXCESS_EXIT, and COMPLEX_REVERSAL (INOUT reversals are not simplified).
Setup: compile t...
π Read | Calendar | @mql5dev
Partial fills are consolidated into volume-weighted entry and exit prices. Commission, swap, and fee remain separated from gross trading result, enabling cleaner reconciliation of broker-recorded costs versus PnL.
Reports include deal/order/position identifiers, symbol, magic number, direction, entry type, timestamps, price/volume, broker profit and costs, total entry/exit volume, weighted prices, gross result, total costs, net result, deal count, and lifecycle status.
Lifecycle states: COMPLETE, OPEN_OR_INCOMPLETE, EXCESS_EXIT, and COMPLEX_REVERSAL (INOUT reversals are not simplified).
Setup: compile t...
π Read | Calendar | @mql5dev
β€12π11π2
Broker Session Schedule Inspector for MT5 reads the weekly trading-session schedule directly from the connected broker, without using predefined London, New York, or other global session templates.
The script can be run against the current chart symbol, a comma-separated custom list, or all visible Market Watch symbols. For each symbol it enumerates sessions returned by SymbolInfoSessionTrade, checks whether current server time is inside a scheduled window, and identifies the next open or close transition. Trade mode and synchronization status are also reported.
Midnight-crossing sessions are marked with (+1d). If the broker does not provide schedule data, the output returns SCHEDULE_UNAVAILABLE rather than generating fallback hours. Optional CSV snapshots with timestamps can be written to the terminal Common Files folder.
Inputs include symbol scope, custom...
π Read | AppStore | @mql5dev
The script can be run against the current chart symbol, a comma-separated custom list, or all visible Market Watch symbols. For each symbol it enumerates sessions returned by SymbolInfoSessionTrade, checks whether current server time is inside a scheduled window, and identifies the next open or close transition. Trade mode and synchronization status are also reported.
Midnight-crossing sessions are marked with (+1d). If the broker does not provide schedule data, the output returns SCHEDULE_UNAVAILABLE rather than generating fallback hours. Optional CSV snapshots with timestamps can be written to the terminal Common Files folder.
Inputs include symbol scope, custom...
π Read | AppStore | @mql5dev
β€11π11π3β1
Look-ahead bias remains a primary reason ML trading models fail on non-stationary live data. It appears when labels are derived from future price movement, producing inflated backtests, weak out-of-sample results, and low robustness due to overfitting.
A proposed alternative is oscillator-based labeling that avoids future information. Labels are generated from overbought/oversold thresholds with an added βdo not tradeβ zone, enabling cleaner cross-validation and simpler decision boundaries.
Key limitations persist: oscillator selection and parameterization, poor behavior in trends, and instrument dependence. Adding profitability checks can smooth equity curves but reintroduces look-ahead.
Implementation details include Numba-accelerated indicator calculation, threshold-to-label mapping, optional profitability filtering, and ONNX export for deploymen...
π Read | Freelance | @mql5dev
A proposed alternative is oscillator-based labeling that avoids future information. Labels are generated from overbought/oversold thresholds with an added βdo not tradeβ zone, enabling cleaner cross-validation and simpler decision boundaries.
Key limitations persist: oscillator selection and parameterization, poor behavior in trends, and instrument dependence. Adding profitability checks can smooth equity curves but reintroduces look-ahead.
Implementation details include Numba-accelerated indicator calculation, threshold-to-label mapping, optional profitability filtering, and ONNX export for deploymen...
π Read | Freelance | @mql5dev
β€17π11π2
Financial time series work increasingly depends on probabilistic forecasts, not point estimates. Longer horizons amplify error accumulation, volatility sensitivity, and compute costs, especially under regime shifts driven by earnings, macro data, and geopolitics.
KΒ²VAE combines Koopman linearization, Kalman-style online correction, and a VAE for scenario generation. Tokens are built from multivariate patches to capture cross-asset interactions, then mapped into an observable space where a learned Koopman operator rolls dynamics forward.
Residuals from the linear rollout feed KalmanNet via control inputs, producing updated state and covariance per step. The decoder samples multiple future trajectories, returning distributions with confidence intervals suited for risk-aware trading and portfolio sizing.
π Read | VPS | @mql5dev
KΒ²VAE combines Koopman linearization, Kalman-style online correction, and a VAE for scenario generation. Tokens are built from multivariate patches to capture cross-asset interactions, then mapped into an observable space where a learned Koopman operator rolls dynamics forward.
Residuals from the linear rollout feed KalmanNet via control inputs, producing updated state and covariance per step. The decoder samples multiple future trajectories, returning distributions with confidence intervals suited for risk-aware trading and portfolio sizing.
π Read | VPS | @mql5dev
β€15π5π3π2
Differential Search Algorithm (DSA), proposed by Pinar Civicioglu (2012), targets continuous optimization as an alternative to PSO and DE. It maintains a population and updates candidates through directed moves with controlled randomness.
Per iteration, each agent picks a direction via B-DSA (permutation), S-DSA (top-N sampling), E1-DSA (single random leader), or E2-DSA (best leader). Step magnitude uses Gamma-distributed scaling, allowing occasional large jumps and negative steps.
A coordinate mask restores selected dimensions to previous values, then greedy selection keeps only improved candidates. Typical implementation separates Init, Moving, Revision, plus direction generation, mask creation, scale factor (Gamma RNG), and boundary control.
π Read | Forum | @mql5dev
Per iteration, each agent picks a direction via B-DSA (permutation), S-DSA (top-N sampling), E1-DSA (single random leader), or E2-DSA (best leader). Step magnitude uses Gamma-distributed scaling, allowing occasional large jumps and negative steps.
A coordinate mask restores selected dimensions to previous values, then greedy selection keeps only improved candidates. Typical implementation separates Init, Moving, Revision, plus direction generation, mask creation, scale factor (Gamma RNG), and boundary control.
π Read | Forum | @mql5dev
β€15π7π3
Moving-average inputs were extended with statistical signal processing to reduce market noise, using Independent Components Analysis (ICA) as a blind source separation step.
Pipeline used SMA-filtered OHLC data with 5-day lags, exported from MQL5 (49 columns) and modeled in Python. A surrogate target based on future SMA change aligned with raw return direction about 81% of the time, and showed improved classification accuracy as lags increased, unlike raw returns.
FastICA on 24 SMA/lag features peaked near 18 components and plateaued after ~13; 12 components were retained to control complexity. KMeans on the ICA manifold showed mostly uniform error rates, with one small, unreliable low-error cluster.
Models were tuned via RandomizedSearchCV, exported to ONNX, then loaded in an MQL5 EA alongside indicators and trade management.
π Read | NeuroBook | @mql5dev
Pipeline used SMA-filtered OHLC data with 5-day lags, exported from MQL5 (49 columns) and modeled in Python. A surrogate target based on future SMA change aligned with raw return direction about 81% of the time, and showed improved classification accuracy as lags increased, unlike raw returns.
FastICA on 24 SMA/lag features peaked near 18 components and plateaued after ~13; 12 components were retained to control complexity. KMeans on the ICA manifold showed mostly uniform error rates, with one small, unreliable low-error cluster.
Models were tuned via RandomizedSearchCV, exported to ONNX, then loaded in an MQL5 EA alongside indicators and trade management.
π Read | NeuroBook | @mql5dev
β€12π3π2
MetaTrader 5 economic calendar access in MQL5 is split across MqlCalendarCountry, MqlCalendarEvent, and MqlCalendarValue. A unified structure can simplify consumption by grouping country metadata, event definition, and release values under one record.
A provider pattern standardizes access through Get(), Exists(), Next(), and Previous(), with filters for time range, currency, country code, and importance. Next/Previous rely on bounded lookahead/lookback windows to keep calls predictable.
Strategy Tester limitations require alternative sources since calendar APIs can fail in backtests. Exporting live calendar data to CSV enables deterministic testing, while a SQLite backend scales to large history sets and supports SQL filtering. Optional in-memory caching reduces repeated DB latency during optimizations.
π Read | VPS | @mql5dev
A provider pattern standardizes access through Get(), Exists(), Next(), and Previous(), with filters for time range, currency, country code, and importance. Next/Previous rely on bounded lookahead/lookback windows to keep calls predictable.
Strategy Tester limitations require alternative sources since calendar APIs can fail in backtests. Exporting live calendar data to CSV enables deterministic testing, while a SQLite backend scales to large history sets and supports SQL filtering. Optional in-memory caching reduces repeated DB latency during optimizations.
π Read | VPS | @mql5dev
β€11π9π1
Quantora Trade Manager MT4 is a position management utility for MetaTrader 4 focused on controlling and protecting existing trades rather than generating entries. It automates routine actions including stop loss, take profit, break even, and trailing stop to reduce manual intervention and keep execution consistent.
The manager can auto-apply missing SL/TP, then move positions to break even after a configurable profit threshold. A trailing stop module can incrementally secure profit as price moves in the intended direction.
Filtering supports manual trades, all trades, or a specified Magic Number, and can run per-chart symbol or across all symbols for multi-strategy accounts. Daily protection rules allow profit targets and loss limits to trigger predefined responses. A dashboard summarizes account state, open positions, and active settings, with controls for...
π Read | Calendar | @mql5dev
The manager can auto-apply missing SL/TP, then move positions to break even after a configurable profit threshold. A trailing stop module can incrementally secure profit as price moves in the intended direction.
Filtering supports manual trades, all trades, or a specified Magic Number, and can run per-chart symbol or across all symbols for multi-strategy accounts. Daily protection rules allow profit targets and loss limits to trigger predefined responses. A dashboard summarizes account state, open positions, and active settings, with controls for...
π Read | Calendar | @mql5dev
β€14π6π1
Quantora Spread Monitor MT5 is a real-time spread monitoring indicator for MetaTrader 5. It continuously tracks current spread and records minimum, maximum, and average values to quantify changing transaction costs over time.
A built-in history graph highlights sudden spread spikes and periods of instability. Spread levels are classified from low to extreme, with configurable thresholds to match specific risk and cost limits.
Alerts trigger when the spread exceeds a defined level, with popup, sound, and push options. A cooldown mechanism reduces repeated notifications during volatile bursts.
The dashboard presents current spread, statistics, symbol details, and server time in a compact layout. It supports all symbols, updates automatically, and is designed strictly for monitoring without trade execution or signal generation.
π Read | Freelance | @mql5dev
A built-in history graph highlights sudden spread spikes and periods of instability. Spread levels are classified from low to extreme, with configurable thresholds to match specific risk and cost limits.
Alerts trigger when the spread exceeds a defined level, with popup, sound, and push options. A cooldown mechanism reduces repeated notifications during volatile bursts.
The dashboard presents current spread, statistics, symbol details, and server time in a compact layout. It supports all symbols, updates automatically, and is designed strictly for monitoring without trade execution or signal generation.
π Read | Freelance | @mql5dev
β€22π6π¨βπ»3π1
Quantora Trading Cost Calculator for MT5 estimates total trade cost before entry using live symbol data and user inputs. It aggregates spread, commission, and swap into a single view to reflect expected costs under current conditions.
Inputs include lot size, direction, commission per lot, and holding period. Output breaks down spread cost, commission cost, and swap impact, then totals the estimate in account currency. The cost is also shown as a percentage of account balance.
The panel displays tick size, tick value, and contract size to adapt calculations across instruments and broker settings. Works on all symbols and timeframes with automatic updates. Analysis-only utility with no order placement and no signal generation.
π Read | NeuroBook | @mql5dev
Inputs include lot size, direction, commission per lot, and holding period. Output breaks down spread cost, commission cost, and swap impact, then totals the estimate in account currency. The cost is also shown as a percentage of account balance.
The panel displays tick size, tick value, and contract size to adapt calculations across instruments and broker settings. Works on all symbols and timeframes with automatic updates. Analysis-only utility with no order placement and no signal generation.
π Read | NeuroBook | @mql5dev
β€17π6π1
Adaptive Kalman Trend Filter uses a single-state Kalman estimate with process noise (Q) recalculated on every bar. Q is scaled between min and max multipliers using Kaufmanβs Efficiency Ratio (ER), avoiding fixed-parameter lag versus whipsaw trade-offs. High ER raises Q and the Kalman gain, keeping the line closer to price; low ER reduces Q and increases smoothing during range conditions.
Regime bands are derived from rolling residual volatility (price minus Kalman line). Band width is the residual standard deviation times a multiplier that is further expanded as ER falls, producing tighter bands in directional markets and wider bands in chop. Color state changes are confirmed on closed bars only, so signals do not repaint.
Key inputs include base Q, measurement noise (R), ER/band lookbacks, regime threshold, and band multiplier. Typical tuning targets...
π Read | Freelance | @mql5dev
Regime bands are derived from rolling residual volatility (price minus Kalman line). Band width is the residual standard deviation times a multiplier that is further expanded as ER falls, producing tighter bands in directional markets and wider bands in chop. Color state changes are confirmed on closed bars only, so signals do not repaint.
Key inputs include base Q, measurement noise (R), ER/band lookbacks, regime threshold, and band multiplier. Typical tuning targets...
π Read | Freelance | @mql5dev
β€20π6β‘2π2π1
SessionORB_EA automates an opening-range breakout around a configurable session start (London, New York, or any custom broker-time open). It records the high/low of the first N minutes using M1 data, then maintains two trigger levels at the range boundaries plus an optional buffer.
A trade is placed only after a bar closes beyond a trigger, not on a wick. One market position per session is allowed by default, with position sizing based on account risk percent or an optional fixed lot. Stop loss is set beyond the opposite side of the range with an added buffer, and take profit is defined by a reward-to-risk multiple.
The range measurement stays minute-accurate regardless of chart timeframe, while signal confirmation follows the attached chart period. Chart objects can draw the opening-range box, forward trigger lines, and a session-start marker, with automat...
π Read | VPS | @mql5dev
A trade is placed only after a bar closes beyond a trigger, not on a wick. One market position per session is allowed by default, with position sizing based on account risk percent or an optional fixed lot. Stop loss is set beyond the opposite side of the range with an added buffer, and take profit is defined by a reward-to-risk multiple.
The range measurement stays minute-accurate regardless of chart timeframe, while signal confirmation follows the attached chart period. Chart objects can draw the opening-range box, forward trigger lines, and a session-start marker, with automat...
π Read | VPS | @mql5dev
β€20π8β‘2π1
Reverse RSI Bands is a custom indicator that reverse-engineers the RSI equation and plots the exact price levels where RSI will reach selected overbought and oversold thresholds. Instead of a separate oscillator window, the main chart shows the calculated upper and lower price bands, enabling advance identification of potential extremes and dynamic support/resistance zones.
The implementation uses algebraic deductions of Wilderβs recursive smoothing and computes the required price for the current bar from the verified previous-bar state, preventing repainting. The resulting levels are designed to match the platformβs standard RSI output exactly.
Key inputs include RSI period (default 14), overbought target (70), oversold target (30), and applied price (close). Common usage focuses on major FX pairs on H1/H4, watching for touches or pierces of the ban...
π Read | AppStore | @mql5dev
The implementation uses algebraic deductions of Wilderβs recursive smoothing and computes the required price for the current bar from the verified previous-bar state, preventing repainting. The resulting levels are designed to match the platformβs standard RSI output exactly.
Key inputs include RSI period (default 14), overbought target (70), oversold target (30), and applied price (close). Common usage focuses on major FX pairs on H1/H4, watching for touches or pierces of the ban...
π Read | AppStore | @mql5dev
β€25π7π₯2π¨βπ»2π1
KΒ²VAE targets time-series forecasting under high uncertainty by combining linear latent dynamics (Koopman), adaptive error filtering (KalmanNet), and probabilistic sampling (VAE). Output is a full distribution of future states, with variance reflecting confidence rather than a single trajectory.
Architecture splits into patching, encoder, and decoder. The decoder returns mean and variance to model P(Y|Z) and preserve uncertainty end-to-end.
The encoder chains KoopmanNet for latent transitions and retrospective reconstruction, attention over reconstruction error (not the raw sequence), KalmanNet to generate a covariance matrix from error-derived control signals, and VAE sampling using Koopman mean plus Kalman dispersion.
KoopmanNet can be extended from dual MLPs to a sparse Mixture-of-Experts block to separate local vs global dynamics and improve robustness on vo...
π Read | Signals | @mql5dev
Architecture splits into patching, encoder, and decoder. The decoder returns mean and variance to model P(Y|Z) and preserve uncertainty end-to-end.
The encoder chains KoopmanNet for latent transitions and retrospective reconstruction, attention over reconstruction error (not the raw sequence), KalmanNet to generate a covariance matrix from error-derived control signals, and VAE sampling using Koopman mean plus Kalman dispersion.
KoopmanNet can be extended from dual MLPs to a sparse Mixture-of-Experts block to separate local vs global dynamics and improve robustness on vo...
π Read | Signals | @mql5dev
β€9π9π1π1
This article outlines an MVP βLLM-driven traderβ built with Python + MetaTrader 5 + an OpenRouter-connected language model. MT5 supplies recent OHLCV candles, the script packages them into a prompt, and the LLM returns a structured decision: BUY/SELL/WAIT plus entry, SL/TP, and a short rationale.
Key implementation details: cloud inference keeps hardware requirements low; model choice is swappable via a single API parameter; responses are parsed with regex to tolerate formatting drift; orders are placed as MT5 market trades with a 1:2 risk/reward, and each cycle runs on a timer (e.g., every 5 minutes) with full logging.
Practical takeaways: strategy iteration happens mostly in prompt design and model settings (temperature, max_tokens), multi-timeframe inputs can improve context, and production use needs guardrails for open-position handling, latency, and...
π Read | Forum | @mql5dev
Key implementation details: cloud inference keeps hardware requirements low; model choice is swappable via a single API parameter; responses are parsed with regex to tolerate formatting drift; orders are placed as MT5 market trades with a 1:2 risk/reward, and each cycle runs on a timer (e.g., every 5 minutes) with full logging.
Practical takeaways: strategy iteration happens mostly in prompt design and model settings (temperature, max_tokens), multi-timeframe inputs can improve context, and production use needs guardrails for open-position handling, latency, and...
π Read | Forum | @mql5dev
β€7π3β‘1
Most MT5 indicators lean on mean, standard deviation, and least-squares regression, which collapse under outliers: a single bad tick or gap can drag the mean, inflate volatility, and even flip a regression slope.
A robust alternative replaces those estimators with median, MAD (scaled by 1.4826 to match sigma on clean data), and Theil-Sen slope (median of pairwise slopes). These keep meaning until a large fraction of the window is corrupted, unlike classical tools with effectively zero tolerance.
The core is a single include, RobustStats.mqh, using a ring buffer for O(1) updates and a one-pass ComputeAll() that returns robust and classical metrics over the same window for fair comparison. Three drop-in indicators mirror bands, channels, and oscillators, plus an overlay and a breakdown-point script to quantify stability and highlight edge cases (NaNs, ...
π Read | VPS | @mql5dev
A robust alternative replaces those estimators with median, MAD (scaled by 1.4826 to match sigma on clean data), and Theil-Sen slope (median of pairwise slopes). These keep meaning until a large fraction of the window is corrupted, unlike classical tools with effectively zero tolerance.
The core is a single include, RobustStats.mqh, using a ring buffer for O(1) updates and a one-pass ComputeAll() that returns robust and classical metrics over the same window for fair comparison. Three drop-in indicators mirror bands, channels, and oscillators, plus an overlay and a breakdown-point script to quantify stability and highlight edge cases (NaNs, ...
π Read | VPS | @mql5dev
β€3π2