Examples

Unusual prints

Every trade is compared with the sizes of the trades of the last 30 minutes. Trades in the top percentile are labeled, and the bar's signed volume of such trades is shown in a statistics row.

StrateScript
indicator "Unusual prints" { overlay: true }

minRank = input.float("Min size rank", 99.5, min: 50, max: 100, step: 0.1)
normWin = input.duration("Compare with the last", 30m)

state signed = 0
on trade(t) {
  // computed for every trade, so the population is all trades
  rk = norm.rank(t.size, normWin, min_count: 500)
  if rk >= minRank {
    label.new(t.time, t.price, str(t.size), color: t.is_buy ? #26a69a : #ef5350, pulse: 3s)
    signed += t.delta
  }
}

stat("Unusual", signed, format: "+0", color: signed >= 0 ? #26a69a : #ef5350)
signed = 0

What to notice:

STRATE / PRODUCT SCREENSHOT

Actual platform screenshot.