Trailing Stops Filtered by Symbol, Order Comment, and Magic Number
Summary
This short note describes an elementary trailing-stop function for managing orders. It explains that the function can identify which orders it should manage by checking the financial instrument and, optionally, the order comment and magic number. These filters help distinguish a strategy's orders from other orders that may exist on the account. The function also accepts a trailing distance specified in points; if no symbol is provided, it uses the current chart symbol.
The document provides an interface-level description rather than the stop-update algorithm or a complete implementation, and it reports no tests or trading results. It does not explain how the stop distance is applied, whether the stop can move in both directions, or how broker execution rules and price precision are handled. Those details would need to be checked in the original implementation before relying on it. The note is therefore useful as a compact description of order selection and trailing-stop inputs, but it is not a standalone strategy or a full guide to stop behavior.
Key ideas
- The function trails orders for a specified instrument, defaulting to the current symbol when none is supplied.
- An order comment and magic number can filter which orders the function manages.
- The trailing distance is expressed in points.
- The note describes the function's inputs but does not provide the stop-update logic or performance evidence.
- Execution constraints and the precise stop behavior require inspection of the implementation.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.