Solomon Anietie Sunday / Publications
Articles
Using the MQL5 Economic Calendar for News Filter (Part 5): The Tier the Calendar Does Not Have for MetaTrader 5
This part extends the news filter with an ordered tier scale that adds a special tier above the broker's High, per‑event time windows, and one classifier shared by live calendar data and historical CSV. A rule table (with optional CSV overrides) promotes or demotes specific releases and can set
Building Your Personal Expert Advisor (Part 7): Risk Management VI (Final)—Consolidating the Risk Framework for MetaTrader 5
The article consolidates trade, basket, and account risk into a modular framework for MQL5 EAs. Risk logic moves into reusable classes and shared types, leaving the EA with its inputs, signal, configuration, and call sequence. The result is a shorter strategy file and a second EA that reuses the
Building a Divergence System (Part IV): Creating a Reusable Divergence Engine for MQL5 for MetaTrader 5
The article extracts the series' divergence logic into DivergenceEngine.mqh, a reusable header for MQL5 indicators and Expert Advisors. It details the struct-based design, oscillator options (MPO4 or RSI), pivot and state handling, and the minimal access API. A Parabolic SAR EA demonstrates
Building Your Personal Expert Advisor (Part 6): Risk Management V — Portfolio and Correlated Risk for MetaTrader 5
This part implements PortfolioRisk.mqh, a shared library that shifts risk management to the account level. It scans positions and pending orders, computes margin and floating results, counts symbols, and decomposes pairs into currencies to detect concentration, then validates each new trade against
Building Your Personal Expert Advisor (Part 4): Risk Management III—Risk Models and Order Execution for MetaTrader 5
The EA now defines risk by percentage, fixed cash, or fixed lot and can measure percentage against balance or equity. It supports market, limit, and stop orders, sizes from the planned entry, and enforces spread‑aware stop minima. Additional safeguards include downward volume rounding, explicit
Building Your Personal Expert Advisor (Part 3): Risk Management II—Margin and Allowable Risk for MetaTrader 5
Risk-based lot sizing can still exceed what free margin allows. The article adds a margin-aware cap using OrderCalcMargin(), an optional adaptive cap that scales with ACCOUNT MARGIN LEVEL, and a single pre-trade validation gate that unifies position limits, risk sizing, and margin checks. Readers
Building Your Personal Expert Advisor (Part 5): Risk Management IV—Basket Risk and Strategy-Specific Sizing for MetaTrader 5
Part 5 moves risk control from single trades to a basket-level framework. The EA aggregates its own positions, computes volume‑weighted entry, floating P/L including swap, and used margin, then enforces limits on combined loss, margin, position count, and time underwater, while logging maximum
Building Your Personal Expert Advisor (Part 2): Risk Management and Dynamic Lot Sizing for MetaTrader 5
This part implements risk-based position sizing for the EA. Lot size is derived from account balance, a chosen risk percent, and ATR-based stop distance, then confined and rounded to the broker's volume rules and minimum stop levels. An optional drawdown-aware layer reduces risk during equity
Building a Divergence System (Part III): The Adaptive SuperTrend EA for MetaTrader 5
The article implements a self-sufficient Adaptive SuperTrend EA with internal calculations on a selectable timeframe, avoiding external buffers and indicator files. It includes risk-based lot sizing, ATR stops, stepwise RR trailing, optional anti-repainting confirmation, and session control
Building Your Personal Expert Advisor (Part 1): From Fragile Script to Working EA for MetaTrader 5
This article focuses on EA architecture rather than signal design. Starting with a flawed Moving Average crossover EA, we add new‑bar detection to prevent duplicate entries, Magic Number and position awareness, ATR‑based risk levels, and data and trade result validation, along with basic safeguards
Forum
Is a trading strategy ever complete without using machine learning?
Recently I have seen a lot of traders training more and more ML models everyday, but I am also wondering if this has always been the case for creating trading strategies. I know that machine learning models are good for regime detection, and identifying anomalies (among other things). So, can these









