Trading Platform Notes on Numeric Precision, Futures P&L, and Errors
Summary
This collection of platform notes records practical lessons from strategy development and operation. It explains that rounding a value before later arithmetic does not necessarily round the final displayed result; rounding should be applied after the calculation whose precision matters. It also cautions that passing a numeric string where a number is expected can cause errors, and that copied strategy code may rely on interface parameters that are absent when only part of a strategy is copied.
The most directly trading-related explanation distinguishes futures position profit measured from the original entry price from mark-to-market profit measured relative to the prior settlement price. Other entries describe display-refresh behavior, a possible API whitelist issue, undefined-variable errors, and stalled operation associated with a full server disk. These are anecdotal troubleshooting observations, not systematic tests; the stated platform behaviors may depend on software versions, configuration, and environment.
Key ideas
- Apply rounding after the arithmetic when the final result must have a specified decimal precision.
- Check that parsed values are numeric before passing them to numeric functions.
- Copied strategy code may depend on interface parameters declared outside the copied fragment.
- Futures position profit uses the entry price as its reference, while mark-to-market profit uses the prior settlement price.
- Unrefreshed logs or status displays do not by themselves prove that a strategy has stopped running.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.