Skip to content
All library documents

Implementing TQNet Cross-Attention for Financial Time Series

Article MQL5 articles

Summary

This article presents an MQL5 implementation of a TQNet temporal query model, focusing on a multi-head attention module that combines source time-series data with accumulated global correlation parameters. The module extends a cross-attention layer, uses a correlation-parameter object to maintain sequence relationships, and configures an MLP activation function. The broader framework aims to represent both local features and dependencies across a sequence for forecasting or analysis.

The article describes offline training on historical data followed by online fine-tuning in the MetaTrader 5 Strategy Tester. It reports that testing on previously unused price quotes showed balance growth after an initial drawdown, but provides no numerical performance measures, comparison baseline, or detailed validation protocol in the supplied excerpt. The reported outcome therefore does not establish robust predictive value. Model performance may depend on preprocessing, training choices, market conditions, and the distinction between tester adaptation and live deployment.

Key ideas

  • TQNet combines local sequence features with global correlation parameters to model time-series dependencies.
  • The described TQ-MHA module applies cross-attention logic to source data and accumulated correlation matrices.
  • The implementation uses an MLP activation function and initializes global correlation parameters to zero.
  • The model is trained offline on historical data and then fine-tuned in the Strategy Tester.
  • The reported growth after an initial drawdown lacks numerical metrics and enough validation detail to establish generalization.

Tags

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