This article develops a reinforcement learning extension to an Expert Advisor that uses ADX and CCI patterns. It contrasts a more continuous feature representation, where indicator conditions are encoded separately, with a compact representation that…
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,574 documents
This article translates Mark Minervini’s eight-condition trend template into an MQL5 method adapted for forex. It filters for price above the 50-, 150-, and 200-day moving averages, correctly ordered averages, a rising 200-day average, and price positioned…
This introductory lesson teaches traders with little programming experience the basic structure and workflow of MQL4. It distinguishes scripts, custom indicators, expert advisors, and libraries, then explains how source code is compiled before it can run in…
The article examines how market quotes become discrete tick observations and timeframe bars, arguing that sparse sampling can distort the underlying price signal. It applies sampling theory and aliasing as a conceptual framework: when a series is sampled too…
This article explains how to connect the Fast Artificial Neural Network library to MQL4 through a wrapper that hides C pointers and variable-length arguments from the trading platform. It outlines creating feedforward networks, training them incrementally,…
The article introduces Heikin-Ashi candles as a smoothed view of price and moving averages as tools for identifying trend, dynamic support, and resistance. It explains how Heikin-Ashi open and close values are derived from current and prior bar data, and…
The article describes a MetaTrader library for placing and managing trades directly on a chart with mouse-operated controls. Its interface is divided into optional trading, information, and order-management panels, which can be enabled independently. Traders…
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 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…
This installment of a self-adapting algorithm series reviews weaknesses of a candle-count strategy, including unstable candle sizes, time-based entries during quiet markets, drawdowns, and instrument-specific historical tuning. The author proposes rebuilding…
The article compares an original Parafrac oscillator, which normalizes the gap between Parabolic SAR and price by a fractal range, with an ATR-normalized V2. It describes three proposed entry frameworks: zero-line crosses with a histogram threshold,…
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…
The article shows how to read a delimited calendar file in MQL4 and display scheduled economic events on a price chart. Each record includes a date, time, country, event details, and reported or expected values. The script parses the records, converts the…
This article describes a MetaTrader 5 control system that restricts trading to an explicitly approved set of symbols. Its rationale is to prevent strategy drift, unintended exposure, and unreliable comparisons when traders or Expert Advisors operate on…
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 article describes an MQL5 chart dashboard for monitoring several symbols and timeframes. It brings together bid prices, spreads, price changes, RSI, and ATR-based volatility, with configurable display settings, sorting options, alert thresholds, pulse…
The article describes using MQL5 to identify and draw trendlines, support, and resistance on a MetaTrader 5 chart. Its trendline examples connect recent price lows for an upward line and highs for a downward line, using copied price history and chart objects…
The document explains the Accumulation/Distribution line as a cumulative measure of money flow derived from each period’s close within its high-low range and the period’s volume. It lays out the money flow multiplier, money flow volume, and running-total…
The document explains how to construct a MetaTrader 5 custom symbol by averaging OHLC data from multiple instruments. An Expert Advisor collects and validates source symbols, aligns their candles by timestamp, calculates averaged open, high, low, close, and…
The document develops a mathematical framework for estimating order profit and loss while accounting for bid and ask prices, spread, commission, swap, contract size, and currency conversion. It starts with simplified buy and sell calculations, then adds…
The article describes an MQL5 expert advisor for trading breaks of the previous day’s high and low. It defines a long entry when a bar closes above the upper range and a short entry when a bar closes below the lower range. The approach is intended for hourly…
This article explains why a multi-currency Expert Advisor or indicator driven only by the current chart’s ticks can miss changes on other symbols, especially in quieter markets. It also discusses the difficulty of aligning bar histories across symbols,…
This article describes a bridge for exporting MetaTrader 5 ticks to .NET applications. It defines a tick data structure and WCF service contracts for subscribing to updates, retrieving active symbols, and receiving tick and symbol-change callbacks. The…
This article proposes deriving triple-barrier profit-taking and stop-loss levels from a fitted discrete Ornstein–Uhlenbeck process rather than selecting the best pair from a historical grid search. It explains how the autoregressive coefficient describes…