Using a Neural Network to Detect Loss Patterns in Trade History
Summary
The article describes an MQL5 tool that tests whether trade sequence, position size, and market context help predict losses. It encodes each closed deal with eight features and trains a small feed-forward neural network using stochastic gradient descent. A hidden layer can represent combinations such as taking a larger position after a loss, which aggregate performance measures and one-feature rules may miss. The features also encode time of day cyclically so adjacent hours remain close, including across midnight.
To assess the model, the tool compares held-out accuracy with a majority-class baseline, checks probability calibration, and estimates feature importance by shuffling validation inputs. These diagnostics feed a configurable composite score and letter grade. The article explains the network and diagnostic methods, but reports no empirical result establishing that its predictions improve trading. It cautions that small samples can make grades unstable and that multiple closing deals from one position may violate row independence. The score is heuristic, so the tool is best treated as a hypothesis tester alongside other robustness checks, not as causal proof.
Key ideas
- Trade outcomes may depend on combinations of prior behavior and current context that aggregate statistics conceal.
- A one-hidden-layer neural network can model interactions among engineered trade features.
- Validation accuracy should be compared with a majority-class baseline, and predicted probabilities should be checked for calibration.
- Permutation importance estimates feature reliance by measuring accuracy after shuffling one input at a time.
- The composite grade is heuristic and can be unstable with limited or dependent observations.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.