Solomon Anietie Sunday / Publications
Articles
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
Building a Divergence System (Part II): Adaptive SuperTrend Custom Indicator for MetaTrader 5
The article upgrades SuperTrend by integrating a divergence engine (MPO4 or RSI) the dynamically reduces the ATR multiplier during weakening momentum. It covers the shrinking formula, non-repainting state propagation with dedicated buffers, and a step-by-step MQL5 implementation on the price chart
Building a Divergence System: Creating the MPO4 Custom Indicator for MetaTrader 5
We introduce MPO4, a pressure-based oscillator that emphasizes the body and direction of candles in the context of current volatility. The article details its mathematics, normalization into a bounded range, and the EMA smoothing, then builds a pivot-driven divergence module designed not to repaint
Using the MQL5 Economic Calendar for News Filter (Part 4): Accurate Backtesting with Static Data for MetaTrader 5
This article implements a static, CSV-based news source for the Strategy Tester, so historical economic news events can be preloaded and queried during backtesting. It replaces live calendar calls in tester mode with a fast in-memory search, preserves the live logic for trading, and delivers
Using the MQL5 Economic Calendar for News Filter (Part 3): Surviving Terminal Restarts During News Window for MetaTrader 5
The article introduces a restart-safe storage model for news-time stop removal. Suspension state and original SL/TP per position are written to terminal global variables, reconstructed on OnInit, and cleaned after restoration. This lets the EA resume an active suspension window after recompiles or
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









