The article explains the Dandelion Optimizer, a population-based metaheuristic that treats candidate solutions as seeds moving through a search space. It describes three successive phases: broad exploration through randomized rising moves, population-level…
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
The article compares two versions of a one-minute foreign-exchange strategy that use the same trend and MACD entry rules but place stops differently. The shared entries combine 50- and 200-period moving averages with MACD conditions. One version sets a stop…
This article describes an MQL5 Expert Advisor that starts a position using MACD trend direction and RSI conditions, then adds trades as price reaches favorable profit thresholds. It presents layering, or cascading, as a way to scale exposure during sustained…
This article frames money management as the choice of how much capital to risk on each trade, separate from the trading system’s decisions about direction and timing. It uses repeated simulations of wins and losses with specified probabilities and payoff…
The article explains how a position sizer can translate a prop-firm account’s remaining loss budget into a smoothly declining maximum position size. A calibrator first combines the budget with a safety factor and stop-loss percentage to estimate an…
The article develops a mathematical framework for optimizing a simple hedging strategy before applying brute-force parameter searches. It identifies the main inputs as initial direction and lot size, separate buy and sell take-profit levels, spacing between…
The article distinguishes mathematical expectation from utility adjusted for a trader’s capital, using Bernoulli’s treatment of the St. Petersburg paradox to motivate moral expectation. It applies the idea to trades with known stop loss and take profit…
This article explains how MQL5 Expert Advisors use the CExpertMoney base class to handle position sizing and other money-management decisions. It describes the roles of its initialization, parameter validation, indicator setup, entry-volume, reversal, and…
The article describes an MQL5 analyzer that reconstructs closed round trips from deal history and measures each trade’s maximum adverse excursion (MAE), maximum favorable excursion (MFE), and exit efficiency. It groups deals by position identifier, reads M1…
The document argues that strong historical backtests cannot ensure an Expert Advisor will remain profitable when market behavior changes. It groups failure patterns into lazy algorithms, which hold positions unusually long and accumulate costs; persistent…
This article presents an account-level risk supervisor for MQL5 that sits above a strategy’s entry and exit rules. It tracks equity, peak-to-current drawdown, daily loss, and rapid declines, then assigns one of four operating states: NORMAL, CAUTION,…
The article turns Larry Williams’ Smash Day reversal pattern into objective rules for an automated trading system. A buy setup occurs when a bar closes below a configurable number of prior lows; a sell setup uses a close above prior highs. Outside bars are…
The article presents a framework for describing and implementing strategies that actively manage pending orders. It separates market analysis, assessment of current positions and orders, and position management. Example approaches include scaling into a…
This article describes an Expert Advisor that multiplies the volume of deals copied by MetaTrader’s Signals service. It explains how the copier detects completed deals through trade-transaction events, then opens a corresponding position or increases an…
The article explains how to build a MetaTrader 5 Expert Advisor that places a draggable risk dashboard on the chart. Using the platform’s Standard Library controls and CTrade, the panel displays floating profit and offers bulk closures for all filtered…
The article explains how Twin Delayed Deep Deterministic Policy Gradient (TD3) modifies DDPG to reduce overestimation of learned Q-values. Its three core changes are training two Critics and using the lower estimate, updating the Actor less often, and…
This article introduces Deep Deterministic Policy Gradient (DDPG) as a reinforcement-learning approach for trading agents that must choose continuous action values. Instead of expanding a discrete action list for every combination of direction, volume, stop…
This MQL5 cookbook chapter extends an Expert Advisor so it can retrieve position details that are not available from current position properties alone. By selecting the account's deal history for a position, the program can find the first and most recent…
The article describes a two-wave continuation setup: a main move followed by a correction, with an anticipated resumption in the main trend's direction. It identifies swing points using confirmed fractals and provisional extrema, then applies structural…
The article explains why historical VaR, normal-based volatility measures, and resampling can understate rare losses: each is constrained by assumptions or observations that may not represent the far tail. It presents the Peaks-Over-Threshold method, which…
The article explains how Average True Range measures price volatility without indicating market direction. It derives true range from the current high-low span and gaps relative to the previous close, then averages true range over a chosen period. A EURUSD…
This article develops a way to estimate per-trade risk for a target balance and trading horizon. It first uses a fixed-fraction compounding model to relate win rate, reward-to-risk ratio, number of trades, and target growth. It then describes Monte Carlo…
This article explains safeguards for an automated Expert Advisor (EA) interacting with an order-management class, with particular attention to differences between hedging and netting accounts. It proposes blocking additional pending orders when one is…
This article introduces a reusable framework for managing positions after an Expert Advisor opens them. It separates trade generation from ongoing position management and organizes the work among a coordinator, an object for each managed position, and a…