Simulating Hidden Stop Losses and Take Profits with Live Broker Fallbacks
Summary
The document describes a trading class that tracks hidden stop loss and take profit levels while placing wider live levels with the broker. The live orders are intended to provide protection if the connection between the client and broker fails. The class also provides trade-opening and management functions, with examples covering basic, trailing, stepped, and pending trades.
The live stop levels account for spread and broker stop or freeze limits. The proposed spread buffer should be informed by observing how spread and these broker limits vary over a week, then setting the buffer above their observed ranges. This is a design suggestion, not evidence that the system prevents stop hunting or reliably protects trades. The author reports only basic testing, with no live use or integration into a practical trading system, and cautions that bugs may remain.
Key ideas
- The class records hidden stop loss and take profit levels while submitting wider live levels to the broker.
- Live stop calculations account for spread and broker stop or freeze constraints.
- The suggested spread buffer is based on observed variation in spread and broker limits over a week.
- The author reports basic testing only and warns that bugs may exist.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.