Building A Candlestick Trend Constraint Model (Part 11): Revealing Lower-Timeframe Triggers Within Higher-Timeframe Candle Relationships
This article develops an A-B-C-D candlestick constraint model for MetaTrader 5. Candles A and B establish a completed D1 relationship, Candle C supplies a historical M1 setup, and closed M1 candles inside the developing Candle D either confirm or invalidate the sequence. We implement the design as a visual Expert Advisor with optional trading disabled by default, sequence-specific chart objects, restart-safe history reconstruction, spread and position gates, normalized trade parameters, and a reproducible testing plan.
Automating Classic Market Methods in MQL5 (Part 9): Linda Bradford Raschke's 3/10 Oscillator System
The article implements two swing setups in MQL5: Anti, which enters on the first 3/10 oscillator pullback after a signal line zero confirmation with price confirmation, and Holy Grail, which enters on the first pullback to the 20 EMA in a strong rising ADX trend. A single EA runs two independent state machines with precise entry and exit rules, ATR-based stops, and state recovery. You get runnable code and traceable logging.
Online Portfolio Selection: A Provable Regret Bound, and the Cost That Eats It
The article implements Online Portfolio Selection in MQL5: exact simplex projection, four allocators (EG, Universal Portfolio, PAMR, OLMAR), and a BCRP solver on a concave objective. We verify weight paths against the published Python reference and self-check the optimizer. A drift-aware transaction cost model measures turnover and net wealth on a multi-asset basket. Readers get a tested library and evidence on when regret-bounded methods lose to costs.
Neural Networks in Trading: Adaptive Perception of Market Dynamics (Conclusion)
The article continues the work on implementing the STE-FlowNet framework, which combines multi-stream processing with recurrent structures for accurate analysis of complex data. The tests conducted confirmed its stability and flexibility in various scenarios. This architecture speeds up computations and enables deeper modeling of dependencies in time series. This approach opens up new possibilities for practical application in trading and analytics.
Engineering Trading Discipline into Code (Part 9): Building a Trade Activity Audit Trail in MQL5
Trade authorization controls what a cooperating Expert Advisor is permitted to send, but not every account action passes through that code. A trade may originate from the desktop terminal, a mobile device, the web terminal, or another Expert Advisor. This installment develops an independent auditor that records live transaction stages through OnTradeTransaction(), reconciles available historical orders and deals within a configured recovery window, and writes an account-bound CSV journal. An on-chart panel summarizes the selected period and provides refresh, detail, and export controls without modifying trades.
Integrating News Sentiment to Avoid Strategy Disruption in MQL5
We present a dynamic news‑sentiment filter for MQL5 Expert Advisors. It uses WebRequest to query a REST API, parses JSON sentiment and confidence, and gates entries and exits alongside Moving Average and RSI signals. You get an example EA, integration steps, timer‑based updates, and Strategy Tester workarounds. The outcome is fewer trades against dominant news flow and earlier risk reduction when sentiment flips.
Neural Networks in Trading: Adaptive Perception of Market Dynamics (Encoder)
The article presents the comprehensive architecture of the STE-FlowNet encoder, which combines stack memory, recurrent processing, and a correlation mechanism to extract hidden market dependencies. The article demonstrates how these modules are sequentially integrated into a single computational chain capable of performing comprehensive time-series analysis.
Benchmark Champions vs. Real-World Optimization Problems
We analyze why ratings may be inflated due to the alignment of algorithm trajectories with benchmark diagonals, and we supplement the testing methodology with a requirement to keep the global extremum away from the diagonals. We update Forest and Megacity, and perform RAW verification and calibration using VerifyExtremes.mq5. A drop in HHO and DOAm performance serves as a practical indicator of false leaders.
Neural Networks in Trading: Adaptive Perception of Market Dynamics (STE-FlowNet)
The STE-FlowNet framework offers a new perspective on financial data analysis by responding to actual market events rather than fixed timeframes. Its architecture preserves local and temporal dependencies, making it possible to track even small impulses in price dynamics.
Building a Position Lifecycle Manager in MQL5 (Part 2): Managing Manual and Multi-Symbol Positions
This update adds manual position adoption and multi-symbol lifecycle management. The manager detects and tracks positions regardless of the chart, applies initial protection, transitions to break-even under fixed or ATR triggers, and validates broker constraints per symbol. Using the MACD sample for context, it demonstrates reusable management across instruments and manually opened trades.
How to Set Up an AI Hedge Fund in MetaTrader 5
The article examines the architecture of a committee consisting of 15 AI agents: ten analysts and four risk officers vote in three parallel phases, and the Chair records the final result. Isolated pair contexts with separate reputations are used for eight currency pairs. The dynamic vote threshold depends on the daily PnL targets. The Expert Advisor uses only the signal, SL and TP, which allows for evaluation pf the quality of its decisions without any additional mechanics.
Neural Networks in Trading: A Spike-Semantic Approach to Spatiotemporal Identification (Conclusion)
In our interpretation, S3CE-Net skillfully translates the market into the language of events and captures early impulses that traditional indicators simply average out. STFS ensures robust training — the model sees the data from different perspectives and does not overfit to local anomalies. SSAM blocks and the OpenCL implementation deliver practical speed and accuracy, while the separation between training and deployment modes saves resources in production.
Agent Based Market Simulation: Growing a Market From Rules, and Using It to Catch an Overfitted Strategy
A compact MetaTrader 5 library builds a synthetic market from agents: a minority game, a zero‑intelligence double auction, a stylized‑facts analyzer, and a parameter scanner. The result is a testbed with known answers, providing the control real price backtests lack. Each result is cross‑checked by the model's phase transition, a matching Python implementation, and detection of a planted edge.
Online False Discovery Rate Control: Putting an Error Budget on a Live Signal Stream
The article addresses online false discovery rate control for streaming signals, where fixed thresholds inflate noise discoveries. We port LORD3, LORD++ and SAFFRON into MQL5, construct a causal bootstrap p‑value source without a resolution floor, and verify correctness before market data. Dependence stress tests, a budget/level indicator and a two-arm Strategy Tester show how to configure, monitor and throttle streams to keep the acted-on noise fraction within target.
Neural Networks in Trading: A Spiking-Semantic Approach to Spatiotemporal Identification (Key Components)
In this article, we took a detailed look at the integration of the SSAM module into the SEW-ResNeXt block, demonstrating how the S3CE-Net framework enables the effective combination of spiking attention with residual blocks. This architecture ensures accurate processing of temporal and spatial data streams and high training stability. The modularity and flexibility of the components make it easier to extend the model and reuse proven methods.
Neural Networks in Trading: A Spiking-Semantic Approach to Spatiotemporal Identification (S3CE-Net)
We invite you to explore the S3CE-Net framework and its SSAM and STFS mechanisms, which accurately process spiking events while taking causality into account. The model is lightweight, parallel, and capable of identifying complex relationships across time and space.
Interactive Supply and Demand Zone Manager in MQL5 (Part V): Persisting Zones Across Terminal and EA Restarts
We introduce a versioned persistence layer that saves and restores the zone engine's logical state across sessions. The snapshot preserves lifecycle status, interaction history, scores, blacklist prices, and the geometry and time anchors of user‑drawn rectangles, and it is reconstructed and reconciled with chart objects on startup. User zones enter with the minimum score so they integrate into the same lifecycle and trading pipeline.
Neural Networks in Trading: Training Deep Spiking Models (Conclusion)
The article demonstrates a practical implementation of the SEW ResNet framework using MQL5, with a focus on its applied use in trading. The Double Bottleneck makes it possible to simultaneously analyze univariate streams and inter-channel dependencies without losing gradients during training. Spiking activations with adaptive thresholds and gates improve robustness to noise and sensitivity to market novelty. The text provides details on the implementation and test results.
Neural Networks in Trading: Training Deep Spiking Models (Spike Integration)
The article presents a practical implementation of the key components of the SEW-ResNet framework using MQL5. The use of dynamic arrays and spiking mechanisms enables flexible model architecture design and efficient processing of financial time series. The proposed solutions demonstrate how SEW-ResNet can optimize computations and improve the extraction of meaningful features.
Ollivier-Ricci Curvature: Reading the Shape of a Correlation Network, Not Its Level
The article builds an Ollivier–Ricci curvature library in MQL5 for multi‑symbol analysis. A basket becomes a correlation network, and the reading captures network geometry rather than correlation level. It includes an exact optimal transport solver with an internal certificate, a rolling fragility metric with two informative nulls, an indicator that plots the reading against its null band, and a demonstration expert that uses it as a risk gate.
Neural Networks in Trading: Training Deep Spiking Models (SEW-ResNet)
We invite you to explore the SEW-ResNet framework, which allows you to build deep spiking models without degradation issues and with effective gradient management. In this article, we demonstrate how to implement a basic spiking neuron and its algorithms using MQL5.
Foundation Models for Trading (Part III): Running a Generative AI Forecaster Inside MetaTrader 5
We demonstrate live forecast charting with Kronos in MQL5 and an evaluation pipeline designed to be look‑ahead‑safe. Deterministic dumps are scored per horizon against a random‑walk baseline (15,113 predictions), then fed to a simple Strategy Tester rule on EURUSD H1. The findings show no edge, and illustrate how a high threshold can yield a persuasive but low‑information backtest with very few trades.
Neural Networks in Trading: From Transformers to Spiking Neurons (Conclusion)
Neural networks are already changing the way we analyze markets, and new architectures are opening up even more possibilities. In this article, we wrap up our work with the SpikingBrain framework, which opens up new possibilities for us.
Symbol Correlation Monitor with Live Heatmap in MQL5
This work delivers an MQL5 Expert Advisor that reads open-position symbols, builds return series, and computes a rolling Pearson correlation matrix, displayed as a CCanvas heatmap. Off-diagonal pairs that meet a warning threshold are bordered for quick scanning. The code details return processing, correlation arithmetic, and matrix indexing, with a verification script, helping you track shifting co-movements across your active book.
Practical Modules from Other Languages in MQL5 (Part 08): MATPLOTLIB
Learn how to bring advanced plotting and data visualization to the MetaTrader 5 terminal by leveraging Matplotlib, one of Python's most powerful and widely used visualization libraries.
Larry Williams Market Secrets (Part 18): Automating the Greatest Swing Value Breakout Strategy in MQL5
This article converts the Greatest Swing Value breakout rules into a configurable MQL5 Expert Advisor. It implements measurable setup conditions, failure-swing calculations, one-bar setup validity, and M1 breakout confirmation. The EA also supports broker-compatible risk management, manual or percentage-risk sizing, position control, and trade-server validation, providing a reproducible framework for independent Strategy Tester research across different markets and historical periods.
Building AI-Powered Trading Systems in MQL5 (Part 12): Giving the Assistant Chart Vision and Tool Access
We give our AI chat assistant two new abilities in MQL5: sight and tool access. It can now capture the chart as a screenshot, attach it to a message, and view it in the panel, and it can call tools that read live positions, trade history, indicator values, chart objects, and the economic calendar. The assistant reasons from what it sees and queries rather than text alone.
Neural Networks in Trading: From Transformers to Spiking Neurons (Key Components)
We present to the reader an implementation of the SpikingBrain framework’s approaches based on recurrent linear attention with gates, discussed in detail in this article. Forward pass, gradient propagation, and weight update algorithms ensure efficient processing of financial time series and enable the practical implementation of the framework’s key concepts.
Neural Networks in Trading: From Transformers to Spiking Neurons (SpikingBrain)
The SpikingBrain framework demonstrates a unique approach to data processing: neurons respond only to significant events, effectively filtering out noise. Its event-driven architecture reduces computational costs while preserving key information about price movements. Adaptive thresholds and the ability to use pre-trained modules ensure the model's flexibility and scalability.
Inside MetaEditor's AI Assistant: Writing, Repairing and Testing MQL5 with an Agent
We use the MetaTrader 5 AI Assistant to execute the full workflow end to end: create an EA from a natural‑language prompt, compile it, break and watch it self‑correct from compiler output, backtest it, and compare a controlled re‑run. The article details the underlying MCP extensions, configuration and safety limits, and how to connect external AI clients. Readers get a repeatable process for building and testing EAs inside the platform.
Swing Extremes and Pullbacks (Part 5): Filtering Weak Swings Using Candle Imbalance
This article implements an MQL5 Expert Advisor that scores each impulse leg behind a swing extreme with a 0–100 Candle Imbalance Score. The score combines four bounded components—body dominance, directional consistency, leg efficiency, and Fair Value Gap coverage—to filter weak swings before any pullback setup is armed. You will see enforced swing alternation, a state machine for first-clean-retest-only entries, and a three-mode trailing stop, enabling consistent setup selection and exit management.
Neural Networks in Trading: Robust Trading Signals in Any Market Regime (Conclusion)
The article provides a detailed examination of the integration of the ST-Expert framework's approaches into the Extralonger architecture, which enables the simultaneous analysis of temporal and spatial representations of data. The results of testing on real historical data are presented, demonstrating the model's effectiveness and its robustness to market anomalies. The article describes the framework's modular structure, which ensures reproducibility, flexibility for research, and the ability to optimize components in stages.
Graph Theory: Study of Graphs Generated by Some Random Process
This article describes an MQL5 Expert Advisor that models the market as a random graph rather than a fixed structure. Bars are encoded into discrete states; bar-to-bar moves form a decaying, Laplace-smoothed transition matrix, and a k-step random walk yields a bounded directional signal gated by an Erdos–Renyi null-model test. A separate trade-outcome graph over R-milestones learns survival probabilities to manage exits, turning position management into evidence-based rules.
Neural Networks in Trading: Robust Trading Signals in Any Market Regime (Attention Modules)
In this article, we continue implementing the ST-Expert framework approaches, focusing on the practical aspects of applying them using MQL5. Earlier, we examined the theoretical foundations and key components of the model; now we move on to working directly with graph attention algorithms and local and global attention distribution. The main goal of this work is to demonstrate how ST-Expert's conceptual ideas are transformed into workable solutions for analyzing and forecasting financial time series.
Neural Networks in Trading: Robust Trading Signals in Any Market Regime (ST-Expert)
In this article, we will explore the ST-Expert framework, which ensures the robustness of forecasts under market uncertainty by taking local and global dependencies in time series into account. Its flexible architecture promotes model adaptability and improves the accuracy of predictions.
From Novice to Expert: Trading Multi-Symbol Basket
The article develops a multi-symbol basket EA that standardizes prices, derives PCA weights with native MQL5 matrices, forms a synthetic spread, and trades z-score deviations from a rolling mean. It validates symbols and synchronized history, stabilizes component orientation, maps signed weights to leg directions, and applies broker-aware volumes, stops, and netting rules. Basket entries run with rollback protection and chart status, with a reproducible testing procedure.
Intrinsic Time: From the Directional-Change Scaling Laws to the Alpha Engine
The article implements intrinsic-time analysis in MQL5: an event-based directional-change operator that splits ticks into directional-change and overshoot sections. We reproduce the core scaling laws on 17.8 million live EUR/USD ticks and compare them to a random-walk baseline. Finally, we build a hedging-account Expert Advisor that trades the Alpha Engine with limit orders, detailing thresholds, inventory skew, and liquidity control for practical reuse.
Money Management in MQL5 (Part 1): Kelly Position Sizing from the Strategy's Own Edge
This article applies the Kelly criterion to position sizing in native MQL5. It presents a reusable CKelly class that estimates win rate and payoff from closed deals, derives the Kelly fraction, and sizes lots from a stop distance. A Monte Carlo sweep of the Kelly multiplier shows growth peaking at full Kelly while drawdown and ruin increase, motivating fractional Kelly such as half Kelly that preserves most growth with materially lower drawdown.
Neural Networks in Trading: A Unified View of Space and Time (Conclusion)
The Extralonger framework demonstrates a unique ability to integrate spatial and temporal factors into a single model, ensuring high forecast accuracy. Its architecture allows it to adapt to different planning horizons and financial instruments while maintaining the system's transparency and manageability.
Self-Exciting Markets: Building a Hawkes Process from Scratch
Volatility arrives in clusters: one large move makes the next large move more likely, and quiet spells stay quiet. This article builds a Hawkes self-exciting point process in pure MQL5 to measure that effect directly, ending in a single number, the branching ratio, that says how reflexive a market currently is. You get a small, tested library, an indicator that plots the fitted intensity live, and a demonstration Expert Advisor, along with the honest limits of all three.