Parabolic trailing stop
Trailing stop below the highest close since entry; with defaults it sinks over time instead of following price.
Once an entry price arrives, the indicator records the highest close since then and draws that peak minus a stop distance. The distance is ATR times a bar factor that grows by the acceleration value on every bar since entry, times a profit factor that stays at 1 until the close is more than 10% above entry. With defaults the bar factor keeps growing, so the line falls away from price the longer a trade runs.
How to read it
- The line is a single price level drawn over the candles, normally below the close.
- It is blank until an entry price is wired in, and it draws only this level, not exits.
- On a month of SPY one-minute bars with defaults, the median line sat about 1.6% under the median close, but its low was 538, far below anything price reached.
What it outputs
- Trailing stop
- The stop level: the highest close since entry minus ATR times the bar and profit factors. With defaults it sits below price, and its distance widens with time, not with price.
Settings
- acceleration_factor
- Sets how fast the stop distance grows per bar since entry; higher drops it away from price sooner. At 0 it is a fixed ATR multiple, widening only with profit. Negative values flip the distance below zero after 1/|value| bars, putting the stop above the peak.
Pitfalls
- The stop never tightens as the docstring claims. Distance grows with every bar since entry and again when profit tops 10%, so on long holds the line sinks; its correlation with close was about -0.04 by default.
- It keeps the first entry price it receives and ignores later ones until the indicator resets, and it cannot tell when a trade closes.
- Its counter called days since entry actually counts one-minute bars, so at 0.02 the distance doubles after 50 bars, under an hour.