The article explains Distance Weighted Supervised Learning (DWSL), an offline method for learning goal-conditioned policies from state-action trajectories that may be suboptimal and lack explicit goal labels. It learns a distribution of distances between…
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
5,018 documents
The article shows how to display externally sourced candle data in an MQL5 indicator by reading values previously saved to a file. Its workflow separates data retrieval from visualization: an Expert Advisor can make WebRequest calls and write candle data to…
The article explains how resampling can estimate predictive model performance when a separate validation dataset is unavailable. It defines apparent error on the training data, prediction error for a fitted model on new observations, population error across…
The article explains an evolution strategy for tuning neural network parameters when analytical gradients are unavailable or difficult to calculate. It contrasts the method with genetic algorithms, which select and recombine varied individuals, and estimates…
The article explains Multi-Layer Key-Value sharing (MLKV), a Transformer attention design intended to reduce the memory used by autoregressive decoding’s key-value cache. It places MLKV alongside Multi-Query Attention and Grouped-Query Attention: those…
The article explains support vector regression’s epsilon-insensitive loss and implements it as a training objective for a multilayer perceptron in MQL5. Prediction errors within an epsilon margin receive no penalty, while larger errors are penalized; a…
The article presents entropy as a way to assess how much information an indicator's observed values contain before using them as predictors in machine learning. Because the usual entropy calculation applies to discrete outcomes, it recommends dividing a…
The article outlines a workflow for adding a Hidden Markov Model (HMM) volatility filter to a moving-average trend-following strategy. It defines volatility as the standard deviation of returns over a rolling window, classifies observations into high and low…
The article describes ways to label historical data for machine-learning trend strategies. Its basic method smooths closing prices with a Savitzky–Golay filter, estimates trend direction from the smoothed series, and normalizes the gradient by rolling price…
The article addresses the challenge of choosing a technical indicator’s lookback period: short periods can react to noise, while long periods may lag. It proposes feeding readings from many periods into a dimension reduction method, focusing on UMAP to…
This educational article introduces the Moore–Penrose pseudoinverse and begins a from-scratch MQL5 implementation using arrays rather than the language’s built-in matrix tools. It first demonstrates the library pseudoinverse result for a small matrix, then…
The article describes an object-oriented MQL5 wrapper for running a model exported in ONNX format inside MetaTrader 5. It outlines the inference lifecycle: load the model, define input and output tensor shapes, pass a fixed-size feature vector to the…
This article adapts a single-layer convolutional neural network (CNN) for a trading signal in MQL5. It explains padding input matrices, convolving kernels across data, applying activation, and pooling feature maps; it also discusses backpropagation for…
The article presents the Artificial Electric Field Algorithm (AEFA), a population-based optimization method inspired by electrostatic attraction. Candidate solutions are particles in a search space; their fitness determines normalized charges, and forces…
This article describes a spectrum-fitting stage in a multifractal modeling pipeline. Starting from a scaling function τ(q), it uses a Legendre transform to estimate the singularity spectrum f(α), with a central finite-difference approximation for the…
The article introduces Go-Explore as a reinforcement learning approach for problems with sparse rewards and difficult exploration. Rather than immediately optimizing a policy, it first explores and archives visited states and the action paths used to reach…
This article outlines a machine learning pipeline that converts market data into RGB images for neural network analysis. Price, technical indicators, and oscillators are assigned to color channels, with candlestick shapes added to represent candle patterns.…
This article explains ant colony optimization (ACO), a population-based stochastic search method inspired by ants using pheromone trails to guide one another. In the traveling salesperson example, artificial ants build routes through a graph by choosing…
This article explains SAMformer, a compact Transformer approach for long-horizon multivariate time-series forecasting, and describes its proposed remedies for unstable training. The architecture uses channel-wise attention, a residual connection, a linear…
This article presents an implementation of ATFNet, a multivariate time-series forecasting approach that combines two forecasting paths. The T-Block models patterns in the time domain, while the F-Block analyzes periodic and global structure in the frequency…
The article tests whether supervised learning can improve three previously weak signal patterns based on the Gator oscillator and the Accumulation/Distribution oscillator. Its proposed filter is a one-dimensional CNN that periodically applies dot-product…
The article presents an MQL5 simulation engine for generating synthetic price paths under the Multifractal Model of Asset Returns. It combines three stages: a multiplicative cascade generates uneven trading time, fractional Brownian motion supplies a…
The article explains Closed-Form Policy Improvement (CFPI), an offline reinforcement learning method designed to improve an agent’s policy while keeping its actions near those represented in historical data. It motivates a first-order approximation of the…
The article explains Random Encoders for Efficient Exploration (RE3), a reinforcement learning method for encouraging agents to explore high-dimensional state spaces. It estimates state novelty from distances to nearby states in a low-dimensional…