Skip to content
All library documents

Five Elements for Turning a CTA Trading Idea into Executable Rules

Article vn.py community

Summary

This tutorial explains how to convert a discretionary futures idea into a specification a program can follow. Its five elements are signal timeframe, entry rules, exit rules, position size, and behavior in edge cases. It emphasizes separating directional filters from entry triggers, defining exactly when a signal is evaluated, and stating what to do when no signal appears or a position is already open.

A worked example combines 15-minute bars built from one-minute data, Bollinger Band breakouts, Aroon direction filtering, a one-contract position, and an ATR-based trailing stop. The specification defines calculations at bar close, how the stop can move, and which exit rules are absent. This example illustrates how much must be made explicit before code generation; it is not evidence that the strategy is profitable. The article leaves implementation, formula details, and backtesting to later installments, and stresses human review of any AI-generated logic.

Key ideas

  • A strategy needs explicit rules for timeframe, entries, exits, sizing, and edge cases.
  • Separate a trend or direction filter from the price event that triggers an order.
  • Specify when indicators update and whether signals use intrabar prices or closing prices.
  • Define stop movement, position behavior, and what happens when conditions are unclear.
  • Treat generated strategy logic as a draft that a person must verify before implementation.

Tags

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