Skip to content
All library documents

Wavelet Denoising and LSTM for Volatility-Aware Position Sizing

Article MQL5 articles

Summary

The article describes an MQL5 money management class that combines a one-level Haar wavelet filter with an LSTM network to scale position size in volatile, trend-oriented markets. The wavelet step transforms recent log returns into approximation and detail coefficients, then applies soft thresholding to reduce small detail values interpreted as noise. An LSTM processes the filtered sequence to estimate trend consistency and produce a confidence measure used as a lot-size multiplier. RSI and ATR are also proposed as momentum and volatility checks.

The implementation is framed as a response to whipsaws in volatile forex, index, and cryptocurrency markets, and is integrated by extending the platform's money management class. The document mentions test runs and describes a standalone filter as trigger-prone, but the supplied excerpt does not show full results for the combined model. It gives no robust evidence of predictive advantage, and leaves important evaluation questions such as out-of-sample testing and trading costs unresolved. The method should therefore be read as an experimental design rather than established risk control.

Key ideas

  • A Haar transform splits recent log returns into approximation and detail components before thresholding.
  • Soft thresholding shrinks or removes small detail coefficients to reduce high-frequency noise.
  • An LSTM interprets the filtered series and supplies a confidence value for scaling trade volume.
  • RSI and ATR provide additional momentum and volatility context for position sizing.
  • The described tests are incomplete in the excerpt and do not establish robustness or profitability.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.