A multi-pair MT5 EA can’t rely on one ATR multiplier: each symbol’s price behavior differs, so fixed stops end up too tight on volatile instruments and inefficient on calmer pairs.
This system solves it by learning a per-symbol “volatility signature” from 1000 H1 bars. It extracts range, body/wick structure, true range, close-to-close variance, gaps, pullback depth, trend persistence, and dispersion, then classifies the market regime (volatility, noise, trend, momentum).
Those labels feed a stop-loss optimizer that adjusts a base ATR multiplier with capped bounds, then uses live ATR for the final distance. Position sizing inverts stop distance to keep account risk constant. Entries stay independent: MACD crossover gated by EMA trend, processed per-symbol via isolated contexts, timers, and reusable indicator handles, with a dashboard for inspection/debugging.
👉 Read | AlgoBook | @mql5dev
This system solves it by learning a per-symbol “volatility signature” from 1000 H1 bars. It extracts range, body/wick structure, true range, close-to-close variance, gaps, pullback depth, trend persistence, and dispersion, then classifies the market regime (volatility, noise, trend, momentum).
Those labels feed a stop-loss optimizer that adjusts a base ATR multiplier with capped bounds, then uses live ATR for the final distance. Position sizing inverts stop distance to keep account risk constant. Entries stay independent: MACD crossover gated by EMA trend, processed per-symbol via isolated contexts, timers, and reusable indicator handles, with a dashboard for inspection/debugging.
👉 Read | AlgoBook | @mql5dev
❤28👍7👾4👨💻2👌1
The EA is extended with chart-side visibility of simulated option “levels”, so traders can track the current price relative to strike and rebalancing bands. Levels are plotted as intraday horizontal segments with numeric labels, rebuilt daily after recalculating historical volatility.
Option level prices are derived from target delta values by inverting a sigmoid-based delta model. Separate up/down solvers handle delta asymmetry around the strike, using a bisection search for stable, monotonic convergence instead of algebraic inversion.
Two practical structures are added for testing: Long Straddle (direction-agnostic breakout beyond the HV range, risk tied to rebalancing losses) and Short Straddle (range trading inside HV, profit from oscillations, theoretically unlimited loss if price trends out of range).
👉 Read | CodeBase | @mql5dev
Option level prices are derived from target delta values by inverting a sigmoid-based delta model. Separate up/down solvers handle delta asymmetry around the strike, using a bisection search for stable, monotonic convergence instead of algebraic inversion.
Two practical structures are added for testing: Long Straddle (direction-agnostic breakout beyond the HV range, risk tied to rebalancing losses) and Short Straddle (range trading inside HV, profit from oscillations, theoretically unlimited loss if price trends out of range).
👉 Read | CodeBase | @mql5dev
❤47👍6👌5🏆4👨💻1
An indicator provides statistics on closed trades with filtering by magic number. The output is focused on finalized positions only, excluding open exposure and floating P/L.
Filtering by magic number allows separation of results across strategies, EAs, symbols, or account contexts that share the same history. This supports cleaner attribution of performance when multiple systems trade concurrently.
Configuration is handled through input parameters, typically covering the target magic number, the reporting range, and which metrics to display, such as trade count, net profit, profit factor, average win/loss, maximum drawdown on closed equity, and streak statistics.
👉 Read | Docs | @mql5dev
Filtering by magic number allows separation of results across strategies, EAs, symbols, or account contexts that share the same history. This supports cleaner attribution of performance when multiple systems trade concurrently.
Configuration is handled through input parameters, typically covering the target magic number, the reporting range, and which metrics to display, such as trade count, net profit, profit factor, average win/loss, maximum drawdown on closed equity, and streak statistics.
👉 Read | Docs | @mql5dev
❤23👍5🎉2⚡1👌1
Channel logic uses a symmetric triangular-weighted moving average over 2×HalfLength+1 bars as the center line. Band width is derived from an adaptive, EMA-style variance of positive/negative deviations, plotting Center ± (Deviation multiplier × StdDev).
Signal rules are closed-form: Sell triggers when a bullish bar pushes High above the upper band, followed by a bearish close. Buy triggers when a bearish bar pushes Low below the lower band, followed by a bullish close. Arrow offsets scale with ATR(20) for consistent readability.
MTF mode computes the channel on a selectable higher timeframe via CopyRates(), with optional linear interpolation to avoid stair-stepped lines. Optional filters include minimum band width, tick-volume confirmation, and cooldown. Implementation is single-file MQL5, chart-window indicator, cached MTF updates, and proper handle...
👉 Read | AppStore | @mql5dev
Signal rules are closed-form: Sell triggers when a bullish bar pushes High above the upper band, followed by a bearish close. Buy triggers when a bearish bar pushes Low below the lower band, followed by a bullish close. Arrow offsets scale with ATR(20) for consistent readability.
MTF mode computes the channel on a selectable higher timeframe via CopyRates(), with optional linear interpolation to avoid stair-stepped lines. Optional filters include minimum band width, tick-volume confirmation, and cooldown. Implementation is single-file MQL5, chart-window indicator, cached MTF updates, and proper handle...
👉 Read | AppStore | @mql5dev
❤28👍6👌2👨💻1
A reusable MQL5 include file (.mqh) targets risk management and position sizing across multi-asset portfolios, with consistent results on accounts using non-USD base currencies and on brokers that apply symbol suffixes such as .pro or .ecn.
The module uses a triangular currency conversion engine to translate the instrument’s profit currency into the account currency. It checks direct, inverse, and USD cross paths to produce an accurate tick value, reducing sizing errors caused by currency mismatches.
Key methods include CalculateLotSize for risk-percent sizing from balance and stop distance, GetConversionRate for automatic path resolution, ExtractSuffix to normalize broker symbols during lookups, and CheckDrawdownLimit to block new trades when equity drawdown exceeds configured limits.
Deployment is via MQL5\Include\, then include the header, create the cl...
👉 Read | Quotes | @mql5dev
The module uses a triangular currency conversion engine to translate the instrument’s profit currency into the account currency. It checks direct, inverse, and USD cross paths to produce an accurate tick value, reducing sizing errors caused by currency mismatches.
Key methods include CalculateLotSize for risk-percent sizing from balance and stop distance, GetConversionRate for automatic path resolution, ExtractSuffix to normalize broker symbols during lookups, and CheckDrawdownLimit to block new trades when equity drawdown exceeds configured limits.
Deployment is via MQL5\Include\, then include the header, create the cl...
👉 Read | Quotes | @mql5dev
❤18👍4👀2👌1
Crow Search Algorithm (CSA) is presented as a swarm-based global optimizer inspired by crows that remember good “cache” locations, follow other agents, and sometimes force random detours to prevent premature convergence. Its appeal is a small parameter set and straightforward implementation, making it suitable for iterative tuning problems in trading.
The MQL5 design centers on S_CrowMemory to persist each agent’s best position and fitness, plus a C_AO_CrowSearchAlgorithm class with configurable population size, flight length, and awareness probability. Core methods cover initialization, randomized opponent selection, position updates via either guided moves toward another crow’s cached best or full random relocation, and a revision step that updates both per-crow memory and the global best solution.
👉 Read | NeuroBook | @mql5dev
The MQL5 design centers on S_CrowMemory to persist each agent’s best position and fitness, plus a C_AO_CrowSearchAlgorithm class with configurable population size, flight length, and awareness probability. Core methods cover initialization, randomized opponent selection, position updates via either guided moves toward another crow’s cached best or full random relocation, and a revision step that updates both per-crow memory and the global best solution.
👉 Read | NeuroBook | @mql5dev
❤8👍8👌3⚡1
Media is too big
VIEW IN TELEGRAM
Introducing metatrader.com — a new destination for traders, investors, and MetaTrader users.
The homepage gives you a complete view of the markets at a glance. Track U.S. stocks, forex, indices, metals, and commodities from a single hub.
Every instrument comes with a fully featured interactive chart. Use drawing tools, including trend lines, channels, Fibonacci levels, and other analytical objects.
Read news and analysis from more than 30 international providers, including Reuters, Bloomberg, Yahoo Finance, and others.
Visit the portal today and discover a new hub for financial analysis and trading.
Discuss the video:
👉 MQL5.community for traders
👉 MetaQuotes official YouTube channel
The homepage gives you a complete view of the markets at a glance. Track U.S. stocks, forex, indices, metals, and commodities from a single hub.
Every instrument comes with a fully featured interactive chart. Use drawing tools, including trend lines, channels, Fibonacci levels, and other analytical objects.
Read news and analysis from more than 30 international providers, including Reuters, Bloomberg, Yahoo Finance, and others.
Visit the portal today and discover a new hub for financial analysis and trading.
Discuss the video:
👉 MQL5.community for traders
👉 MetaQuotes official YouTube channel
❤17🔥6👍3🏆3👌2⚡1🤣1
Market-neutral trading can be built on empirical return distributions instead of directional forecasts. Returns are computed over a fixed horizon, collected from history, sorted, and converted into percentiles to place a two-sided grid at statistically likely price levels without assuming a Gaussian model or ignoring fat tails.
Order sizing uses inverse probability weighting: frequent, near-mean levels trade small; rare tail levels trade larger, tempered with a square-root factor and an aggressiveness multiplier. In MT5 terms, BUY LIMITs map to negative-return percentiles, SELL LIMITs to positive ones, with optional BUY/SELL/NEUTRAL bias.
The system stays adaptive by expiring and rebuilding grids as distributions drift, and manages risk via side-specific and global profit targets, order timeouts, position/volume caps, deviation limits, and news-awa...
👉 Read | Signals | @mql5dev
Order sizing uses inverse probability weighting: frequent, near-mean levels trade small; rare tail levels trade larger, tempered with a square-root factor and an aggressiveness multiplier. In MT5 terms, BUY LIMITs map to negative-return percentiles, SELL LIMITs to positive ones, with optional BUY/SELL/NEUTRAL bias.
The system stays adaptive by expiring and rebuilding grids as distributions drift, and manages risk via side-specific and global profit targets, order timeouts, position/volume caps, deviation limits, and news-awa...
👉 Read | Signals | @mql5dev
❤15👍4🎉3👌2
Most MT5 change detectors label regime breaks after they’re visible. This article targets live trading with Bayesian Online Change-Point Detection (BOCPD), updating each bar using only past data and returning a calibrated probability that the current regime just ended.
BOCPD tracks a posterior over run length (bars since last change). A constant hazard rate sets expected regime duration, while a conjugate Normal-Gamma model yields a fast Student-t predictive score that reacts to shifts in mean or volatility.
Implementation is a standalone MQL5 CBOCPD class: capped run-length to keep cost bounded, log-space math to avoid underflow, and a warm-up status to prevent misleading early signals. Uses include a live regime monitor, a self-resetting adaptive average, and a risk overlay that reduces exposure on detected instability.
👉 Read | Calendar | @mql5dev
BOCPD tracks a posterior over run length (bars since last change). A constant hazard rate sets expected regime duration, while a conjugate Normal-Gamma model yields a fast Student-t predictive score that reacts to shifts in mean or volatility.
Implementation is a standalone MQL5 CBOCPD class: capped run-length to keep cost bounded, log-space math to avoid underflow, and a warm-up status to prevent misleading early signals. Uses include a live regime monitor, a self-resetting adaptive average, and a risk overlay that reduces exposure on detected instability.
👉 Read | Calendar | @mql5dev
❤16👍11👌4👨💻1
MetaTrader 5 keeps closed-trade details in History, but built-in export emits HTML that Excel imports as text, triggers conversion prompts, and forces manual date and numeric cleanup. Copy-paste loses structure and does not scale.
An MQL5 script can export directly to XLSX by reconstructing trades from deal history. Trades are paired via DEAL_POSITION_ID, with SL/TP retrieved using a two-pass lookup: read DEAL_SL/DEAL_TP first, then fall back to ORDER_SL/ORDER_TP via DEAL_ORDER.
XLSX avoids CSV type inference by writing explicit cell types, Excel date serials with styles, and a bold header row. The implementation separates trade reconstruction, SpreadsheetML XML generation, and ZIP packaging into distinct modules, producing a file that opens in Excel or Google Sheets without conversion steps.
👉 Read | CodeBase | @mql5dev
An MQL5 script can export directly to XLSX by reconstructing trades from deal history. Trades are paired via DEAL_POSITION_ID, with SL/TP retrieved using a two-pass lookup: read DEAL_SL/DEAL_TP first, then fall back to ORDER_SL/ORDER_TP via DEAL_ORDER.
XLSX avoids CSV type inference by writing explicit cell types, Excel date serials with styles, and a bold header row. The implementation separates trade reconstruction, SpreadsheetML XML generation, and ZIP packaging into distinct modules, producing a file that opens in Excel or Google Sheets without conversion steps.
👉 Read | CodeBase | @mql5dev
❤15👍7👌1
Beginner MQL5 EAs often compile, trade, and backtest, yet still fail live due to missing architecture around execution, validation, and risk controls.
A moving-average crossover example highlights four common issues: repeated entries from per-tick evaluation, no position awareness, fixed SL/TP that ignores volatility, and no result checking on trade operations.
Key hardening steps: add new-bar detection, isolate trades with a Magic Number, count positions by symbol and direction with optional hedging rules, and replace static stops with ATR-based distances.
Production readiness also requires validation of indicator buffers and BarsCalculated(), CopyBuffer() checks, SymbolInfoTick() pricing snapshots, NormalizeDouble() on levels, and detailed error logging when orders are rejected.
👉 Read | NeuroBook | @mql5dev
A moving-average crossover example highlights four common issues: repeated entries from per-tick evaluation, no position awareness, fixed SL/TP that ignores volatility, and no result checking on trade operations.
Key hardening steps: add new-bar detection, isolate trades with a Magic Number, count positions by symbol and direction with optional hedging rules, and replace static stops with ATR-based distances.
Production readiness also requires validation of indicator buffers and BarsCalculated(), CopyBuffer() checks, SymbolInfoTick() pricing snapshots, NormalizeDouble() on levels, and detailed error logging when orders are rejected.
👉 Read | NeuroBook | @mql5dev
❤45👍9⚡1
Mediana & Parallel Lines MTF is an MT5 indicator that plots higher-timeframe parallel channels on the current chart using only the last two closed candles of each selected timeframe (MN1, W1, D1, H4, H1, M30, M15).
For each timeframe, three lines are drawn with identical slope: a Median line through (Open+Close)/2, plus High and Low lines offset from the second-to-last candle’s High and Low. The slope is derived from the median change between the two reference candles and is extended to the right as a projection.
Timeframes can be enabled independently with per-timeframe colors, plus global line width and style. A safety rule hides channels that are not higher than the current chart timeframe. Calculations run once per new bar, objects are cleaned up on deinit, an info panel lists active channels, and the logic avoids repainting by using closed bars ...
👉 Read | CodeBase | @mql5dev
For each timeframe, three lines are drawn with identical slope: a Median line through (Open+Close)/2, plus High and Low lines offset from the second-to-last candle’s High and Low. The slope is derived from the median change between the two reference candles and is extended to the right as a projection.
Timeframes can be enabled independently with per-timeframe colors, plus global line width and style. A safety rule hides channels that are not higher than the current chart timeframe. Calculations run once per new bar, objects are cleaned up on deinit, an info panel lists active channels, and the logic avoids repainting by using closed bars ...
👉 Read | CodeBase | @mql5dev
❤18👌5👍4👨💻2
Clock (Spread).mq5 is an MT5 chart utility indicator that places a corner label with two live metrics: time remaining until the current bar closes and the current spread in points (Ask − Bid) shown in parentheses.
The timer is updated once per second via EventSetTimer(1), keeping the countdown active even without incoming ticks, and it also refreshes on each tick through OnCalculate. Output follows formats like “04:32 (12)”, indicating 4 minutes 32 seconds to bar close with a 12‑point spread.
No plots are drawn on the chart (indicator_plots 0). A single OBJ_LABEL is created, with a per chart/symbol/timeframe unique name derived from a configurable prefix to prevent object collisions across multiple instances.
Configurable inputs cover font name, size, color, and X/Y pixel offsets from the top-left corner.
👉 Read | CodeBase | @mql5dev
The timer is updated once per second via EventSetTimer(1), keeping the countdown active even without incoming ticks, and it also refreshes on each tick through OnCalculate. Output follows formats like “04:32 (12)”, indicating 4 minutes 32 seconds to bar close with a 12‑point spread.
No plots are drawn on the chart (indicator_plots 0). A single OBJ_LABEL is created, with a per chart/symbol/timeframe unique name derived from a configurable prefix to prevent object collisions across multiple instances.
Configurable inputs cover font name, size, color, and X/Y pixel offsets from the top-left corner.
👉 Read | CodeBase | @mql5dev
❤29👍5👌1
SniperGold SMC ProPlus is an MT5 chart indicator that renders Smart Money Concepts structure and an optional setup readout. All BOS, CHoCH, sweeps, and signals are confirmed on fully closed candles, so plotted output does not change after bar close.
Chart objects include internal and swing structure lines, HH/HL/LH/LL labeling with strong/weak highs and lows, internal and swing order blocks (optionally volume-weighted), fair value gaps on the current timeframe or projected from a higher timeframe, equal highs/lows with resting liquidity levels, sweep markers, premium/equilibrium/discount zones, and prior day/week/month highs and lows. A multi-timeframe bias panel supports three higher timeframes.
The setup panel outputs BUY/SELL/WAIT with entry, SL/TPs, R:R, and a confluence score. Signals are gated by objective steps such as sweep, CHoCH, OB/FVG tap in t...
👉 Read | Signals | @mql5dev
Chart objects include internal and swing structure lines, HH/HL/LH/LL labeling with strong/weak highs and lows, internal and swing order blocks (optionally volume-weighted), fair value gaps on the current timeframe or projected from a higher timeframe, equal highs/lows with resting liquidity levels, sweep markers, premium/equilibrium/discount zones, and prior day/week/month highs and lows. A multi-timeframe bias panel supports three higher timeframes.
The setup panel outputs BUY/SELL/WAIT with entry, SL/TPs, R:R, and a confluence score. Signals are gated by objective steps such as sweep, CHoCH, OB/FVG tap in t...
👉 Read | Signals | @mql5dev
❤22👍12👨💻2🎉1👌1
The article breaks down the Blue Monkey metaheuristic for optimizing discrete trading robots, mapping the method’s “teams, leaders, offspring, and migration” into a structured search process. A population is split into groups that explore in parallel, while a separate offspring set injects new candidates and replaces weak adults when it improves fitness.
Implementation details focus on an MT5-ready design: a C_AO_BM class extends a base optimizer, exposes tunable population size, group count, and offspring ratio, and manages per-agent state via arrays for position, fitness, velocity (Rate), and adaptive weights.
Core iteration alternates between Moving and Revision: initialize bounded discrete parameters, then update positions by steering each agent toward its group leader (offspring toward the best child) using velocity-based updates plus random factors...
👉 Read | AppStore | @mql5dev
Implementation details focus on an MT5-ready design: a C_AO_BM class extends a base optimizer, exposes tunable population size, group count, and offspring ratio, and manages per-agent state via arrays for position, fitness, velocity (Rate), and adaptive weights.
Core iteration alternates between Moving and Revision: initialize bounded discrete parameters, then update positions by steering each agent toward its group leader (offspring toward the best child) using velocity-based updates plus random factors...
👉 Read | AppStore | @mql5dev
❤21👍6👌1
Managing multiple MetaTrader 5 Expert Advisors often requires separate terminal instances per strategy or account, sometimes across different servers. Existing tooling is limited: MT4 MultiTerminal is discontinued, MT5 has no equivalent, and third-party options mostly stop at monitoring.
A proposed architecture splits responsibilities between a main web server (dashboard and orchestration), per-host terminal web servers (local control via Python + MetaTrader5 library), and a lightweight data layer starting with SQLite, with a path to PostgreSQL later.
An MVP starts with a terminal-side REST API to start/stop a specific MT5 instance and query account status. Implementation uses FastAPI handlers and Uvicorn, beginning with GET / returning HTML via HTMLResponse instead of default JSON serialization.
👉 Read | Freelance | @mql5dev
A proposed architecture splits responsibilities between a main web server (dashboard and orchestration), per-host terminal web servers (local control via Python + MetaTrader5 library), and a lightweight data layer starting with SQLite, with a path to PostgreSQL later.
An MVP starts with a terminal-side REST API to start/stop a specific MT5 instance and query account status. Implementation uses FastAPI handlers and Uvicorn, beginning with GET / returning HTML via HTMLResponse instead of default JSON serialization.
👉 Read | Freelance | @mql5dev
❤17👍15🤯1👌1
Part 2 evolves an MVP FastAPI service from controlling one MT5 terminal to managing multiple local instances via a simple web UI.
The codebase is split for maintainability: terminal process logic moves into mt5_control.py, while main.py keeps only route handlers. Templates and static assets are added using Jinja2 plus a mounted /static path.
Instance management becomes name-based with POST /start/{name} and /stop/{name}. A load_instances() scan uses psutil to map registered terminal folders to running PIDs, preventing duplicate starts and handling already-stopped processes. Launch uses subprocess.Popen with /portable to isolate each terminal directory.
👉 Read | Signals | @mql5dev
The codebase is split for maintainability: terminal process logic moves into mt5_control.py, while main.py keeps only route handlers. Templates and static assets are added using Jinja2 plus a mounted /static path.
Instance management becomes name-based with POST /start/{name} and /stop/{name}. A load_instances() scan uses psutil to map registered terminal folders to running PIDs, preventing duplicate starts and handling already-stopped processes. Launch uses subprocess.Popen with /portable to isolate each terminal directory.
👉 Read | Signals | @mql5dev
❤16👍8👌2
Mamba4Cast targets zero-shot time-series forecasting for trading: deploy on new symbols without retraining, while SSM-based blocks keep inference linear in sequence length for low-latency decisions. It outputs the full forecast horizon in one pass, reducing the error drift common in step-by-step approaches.
This part focuses on the preprocessing layer CMamba4CastEmbedding. It standardizes inputs via convolutional projection with TANH, batch normalization, and a parallel path that injects sinusoidal/cosine temporal markers. The two representations are concatenated to form a dense per-bar embedding.
Implementation details matter for MQL5: static submodules avoid dynamic allocation, backprop cleanly de-concatenates gradients per branch, then merges them for stable weight updates. Next, the encoder stacks multi-kernel convolutions, concatenates and normalizes f...
👉 Read | Docs | @mql5dev
This part focuses on the preprocessing layer CMamba4CastEmbedding. It standardizes inputs via convolutional projection with TANH, batch normalization, and a parallel path that injects sinusoidal/cosine temporal markers. The two representations are concatenated to form a dense per-bar embedding.
Implementation details matter for MQL5: static submodules avoid dynamic allocation, backprop cleanly de-concatenates gradients per branch, then merges them for stable weight updates. Next, the encoder stacks multi-kernel convolutions, concatenates and normalizes f...
👉 Read | Docs | @mql5dev
❤15👍6🤡3👌2
Most MT5 volatility indicators reduce each bar to a single close, ignoring open/high/low and missing most intrabar movement. Range-based estimators use full OHLC to produce a less noisy variance estimate from the same window, making volatility signals smoother and more responsive.
Four estimators are implemented: close-to-close (baseline), Parkinson (high/low, efficient but gap-blind), Garman-Klass (full bar, even more efficient but still gap-blind), and Yang-Zhang (adds previous close plus drift-robust intrabar term to measure overnight gaps directly). Yang-Zhang is the practical default for instruments with session breaks.
A reusable MQL5 library, VolatilityEstimators.mqh, wraps these methods behind one enum-driven interface using an O(1) ring buffer, shared window storage, readiness checks, input validation, and optional annualization. Two indicat...
👉 Read | Freelance | @mql5dev
Four estimators are implemented: close-to-close (baseline), Parkinson (high/low, efficient but gap-blind), Garman-Klass (full bar, even more efficient but still gap-blind), and Yang-Zhang (adds previous close plus drift-robust intrabar term to measure overnight gaps directly). Yang-Zhang is the practical default for instruments with session breaks.
A reusable MQL5 library, VolatilityEstimators.mqh, wraps these methods behind one enum-driven interface using an O(1) ring buffer, shared window storage, readiness checks, input validation, and optional annualization. Two indicat...
👉 Read | Freelance | @mql5dev
❤18👍6🤔3👌1
Mantis targets time-series classification for trading tasks where forecasting models struggle: it learns regime and pattern labels efficiently, with reliable confidence for decision-making.
The core design splits a series into a fixed number of patches, then applies hybrid attention using local convolution/pooling tokens plus global tokens. This keeps computation near-linear while still capturing microstructure and longer trends in high-frequency data.
Self-supervised contrastive pretraining builds stable embeddings across augmentations, making patterns robust to timing and amplitude shifts. A calibration step via temperature scaling turns logits into probabilities that better match real-world hit rates for risk management.
For multivariate inputs, lightweight channel adapters compress cross-indicator relationships without parameter blowup, enabling practi...
👉 Read | AlgoBook | @mql5dev
The core design splits a series into a fixed number of patches, then applies hybrid attention using local convolution/pooling tokens plus global tokens. This keeps computation near-linear while still capturing microstructure and longer trends in high-frequency data.
Self-supervised contrastive pretraining builds stable embeddings across augmentations, making patterns robust to timing and amplitude shifts. A calibration step via temperature scaling turns logits into probabilities that better match real-world hit rates for risk management.
For multivariate inputs, lightweight channel adapters compress cross-indicator relationships without parameter blowup, enabling practi...
👉 Read | AlgoBook | @mql5dev
❤15👍3⚡1👌1
MetaTrader 5 stores deal history in an opaque format and exports mainly as static HTML, which limits querying, joins, and automated reporting.
An Expert Advisor can persist each OnTrade() event into an SQLite file in MQL5/Files/ using the built-in Database* API (build 2485+). Deals are captured incrementally by comparing HistoryDealsTotal() to the last processed count, with OnInit() reconciling missing rows after restarts via SELECT COUNT(*).
SQLite provides indexed, parameterized INSERTs via DatabasePrepare/DatabaseBind/DatabaseRead and supports fast analytics with standard SQL. A single trade_events table can store OPEN/CLOSE/BALANCE/OTHER with event_time as sortable YYYY.MM.DD HH:MM:SS text.
👉 Read | Docs | @mql5dev
An Expert Advisor can persist each OnTrade() event into an SQLite file in MQL5/Files/ using the built-in Database* API (build 2485+). Deals are captured incrementally by comparing HistoryDealsTotal() to the last processed count, with OnInit() reconciling missing rows after restarts via SELECT COUNT(*).
SQLite provides indexed, parameterized INSERTs via DatabasePrepare/DatabaseBind/DatabaseRead and supports fast analytics with standard SQL. A single trade_events table can store OPEN/CLOSE/BALANCE/OTHER with event_time as sortable YYYY.MM.DD HH:MM:SS text.
👉 Read | Docs | @mql5dev
❤24👍3👨💻3✍2👌1