VOLATILITY_STOP: IndicatorDescriptor = ...

Volatility Stop: a trailing stop an ATR multiple away from the running extreme of the source, which flips side when price closes through it.

The recursion is the whole study, so it is reproduced term for term. Three details are load-bearing:

  • while the ATR is still warming there is no band to scale, and the formula falls back to the bar's own true range, unmultiplied, so the stop exists from bar 0;
  • the stop only ever ratchets towards price in the live direction, which is what makes it a stop rather than a band;
  • a flip resets the running extreme to the current source and recomputes the stop from it, so the level jumps once and then resumes ratcheting.

The published study draws one cross-style plot whose colour switches with the trend. This library has no per-bar line colour, so the level is split across two null-gated plots exactly as Supertrend and HalfTrend do, and the crosses are stood in for by markers-only dots (as Parabolic SAR does).