Discussing the article: "Neural Networks in Trading: An Intelligent Forecast Pipeline (Conclusion)"

 

Check out the new article: Neural Networks in Trading: An Intelligent Forecast Pipeline (Conclusion).

The article provides a fascinating look at how SwiGLU embedding reveals hidden market patterns, and how a sparse Mixture of Experts within a Decoder-Only Transformer makes forecasts more accurate at reasonable computational cost. We take an in-depth look at the integration of Time‑MoE into MQL5 and OpenCL, and provide a step-by-step guide to configuring and training the model.

The model training process was divided into two stages. This approach made it possible to build the system in a consistent, reliable, and unhurried way.

First comes offline training. We used 15 years of history for the EURUSD pair on the M1 timeframe. This provided the model with a large volume of diverse market situations. The Encoder learned to recognize regularities, identify significant patterns, and encode the market state into a compact, information-rich feature vector. This vector serves as the foundation for all decisions made by the agent. During training, the Actor learns a behavioral strategy by receiving signals from the Critic and the Director.

Then comes online fine-tuning. It is run in the MetaTrader 5 Strategy Tester. Here, the model interacts with historical data in a realistic mode: candlestick by candlestick, with market noise, random fluctuations, and instability. This helps adapt the agent's behavior to live market dynamics and adjust its strategy under near-real conditions.

After training, the model was tested on new data — quotes for January 2025. All settings were fixed in advance and remained unchanged. This ensures that the evaluation is objective and transparent. The test results are shown below.


Author: Dmitriy Gizlyk

[Deleted]  
For some reason, the trades are all going in one direction again, as if the agent isn’t actually learning anything. It would be interesting to see the balance in the training data. There’s no OpenCL, so I can’t check :)
 
trades are only on long side
 

Thank you for sharing your codes. It's been a while I'm following your articles. They all look to be written based upon very recent academic publications. But I have issues to compile them as all run into too many syntax errors. Many of the errors are originated from the "NeuroNet.cl", which if I am correct is the core of OpenCl computing for "NeuroNet.mqh". I am confident that all the codes are compiled already on your side. So I assume that the issues come from the MQL version on my side which might be different than yours. Could you give us a little details about it? Thank you!

 
Syed Jawad Hussain Naqvi #:
[T]rades are only on long side[.]

IMHO, a longs-only algo is likely better for something like the S&P 500 Index that has more consistent upward time.

Of course, the EURUSD is merely a demonstration of the concepts and work in the Article so...