Docs·TapeScript

Sample scripts

Eleven sample TapeScripts for the tick heatmap — big prints, VWAP bands, cumulative delta, book imbalance, wall pulls, Telegram alerts and four signal-only strategies.

Samples are listed under Samples in the TapeScript widget. Selecting a sample copies it to your scripts folder and opens the copy. The sample itself does not change.

Indicators

SampleDescriptionOutput
Absorption WatchMarks trades into a level that holds much more size than the trade. Plots VWAP.Markers, VWAP line
Big PrintsMarks trades much larger than the recent average, colored by aggressor. Optional sound.Markers
VWAP BandsVWAP since the script started, with ± k·σ bands.3 lines on the heatmap
Cumulative DeltaBuy aggressor volume minus sell aggressor volume.Line in the script pane
Top-of-Book Imbalance(bid size − ask size) / (bid size + ask size) at the best prices, smoothed.Line in the script pane
Wall PullsAlerts when a large resting level is removed away from the best prices. Requires order-book data.Markers, alert
Telegram AlertsBig prints and absorption, each sent to Telegram as an HTML card with price, size and 30-second delta.Markers, alerts, Telegram messages

Strategies

The strategy samples show entries and exits on the chart. They do not place orders.

SampleEntry condition
Strategy - Absorption ReversalSelling into a bid that does not move: long. Buying into an ask that does not move: short.
Strategy - Delta BreakoutPrice breaks its recent range with strong delta in the same direction.
Strategy - VWAP ReversionPrice is k·σ away from VWAP and aggressive flow reverses. Target: VWAP.
Strategy - Imbalance ScalperStrong imbalance at the best prices confirmed by trades. Short holding time.

All four strategies:

  • Hold one virtual position at a time.
  • Exit at take-profit (rr × risk), stop-loss (stopBps) or after a maximum time (maxHoldMs). All three are inputs.
  • Mark entries (LONG, SHORT) and exits (TP, SL, TIME, with the result in bps).
  • Play place on entry, fill on a profitable exit and reject on a losing exit.
  • Plot an Equity (bps) line in the script pane and log trades, win rate and equity to the Console.

What each sample shows

SampleLanguage features
Big Printsrolling(), marker()
VWAP BandsTop-level state, @interval, several lines
Cumulative Delta"bottom" pane, venue.hasAggressor
Top-of-Book ImbalanceonBbo, ema()
Wall PullsonDepth, an object keyed by price, remove()
Telegram Alertsalert() with telegram, a function that builds HTML, timeWindow()
StrategiesFunctions, position state, alert keys