Skip to content
All library documents

Combining News Sentiment and ONNX Price Predictions for Trading

Article MQL5 articles

Summary

The article describes a proposed MetaTrader 5 strategy that combines a deep learning model’s next-close predictions with sentiment scores derived from news headlines and descriptions. In the backtest, a position is taken only when the direction implied by consecutive predictions agrees with the sentiment direction; otherwise the strategy stays out. It outlines using Python scripts, an ONNX model, news services, and an MQL5 Expert Advisor to produce and act on these signals.

The document reports prediction error metrics, correlation, risk-adjusted returns, and comparisons with a simple moving-average model, and says the strategy and buy-and-hold returns are plotted. However, it provides only a short backtest sample and does not establish robust profitability. The exceptionally high reported Sortino figure conflicts with a later undefined result, and the article itself notes that data sources and scripts need adaptation. News availability, model reliability, execution costs, and out-of-sample testing remain important limitations.

Key ideas

  • The strategy enters only when predicted price direction and news sentiment direction agree.
  • News sentiment is estimated by scoring article titles and descriptions and averaging available scores.
  • The trading workflow connects Python sentiment and ONNX prediction scripts to an MQL5 Expert Advisor.
  • Reported backtest statistics are based on a limited sample and include inconsistent Sortino results.
  • Data sources and model inputs must be adapted, and the reported results do not establish durable profitability.

Tags

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