Building Trend Strategies with a Multi-Exchange Strategy Framework
Summary
This tutorial explains a strategy framework that connects custom signal functions to exchange objects and translates their returned commands into trading actions. Its examples attach a moving-average crossover system to one exchange and a MACD crossover system to another. Each function checks that enough bar data is available, calculates indicators, records values for display, and returns an open, close, or idle command with an optional quantity.
The note also outlines the framework’s command interface and status display, plus a way to add a string control for sending commands while the strategy runs. The evidence is instructional example code and a description of platform interactions; it provides no backtest or performance results. The author explicitly says the sample trading logic is arbitrary and should not be used live. The examples illustrate framework mechanics rather than a validated trading method, and do not explain execution assumptions, risk controls, or how to reconcile signals across exchanges.
Key ideas
- A custom signal function can be linked to an exchange and return commands for a framework to execute.
- The examples use moving-average and MACD crossovers to open or close long positions.
- The framework command set includes opening, adding, stopping, covering, and idle actions.
- Indicator values can be sent to a status display for monitoring.
- The sample logic is illustrative and is explicitly not presented as suitable for live trading.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.