Spot Trailing Take-Profit Using a Running High
Summary
This spot strategy tracks the highest observed price after startup and places a sell when price falls below a chosen fraction of that high. For example, its stated ratio of 0.98 means a retreat to 98% of the tracked peak triggers the take-profit action. The order size is configurable, and the implementation checks the ticker and account repeatedly, updating the peak as new highs occur. It rejects futures exchanges, making the intended use spot trading.
The code sells the configured amount, subject to available holdings, and stops once its target amount has been sold. It does not describe a corresponding purchase rule, so it functions as an exit mechanism for inventory rather than a complete entry-and-exit system. Its published backtest spans a single day and provides settings but no reported performance statistics. The peak is initialized from runtime state rather than a documented historical lookback, and a fixed retracement ratio does not adapt to volatility; gaps, execution costs, and partial fills may also affect realized exits.
Key ideas
- The strategy records a running high and triggers a sell after a specified percentage retracement.
- A ratio of 0.98 corresponds to a trigger at 98% of the observed peak.
- The code is intended for spot markets and checks available holdings before placing a sell order.
- It provides an exit rule for existing inventory, not a complete buy-and-sell strategy.
- The brief published backtest settings include no reported performance results.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.