Building Trading Strategies with Visual Programming Blocks
Summary
This tutorial introduces a visual, block-based way to assemble trading strategies. It explains how blocks connect, accept adjustable inputs and default values, and can be moved, copied, resized, and configured. The examples use a trading platform’s modules to display logs and profit, pause or repeat execution, format numeric precision, clear logs, and read fields from ticker, bar, order book, account, order, and futures position data.
The examples illustrate how data modules need to be paired with the relevant market-data or trading modules, and show a basic hedge that opens opposing positions in near and deferred futures contracts. The document is primarily an interface and module primer: it does not evaluate strategy performance or provide risk controls for the hedge. Its backtest references demonstrate module behavior rather than establish that a trading approach is profitable.
Key ideas
- Visual strategies are assembled by connecting blocks whose shapes indicate compatible inputs and outputs.
- Blocks can use default inputs or accept values and variables, and some have configurable settings.
- Tool blocks can log information, report profit, pause, repeat operations, format numbers, and clear logs.
- Market-data blocks retrieve fields from ticker, K-line, order book, account, order, and position data.
- A sample futures hedge pairs a short deferred contract position with a long near contract position.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.