Skip to content
All library documents

Using Category Theory Graphs to Model MQL5 Trading Systems

Article MQL5 articles

Summary

The article introduces graphs as a way to represent the steps and connections in an MQL5 trading system. It distinguishes graph structure, which records vertices and arrows between them, from category theory’s emphasis on mappings and transformations. A sample system runs from timeframe selection through look-back period, applied price, and indicator selection to trade action. The article proposes varying the intermediate steps and studying mappings between successive graph structures as a way to investigate whether system configurations change with each new bar.

Suggested applications include comparing alternative decision paths, displaying the active sequence on a chart, and examining whether paths through intrabar open, high, low, and close prices relate to later price ranges. The case studies pair a custom trailing-stop component with existing MQL5 signal and money-management classes; one described test uses USDJPY on an hourly timeframe over a stated date range, but the supplied text omits its findings. The discussion is exploratory: it offers possible analysis and design uses rather than evidence that graph-based systems improve trading results. It also identifies visual interpretation and execution efficiency as practical constraints.

Key ideas

  • A graph models system components as vertices connected by directed arrows.
  • The example trading workflow links timeframe and indicator choices to a final trade action.
  • Comparing graph mappings over time could help analyze changes in system configuration.
  • Intrabar price ordering is proposed as a path that might be studied against later price ranges.
  • Graph-based design suggestions are exploratory, and the supplied case-study results are incomplete.

Tags

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