Examples

Sweeps

One aggressive order that trades through several prices at once. With order-by-order data each trade knows which aggressive order it belongs to, so a sweep is marked once, on its last execution.

StrateScript
indicator "Sweeps" { overlay: true }

minLevels = input.int("Min prices traded", 3, min: 2)
minSize = input.int("Min total size", 20, min: 1)

on trade(t) {
  if not na(t.levels) and t.sweep_end and t.levels >= minLevels and t.sweep >= minSize {
    label.new(t.time, t.price, (t.is_buy ? "▲ " : "▼ ") + str(t.sweep) + " × " + str(t.levels),
              color: t.is_buy ? #26a69a : #ef5350, glow: 8)
  }
}

What to notice:

STRATE / PRODUCT SCREENSHOT

Actual platform screenshot.