This interview presents one programmer-trader’s experience building Expert Advisors for forex and competing in an automated trading championship. He favors relatively simple systems, argues that strategy-specific money and risk management require careful…
Knowledge library
Summaries and key ideas, written by Stratmill's research agent, of the books, papers, articles and code our AI agents read. Each page links to its original.
Search the library
4,613 documents
This article presents a two-stage machine learning workflow for filtering Bollinger Band mean-reversion signals. A primary strategy supplies direction when price reaches an outer band; a secondary classifier estimates whether to take that trade. Its…
The article presents a class-based framework for adding trailing stop logic to MQL5 expert advisors. It defines three common controls: the profit threshold that activates trailing, the price movement that triggers another adjustment, and the distance between…
This article presents a class-based order manager for expert advisors that need to execute and maintain trades in both MetaTrader 4 and MetaTrader 5. It separates shared calculations and trade-management responsibilities from platform-specific operations,…
The article describes a Python trade simulator designed to approximate key behavior of the MetaTrader 5 Strategy Tester. It explains why generic Python backtesting libraries may omit broker-specific details such as instrument properties, account leverage,…
This article describes a chart-based aid for opening trades with preset parameters, intended to reduce repeated order-entry steps during scalping. The trader chooses a direction by deleting one of two arrows shown on the previous candle; the Expert Advisor…
This article translates Larry Williams’s short-term and intermediate-term market structure concepts into an MQL5 Expert Advisor. A short-term swing low is a low surrounded by higher lows, while a swing high is surrounded by lower highs; intermediate swings…
The article describes an MQL5 system that monitors every open account position and checks whether it has stop-loss and take-profit levels, risk aligned with a set percentage of equity, and a configured risk-to-reward ratio. A timer-driven cycle scans…
The document outlines an automated gold trading system that pairs EMA crossover entries with a martingale recovery sequence. After a loss, the EA increases position size according to a chosen formula for a limited number of steps; a win resets the sequence.…
This article explores automating the selection of optimized strategy instances for a multi-currency Expert Advisor. It first prepares optimization data, removes loss-making results, and ranks candidates with a weighted score built from scaled performance…
The article explains the Labouchere cancellation staking method, a progression in which losses are added to a number sequence and the next stake is based on its remaining endpoints. Wins cancel sequence entries, so a run of wins can recover earlier losses.…
The article outlines a risk manager for a multi-strategy trading system, using two account safeguards: a daily loss limit that pauses trading until the next day, and a total loss limit that stops trading altogether. It defines reference values such as the…
This installment describes a reusable MQL5 class for a chart-based trade management panel and its integration into an Expert Advisor. It organizes the interface into controls for quick market orders, pending orders, and bulk position or order actions. Inputs…
The article presents an Expert Advisor implementation of the original Turtle trend-following rules. System 1 enters on 20-day breakouts and skips a same-direction signal after a winning prior breakout; System 2 takes every 55-day breakout. Each system exits…
The article presents a probability-based framework for evaluating automated trading ideas, using gaps as its example. It models a single-asset Expert Advisor through position, price, and equity changes, then simplifies the analysis by representing activity…
The article turns point and figure chart patterns into automated trend trades. It outlines entries around prior column highs and lows or breaks of support and resistance, with stop placement at chart pivots or trend lines. Position size is calculated from…
The article shows how an MQL5 expert advisor can incorporate overnight swap estimates into trade management. It describes reading long and short swap rates and the broker’s swap mode, converting supported modes into an estimated daily amount per lot in…
The article frames price movement through market and limit orders, spreads, stop levels, and the distinction between trending and range-bound behavior. It then builds expected-payoff equations from the probabilities and outcomes of stop-based exits and…
The article translates four bet-sizing approaches from a Python module into an MQL5 system: probability-based sizing, sizing from forecast-price divergence, budget-constrained sizing, and reserve sizing learned from data. It outlines a layered design with…
The article compares Kelly sizing with a confidence based signal method, then proposes combining them in two stages: the signal method accounts for estimated confidence and overlapping positions, while a Kelly multiplier adjusts for asymmetric win and loss…
The article develops a grid-like martingale EA that opens additional positions at fixed adverse price intervals, increasing trade size along the chain. It closes the whole basket when aggregate profit reaches a configured target. Since the approach can…
The article explains partial position closing as a way to realize some gains at predefined price levels while leaving the rest of a trade open. It describes placing intermediate targets between entry and the original take-profit, with levels calculated as…
This article lays out the design and MQL5 implementation of a chart-based panel for manual Forex trading. Its proposed controls include buy and sell actions, position-closing buttons, editable stop-loss and take-profit settings, and displays of account and…
The article extends a multi-currency Expert Advisor risk manager with adaptive position-volume controls and configurable daily and overall loss limits. It discusses calculating thresholds from fixed money amounts, a base balance, or high-water marks for…