PulseScript

PulseScript is SuperCharts’ original chart-scripting language. It runs bar-by-bar over real candles with no look-ahead anywhere — every built-in is causal and multi-timeframe reads only ever see completed bars, so what you backtest is what fires live. One script can draw on the chart, backtest itself, power the market scanner, and (soon) arm a live Telegram alert.

PulseScript
pulse 1
meta(name: "EMA Cross", overlay: true)

fast = ema(close, 12)
slow = ema(close, 26)

draw line(fast, color: "#38bdf8", title: "Fast EMA")
draw line(slow, color: "#f59e0b", title: "Slow EMA")

when crossOver(fast, slow): mark buy at low "Long"
when crossUnder(fast, slow): mark sell at high "Short"

Design guarantees

  • Deterministic. Same script + same candles = same output, always. There is no randomness and no wall-clock access inside a run.
  • No repaint. onTf("4h", …) maps only completed higher-timeframe bars onto the chart — stricter than most platforms’ defaults.
  • Sandboxed. Scripts cannot reach the network, the page, or your account: runaway loops and slow scripts abort with a line-numbered error.
  • One TA engine. ta.* reuses the exact indicator implementations the chart, the alerts, and the backtester use — a script and the chart can never disagree.