Skip to content
All library documents

Building a Self-Hosted LLM Trading Signal System with Ollama

Article MQL5 articles

Summary

This article outlines a workflow for running a local language model with Ollama and adapting it to produce structured trading signals. It describes downloading a small base model, defining trading rules and output fields in a model configuration, and testing prompts that include prices and indicator readings. The rules cover risk-reward constraints, volatility-aware sizing, and caution around major news; the article also sketches scripts for integrating the model with a trading workflow.

The author presents self-hosting as a way to keep market data local and avoid recurring API requests, then makes claims about signal filtering and improved performance during demo use. Those performance claims are not supported here by a clearly described, reproducible test design or independent evidence. A prompted model’s structured output does not itself establish that prices, stops, or trade judgments are accurate. The described setup is best understood as an integration example; signal quality and any trading advantage would require careful validation and risk controls.

Key ideas

  • Ollama can run a language model locally and apply a custom system prompt for trading analysis.
  • The example prompt requests structured signals and embeds rules for risk-reward, volatility, and news conditions.
  • The article describes using market data and indicator readings as inputs to generated signals.
  • Local hosting can keep submitted data on the user's machine, subject to the surrounding setup.
  • The performance improvements claimed in the article lack enough testing detail to establish that they generalize.

Tags

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