This article turns Larry Williams-style price behavior into a testable MQL5 framework instead of a fixed βone-sizeβ scalper. The EA waits for market structure first (3-bar swing high/low with inside/outside-bar exclusions), then requires volatility expansion to trigger a breakout entryβno late fills.
Two volatility engines are supported: prior-bar range or a swing-distance comparison that picks the dominant recent move. Entry levels are projected from the current open; stops can be range-based or anchored to the swing extreme. Exits are modular: first profitable moment, time-based bar count, or risk-to-reward targets.
For research, the EA adds optional day/time filters, one-position-only enforcement, and risk-based position sizing driven by stop distance. Execution monitors intraday breakouts via 1-minute close cross logic, recalculating levels once per new...
π Read | Freelance | @mql5dev
#MQL5 #MT5 #EA
Two volatility engines are supported: prior-bar range or a swing-distance comparison that picks the dominant recent move. Entry levels are projected from the current open; stops can be range-based or anchored to the swing extreme. Exits are modular: first profitable moment, time-based bar count, or risk-to-reward targets.
For research, the EA adds optional day/time filters, one-position-only enforcement, and risk-based position sizing driven by stop distance. Execution monitors intraday breakouts via 1-minute close cross logic, recalculating levels once per new...
π Read | Freelance | @mql5dev
#MQL5 #MT5 #EA
β€33π2
Part 14 extends an MQL5 canvas-based dashboard with a scrollable text panel that avoids native object limits by rendering text at pixel level. The result is clipped, antialiased typography with a web-like scroll experience inside a CCanvas surface.
Scrolling is handled by a custom rounded scrollbar that expands on hover, includes up/down buttons, a draggable slider, and mouse-wheel support confined to the text area to prevent chart zoom conflicts. The panel respects theme toggles, background opacity, resizing, and minimization via shared event handling.
The implementation adds text wrapping based on measured font widths, line classification for headings/links/emails to apply colors, and reusable drawing utilities like rounded rectangles and color adjustment, improving both readability and UI consistency for traders and MT5 developers.
π Read | Calendar | @mql5dev
#MQL5 #MT5 #Indicator
Scrolling is handled by a custom rounded scrollbar that expands on hover, includes up/down buttons, a draggable slider, and mouse-wheel support confined to the text area to prevent chart zoom conflicts. The panel respects theme toggles, background opacity, resizing, and minimization via shared event handling.
The implementation adds text wrapping based on measured font widths, line classification for headings/links/emails to apply colors, and reusable drawing utilities like rounded rectangles and color adjustment, improving both readability and UI consistency for traders and MT5 developers.
π Read | Calendar | @mql5dev
#MQL5 #MT5 #Indicator
β€32π2π1
In MetaTrader 5 build 5570, we have improved ONNX support in MQL5:
β’ Models now run significantly faster on graphics cards with CUDA support.
β’ New flags have been added for GPU management and logging.
β’ The library workflow has been revised β it is now installed only on the first launch of a program using ONNX, rather than with the platform.
In addition, we have refined the rendering of text and analytical objects on charts using the Blend2D engine introduced in the previous update. We have also improved trading reports and made the strategy tester more resilient.
The web version of the platform has received several improvements as well. When adjusting stop levels directly on a chart, you can now see an approximate profit or loss value in monetary terms. We have also fixed the display of certain trading data.
Read more...
β’ Models now run significantly faster on graphics cards with CUDA support.
β’ New flags have been added for GPU management and logging.
β’ The library workflow has been revised β it is now installed only on the first launch of a program using ONNX, rather than with the platform.
In addition, we have refined the rendering of text and analytical objects on charts using the Blend2D engine introduced in the previous update. We have also improved trading reports and made the strategy tester more resilient.
The web version of the platform has received several improvements as well. When adjusting stop levels directly on a chart, you can now see an approximate profit or loss value in monetary terms. We have also fixed the display of certain trading data.
Read more...
β€70π14π4π2
Traditional SuperTrend variants tend to lag and generate whipsaws due to fixed ATR multipliers. SuperTrend Quant Pro Elite addresses this with Z-Score normalization, adjusting sensitivity to current volatility by widening during spikes and tightening during stable conditions.
An adaptive volatility engine recalculates the ATR multiplier in real time. Volume confluence based on tick-volume VSA confirms signals only when activity exceeds institutional averages. Regime detection classifies markets as Trending (solid line) or Choppy (dotted line) using ADX logic.
A built-in multi-timeframe dashboard reports trend state across M15, M30, H1, H4, and D1. On-chart metrics include edge probability and profit factor from the active timeframeβs history.
Signal map: green line/arrow bullish, red bearish, star marks aligned volume and trend strength, dotted line...
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #Indicator
An adaptive volatility engine recalculates the ATR multiplier in real time. Volume confluence based on tick-volume VSA confirms signals only when activity exceeds institutional averages. Regime detection classifies markets as Trending (solid line) or Choppy (dotted line) using ADX logic.
A built-in multi-timeframe dashboard reports trend state across M15, M30, H1, H4, and D1. On-chart metrics include edge probability and profit factor from the active timeframeβs history.
Signal map: green line/arrow bullish, red bearish, star marks aligned volume and trend strength, dotted line...
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #Indicator
β€42β‘3
Basic Risk Calculator targets a recurring issue in discretionary trading: consistent position sizing. An on-chart panel computes trade volume from account balance, risk percentage, and stop-loss distance, returning both lot size and risk amount in account currency.
The utility supports multiple asset classes via symbol-specific tick value handling, auto-detects balance, and rounds volume to broker lot steps. It enforces minimum and maximum volume limits to reduce order rejections, and uses event-driven updates designed to avoid platform slowdowns.
A Pro Risk Manager variant adds pending-order price entry, periodic auto-refresh, 1/2/3% presets, take-profit and risk:reward output, bidirectional price/pip conversion, tick-synced pricing, dedicated SL price input, and mode-aware field locking for error reduction.
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #EA
The utility supports multiple asset classes via symbol-specific tick value handling, auto-detects balance, and rounds volume to broker lot steps. It enforces minimum and maximum volume limits to reduce order rejections, and uses event-driven updates designed to avoid platform slowdowns.
A Pro Risk Manager variant adds pending-order price entry, periodic auto-refresh, 1/2/3% presets, take-profit and risk:reward output, bidirectional price/pip conversion, tick-synced pricing, dedicated SL price input, and mode-aware field locking for error reduction.
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #EA
β€33
TrendMomentumEA is an MT5 Expert Advisor built around trend and momentum filters using EMA50/EMA200, RSI, and Stochastic. Trade logic is evaluated on the last closed candle to reduce false signals from intra-candle noise.
Directional bias is restricted to price above both EMA50 and EMA200 for longs and below both for shorts. Entries require RSI alignment plus Stochastic %K/%D crossover confirmation. A session filter limits activity to London and New York windows based on broker server time.
Execution includes single-position control per symbol and Magic Number, with configurable lot size, stop loss, and take profit. Typical use cases include major FX pairs, indices, and commodities on M15 or H1. Demo validation and server-time verification remain mandatory; behavior is trend/swing oriented rather than scalping.
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #EA
Directional bias is restricted to price above both EMA50 and EMA200 for longs and below both for shorts. Entries require RSI alignment plus Stochastic %K/%D crossover confirmation. A session filter limits activity to London and New York windows based on broker server time.
Execution includes single-position control per symbol and Magic Number, with configurable lot size, stop loss, and take profit. Typical use cases include major FX pairs, indices, and commodities on M15 or H1. Demo validation and server-time verification remain mandatory; behavior is trend/swing oriented rather than scalping.
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #EA
β€40β‘3
An MQL5 analytical EA automates market-state reading using only closed-candle price action, reducing the manual workload across timeframes. It treats states as descriptive context, not signals: Compression (tight, overlapping ranges), Transition (loosening structure), and Expansion (wide, volatile movement). Trend is assessed separately via swing structure and close bias.
Implementation is modular: closed-candle gating (bar 1 timestamp) ensures non-repainting and runs once per bar for stable performance. Core features include relative range comparisons, CLV for close strength and directional bias, and swing-high/low scoring.
A hierarchical classifier resolves overlaps (Expansion, then Compression, then Trend, else Transition) and optional chart overlays visualize swings, compression zones, and state history without affecting logic.
π Read | Docs | @mql5dev
#MQL5 #MT5 #AlgoTrading
Implementation is modular: closed-candle gating (bar 1 timestamp) ensures non-repainting and runs once per bar for stable performance. Core features include relative range comparisons, CLV for close strength and directional bias, and swing-high/low scoring.
A hierarchical classifier resolves overlaps (Expansion, then Compression, then Trend, else Transition) and optional chart overlays visualize swings, compression zones, and state history without affecting logic.
π Read | Docs | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€35π3π2
Part 47 extends the prior liquidity sweep/BOS EA with a Nick Rypock Trailing Reverse (NRTR) system in MQL5.
NRTR signals come from an ATR-based channel. A buy triggers when an up-support level appears after being EMPTY_VALUE on the prior bar; a sell triggers on the first down-support. Optional hedging allows opposing exposure, with MaxPositions enforcing caps.
The implementation loads the iCustom NRTR indicator, copies multiple buffers with retries, and centralizes execution in OnTick with new-bar gating. It adds auto/fixed sizing based on balance, equity, or free margin, ATR or points SL/TP, trailing modes, reversal exits, and virtual SL/TP closures.
π Read | Signals | @mql5dev
#MQL5 #MT5 #Strategy
NRTR signals come from an ATR-based channel. A buy triggers when an up-support level appears after being EMPTY_VALUE on the prior bar; a sell triggers on the first down-support. Optional hedging allows opposing exposure, with MaxPositions enforcing caps.
The implementation loads the iCustom NRTR indicator, copies multiple buffers with retries, and centralizes execution in OnTick with new-bar gating. It adds auto/fixed sizing based on balance, equity, or free margin, ATR or points SL/TP, trailing modes, reversal exits, and virtual SL/TP closures.
π Read | Signals | @mql5dev
#MQL5 #MT5 #Strategy
β€32π6
The article shows how to build custom MT5 indicators using window-function math instead of standard moving averages. Triangular windows can be derived by combining or directly computing linear coefficients, then normalized either for smoothing (MA-like) or for an oscillator that measures deviation from the mean.
It extends the idea by summing multiple sub-waves whose periods evenly divide the main period, letting developers keep low-frequency structure while controlling noise via a βnumber of wavesβ parameter. A key tradeoff is smoothing versus lag.
To reduce lag and improve responsiveness, the article introduces asymmetric sawtooth windows (LWMA as a single tooth) and multi-tooth variants that act like trend channel builders, with behavior changing for odd vs even wave counts.
Practical EAs test crossovers, historical βrewritingβ crossovers with fi...
π Read | NeuroBook | @mql5dev
#MQL5 #MT5 #Indicator
It extends the idea by summing multiple sub-waves whose periods evenly divide the main period, letting developers keep low-frequency structure while controlling noise via a βnumber of wavesβ parameter. A key tradeoff is smoothing versus lag.
To reduce lag and improve responsiveness, the article introduces asymmetric sawtooth windows (LWMA as a single tooth) and multi-tooth variants that act like trend channel builders, with behavior changing for odd vs even wave counts.
Practical EAs test crossovers, historical βrewritingβ crossovers with fi...
π Read | NeuroBook | @mql5dev
#MQL5 #MT5 #Indicator
β€22β‘3
GSM++ is a three-stage pipeline for graph-structured time series: hierarchical graph tokenization, local node encoding, and global dependency encoding. Hierarchical tokenization compacts topology and temporal order into sequences, improving feature extraction while reducing compute, with adjustable granularity per task.
An MQL5 implementation replaces HAC with a trainable Mixture of Tokenization using four token types per bar: node, edge, subgraph, and univariate subgraph. Tokens are fused via attention pooling (CNeuronMoT over CNeuronMHAttentionPooling). Local encoding uses Node-Adaptive Feature Smoothing to control per-node smoothing and reduce noise.
Global encoding follows a hybrid design: Chimera (2D-SSM) plus Hidformer (dual temporal/frequency streams). Testing showed excessive hold times, so CNeuronChimeraPlus adds a third 2D-SSM and rewrite...
π Read | Docs | @mql5dev
#MQL5 #MT5 #AlgoTrading
An MQL5 implementation replaces HAC with a trainable Mixture of Tokenization using four token types per bar: node, edge, subgraph, and univariate subgraph. Tokens are fused via attention pooling (CNeuronMoT over CNeuronMHAttentionPooling). Local encoding uses Node-Adaptive Feature Smoothing to control per-node smoothing and reduce noise.
Global encoding follows a hybrid design: Chimera (2D-SSM) plus Hidformer (dual temporal/frequency streams). Testing showed excessive hold times, so CNeuronChimeraPlus adds a third 2D-SSM and rewrite...
π Read | Docs | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€40
Backtests were run on H1 for XAUUSD (01/03/2025β20/01/2026) and EURUSD (01/03/2025β21/01/2026) using a hybrid system: an ONNX market-structure classifier combined with deterministic execution and risk rules.
On each new bar, six ATR-normalized and context features are fed into the model: momentum change, distance to 50-bar swing high/low, relative tick volume vs 20-bar average, candle body strength, and hour-of-day. The model returns a structure label plus probability, with signals accepted only above a 0.65 confidence threshold.
Trade direction is filtered by a 50-period SMA: longs only above, shorts only below. Entries are placed as pending limits at a Fibonacci retracement level (default 61.8%) between detected pivots, with SL beyond structure invalidation, TP at 1:2 RR, and order expiry. Exposure is capped to one position or one pending order. Trailing ...
π Read | VPS | @mql5dev
#MQL5 #MT5 #AI
On each new bar, six ATR-normalized and context features are fed into the model: momentum change, distance to 50-bar swing high/low, relative tick volume vs 20-bar average, candle body strength, and hour-of-day. The model returns a structure label plus probability, with signals accepted only above a 0.65 confidence threshold.
Trade direction is filtered by a 50-period SMA: longs only above, shorts only below. Entries are placed as pending limits at a Fibonacci retracement level (default 61.8%) between detected pivots, with SL beyond structure invalidation, TP at 1:2 RR, and order expiry. Exposure is capped to one position or one pending order. Trailing ...
π Read | VPS | @mql5dev
#MQL5 #MT5 #AI
β€49β13β‘2
Backtests were run on EURUSD and GBPUSD from 01/03/2025 to 20/01/2026 on M5, with ONNX training targeted at M5βM15 behavior.
SidewaysMartingale is an Expert Advisor focused on range-bound execution with martingale recovery, gated by an ONNX-based regime classifier. The model outputs probabilities for sideways, bullish, and bearish states. Trading is enabled only when prob_side exceeds a configured threshold.
Model inputs use 9 engineered features: EMA200 slope, price distance to EMA200, ATR, range/ATR, breakout pressure, body dominance, day-of-week, hour-of-day, and previous candle direction.
Entries use Envelopes extremes: buys near the lower band and sells near the upper band, only under sideways confirmation. Martingale scaling is distance-based with capped series length and lot multiplier. A safety filter blocks new martingale legs when prob_bul...
π Read | AppStore | @mql5dev
#MQL5 #MT5 #AITrading
SidewaysMartingale is an Expert Advisor focused on range-bound execution with martingale recovery, gated by an ONNX-based regime classifier. The model outputs probabilities for sideways, bullish, and bearish states. Trading is enabled only when prob_side exceeds a configured threshold.
Model inputs use 9 engineered features: EMA200 slope, price distance to EMA200, ATR, range/ATR, breakout pressure, body dominance, day-of-week, hour-of-day, and previous candle direction.
Entries use Envelopes extremes: buys near the lower band and sells near the upper band, only under sideways confirmation. Martingale scaling is distance-based with capped series length and lot multiplier. A safety filter blocks new martingale legs when prob_bul...
π Read | AppStore | @mql5dev
#MQL5 #MT5 #AITrading
β€43π2π1
MetaTrader 5 exposes only current balance and equity, so long-term account behavior often gets analyzed outside the terminal. This article builds an MQL5 indicator that reconstructs the full deal history and plots four time series in a subwindow: starting balance baseline, realized balance (step changes on closes), equity, and floating P/L.
Accuracy comes from processing deals chronologically, detecting deposits/credits to anchor the baseline, and tracking position open/close state (including reversals). Equity is derived per bar as balance-at-time plus aggregated unrealized P/L across all open positions.
Performance is handled with per-bar sampling, periodic history refresh (based on deal count), cached tick specs per symbol, and a bounded price cache to avoid repeated CopyRates calls across multi-symbol portfolios. Practical outcome: immediate visual...
π Read | AppStore | @mql5dev
#MQL5 #MT5 #Indicator
Accuracy comes from processing deals chronologically, detecting deposits/credits to anchor the baseline, and tracking position open/close state (including reversals). Equity is derived per bar as balance-at-time plus aggregated unrealized P/L across all open positions.
Performance is handled with per-bar sampling, periodic history refresh (based on deal count), cached tick specs per symbol, and a bounded price cache to avoid repeated CopyRates calls across multi-symbol portfolios. Practical outcome: immediate visual...
π Read | AppStore | @mql5dev
#MQL5 #MT5 #Indicator
β€30
Part 6 refactors a dynamic multi-pair EA around execution quality rather than entry style, adding an adaptive spread module that continuously measures real-time spreads per symbol and blocks trading when costs spike.
Spreads are evaluated with both absolute limits and ATR-normalized thresholds, then symbols are ranked by a composite cost-efficiency score. Only the top set stays active, creating a smart routing layer that reallocates attention as liquidity changes and re-enables symbols when conditions recover.
Strategy logic remains simple (EMA crossover with RSI confirmation), but runs only after eligibility checks. The implementation emphasizes scalability: timer-driven spread scans, one-symbol-per-tick processing, instrument-aware pip/lot sizing, standardized CTrade execution, and a chart dashboard for transparency and diagnostics.
π Read | AppStore | @mql5dev
#MQL5 #MT5 #EA
Spreads are evaluated with both absolute limits and ATR-normalized thresholds, then symbols are ranked by a composite cost-efficiency score. Only the top set stays active, creating a smart routing layer that reallocates attention as liquidity changes and re-enables symbols when conditions recover.
Strategy logic remains simple (EMA crossover with RSI confirmation), but runs only after eligibility checks. The implementation emphasizes scalability: timer-driven spread scans, one-symbol-per-tick processing, instrument-aware pip/lot sizing, standardized CTrade execution, and a chart dashboard for transparency and diagnostics.
π Read | AppStore | @mql5dev
#MQL5 #MT5 #EA
β€31π€―1
NOA2 (NeuroBoids) blends classic Boids flocking with per-agent neural networks to solve continuous optimization. Agents still follow cohesion, separation, and alignment, but a small MLP learns from each agentβs own search history to adjust speed and dynamically reweight those rules.
The key idea is localized learning: agents near strong candidates naturally shift toward exploitation, while others remain exploratory. This produces heterogeneous behavior without centralized coordination, improving coverage early and refinement later.
The implementation defines an agent with position/velocity, an experience buffer, best-local tracking, and online weight updates. The NOA2 class adds configurable swarm distances/weights, speed limits, neural influence, and stagnation-aware exploration. Movement combines standard Boids forces with neural outputs, plus boundary...
π Read | Forum | @mql5dev
#MQL5 #MT5 #AlgoTrading
The key idea is localized learning: agents near strong candidates naturally shift toward exploitation, while others remain exploratory. This produces heterogeneous behavior without centralized coordination, improving coverage early and refinement later.
The implementation defines an agent with position/velocity, an experience buffer, best-local tracking, and online weight updates. The NOA2 class adds configurable swarm distances/weights, speed limits, neural influence, and stagnation-aware exploration. Movement combines standard Boids forces with neural outputs, plus boundary...
π Read | Forum | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€21π6π3β2π2π2
Graph theory can be applied to price action by modeling swing highs/lows as nodes and chronological transitions as directed edges. Breadth-First Search (BFS) then traverses this structure level-order from a configurable historical root, keeping analysis time-consistent.
An EA design follows: detect swings, build an alternating high/low directed graph, run BFS to assign depth, classify nodes via higher-high/higher-low vs lower-high/lower-low logic, then aggregate a weighted bias score from -1 to +1 with recent levels prioritized.
Execution is gated by bias thresholds, optional swing-break confirmation, and CTrade-based order management. Modes cover bar lookback, multi-day context, or yesterday-only, with on-chart rendering of nodes, edges, levels, and current trade permission state.
π Read | Signals | @mql5dev
#MQL5 #MT5 #AlgoTrading
An EA design follows: detect swings, build an alternating high/low directed graph, run BFS to assign depth, classify nodes via higher-high/higher-low vs lower-high/lower-low logic, then aggregate a weighted bias score from -1 to +1 with recent levels prioritized.
Execution is gated by bias thresholds, optional swing-break confirmation, and CTrade-based order management. Modes cover bar lookback, multi-day context, or yesterday-only, with on-chart rendering of nodes, edges, levels, and current trade permission state.
π Read | Signals | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€24β‘5π3
Socket-based IPC is being positioned as the next step for a MetaTrader 5 replay/simulator order system, keeping the design portable across apps and operating systems.
RTD/DDE with Excel is useful for teaching, but it is effectively one-way. A bidirectional channel enables calculations to run outside MQL5 and feed results back into an EA without recompilation.
A practical architecture places Python between MT5 and Excel. MT5 keeps client-side socket code in MQL5, while Python hosts the server side and can later swap Excel for other tooling.
Excel integration is handled via xlwings, which runs Python in place of some VBA workflows. Setup covers Python install with PATH, pip upgrades, installing xlwings, licensing for non-commercial use, and registering the Excel add-in via UI or xlwings CLI.
π Read | Forum | @mql5dev
#MQL5 #MT5 #Python
RTD/DDE with Excel is useful for teaching, but it is effectively one-way. A bidirectional channel enables calculations to run outside MQL5 and feed results back into an EA without recompilation.
A practical architecture places Python between MT5 and Excel. MT5 keeps client-side socket code in MQL5, while Python hosts the server side and can later swap Excel for other tooling.
Excel integration is handled via xlwings, which runs Python in place of some VBA workflows. Setup covers Python install with PATH, pip upgrades, installing xlwings, licensing for non-commercial use, and registering the Excel add-in via UI or xlwings CLI.
π Read | Forum | @mql5dev
#MQL5 #MT5 #Python
β€30π3π1
This article turns subjective supply/demand zone spotting into a reproducible workflow by quantifying the βimpulsive exitβ that signals imbalance.
The key simplification is modeling a zone with a single higher-timeframe candle and measuring momentum via an Impulse Ratio (close-open)/(high-low), paired with an absolute size filter normalized by ATR. This avoids fragile multi-candle base rules while keeping the structure tradable across timeframes.
A three-stage pipeline connects research to execution: an MQL5 scanner exports swing-point candle metrics to CSV, Python/Jupyter performs distribution and success-rate comparisons to optimize thresholds (e.g., impulse and ATR-scaled body size), then an MQL5 EA encodes the validated rules to project zones and support systematic retest strategies.
π Read | Freelance | @mql5dev
#MQL5 #MT5 #AlgoTrading
The key simplification is modeling a zone with a single higher-timeframe candle and measuring momentum via an Impulse Ratio (close-open)/(high-low), paired with an absolute size filter normalized by ATR. This avoids fragile multi-candle base rules while keeping the structure tradable across timeframes.
A three-stage pipeline connects research to execution: an MQL5 scanner exports swing-point candle metrics to CSV, Python/Jupyter performs distribution and success-rate comparisons to optimize thresholds (e.g., impulse and ATR-scaled body size), then an MQL5 EA encodes the validated rules to project zones and support systematic retest strategies.
π Read | Freelance | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€33β2
ProjectTemplateGen.mq5 is an MT5 script utility that generates a standardized Expert Advisor project layout via MQL5 file system APIs, operating within the platform sandbox. It creates directories and writes ready-to-compile .mq5 sources with event handler skeletons, with runtime configuration through input parameters.
The implementation focuses on dynamic path construction using relative locations, comprehensive file-operation error handling with explicit error codes, and reliable cleanup via FileClose(). Output content is syntactically valid MQL5 and formatted consistently to support scaling.
Generated artifacts are placed under MQL5\Files\[ProjectName]\ due to security restrictions, requiring a manual move to MQL5\Experts\ before development continues.
Potential extensions include multi-file templates (indicators, libraries), emitting JSON/XML config file...
π Read | VPS | @mql5dev
#MQL5 #MT5 #script
The implementation focuses on dynamic path construction using relative locations, comprehensive file-operation error handling with explicit error codes, and reliable cleanup via FileClose(). Output content is syntactically valid MQL5 and formatted consistently to support scaling.
Generated artifacts are placed under MQL5\Files\[ProjectName]\ due to security restrictions, requiring a manual move to MQL5\Experts\ before development continues.
Potential extensions include multi-file templates (indicators, libraries), emitting JSON/XML config file...
π Read | VPS | @mql5dev
#MQL5 #MT5 #script
β€36π3β2
MQL5βs SQLite API is capable but forces manual SQL, repeated boilerplate, and fragile error handling. The article builds a lightweight ORM that moves SQL out of EA logic and replaces it with strongly-typed models and a fluent, reusable interface.
The framework is assembled from small components: a generic dictionary for named field access, an ORMField class that stores column metadata and values, a BaseModel that generates CREATE/INSERT/UPDATE queries and binds rows back into variables, and a database wrapper that centralizes core SQLite calls.
A DatabaseORM layer adds connection management, transactions, CRUD, selection helpers, and structured error reporting. Models can be defined manually, via reflection-style OnGet/OnSet binding, or through macros for fast Code-First table definitions.
Practical samples show storing and querying backtest reports with Sel...
π Read | Freelance | @mql5dev
#MQL5 #MT5 #EA
The framework is assembled from small components: a generic dictionary for named field access, an ORMField class that stores column metadata and values, a BaseModel that generates CREATE/INSERT/UPDATE queries and binds rows back into variables, and a database wrapper that centralizes core SQLite calls.
A DatabaseORM layer adds connection management, transactions, CRUD, selection helpers, and structured error reporting. Models can be defined manually, via reflection-style OnGet/OnSet binding, or through macros for fast Code-First table definitions.
Practical samples show storing and querying backtest reports with Sel...
π Read | Freelance | @mql5dev
#MQL5 #MT5 #EA
β€55π8β‘5π₯3π2π€©2
TelegramTradeNotify is a lightweight MT4 utility EA that pushes trade notifications to Telegram via the Bot API sendMessage endpoint.
MT4 has no deal events comparable to MT5, so detection is order-based. The EA periodically scans OrdersTotal() and OrdersHistoryTotal(); a new active order triggers an open alert, and a new history record triggers a close alert.
Configuration requires a Telegram bot token and a target Chat ID (user, group, or @channelusername). In MT4, enable βAllow WebRequest for listed URLβ and whitelist https://api.telegram.org, then attach the EA to any chart and set the inputs.
Supports optional BUY/SELL-only filtering, UTF-8 URL encoding for non-ASCII text, optional web page preview disable, configurable timeout, and message prefix. If WebRequest fails, validate firewall/DNS and note some VPS networks may block Telegram; a relay can be...
π Read | Docs | @mql5dev
#MQL4 #MT4 #EA
MT4 has no deal events comparable to MT5, so detection is order-based. The EA periodically scans OrdersTotal() and OrdersHistoryTotal(); a new active order triggers an open alert, and a new history record triggers a close alert.
Configuration requires a Telegram bot token and a target Chat ID (user, group, or @channelusername). In MT4, enable βAllow WebRequest for listed URLβ and whitelist https://api.telegram.org, then attach the EA to any chart and set the inputs.
Supports optional BUY/SELL-only filtering, UTF-8 URL encoding for non-ASCII text, optional web page preview disable, configurable timeout, and message prefix. If WebRequest fails, validate firewall/DNS and note some VPS networks may block Telegram; a relay can be...
π Read | Docs | @mql5dev
#MQL4 #MT4 #EA
β€31π6