Examples

Cumulative delta as candles

The cumulative delta of the session drawn as candles in its own pane: each candle opens at the previous close of the cumulative delta and moves by the bar's delta, with the bar's intrabar delta extremes as wicks when they are known.

StrateScript
indicator "CVD candles" { overlay: false, format: "compact", labels: true }

reset = input.choice("Reset", ["session", "rth", "day", "none"], "session")

cvd = of.cvd(reset: reset)
prevCvd = cvd - nz(delta)
hi = na(bar.delta_high) ? max(prevCvd, cvd) : prevCvd + bar.delta_high
lo = na(bar.delta_low) ? min(prevCvd, cvd) : prevCvd + bar.delta_low

candle(prevCvd, hi, lo, cvd, cvd >= prevCvd ? #26a69a : #ef5350)
hline(0, color: #888888, style: "dotted")

What to notice:

STRATE / PRODUCT SCREENSHOT

Actual platform screenshot.