SXVNT Script SDK
Every script receives a ctx object with access to price data, 20+ technical indicators, session detection, chart plotting, and automated strategy execution.
Open the Scripts panel
Click the scripts icon in the toolbar, or load one of the built-in templates.
Write your script
Use ctx.ta, ctx.plot, and ctx.strategy to build your logic.
Compile and run
Hit compile to see your indicator on the chart, or run a backtest on your strategy.
// EMA Crossover with Fill
const fast = ctx.ta.ema(ctx.price.close, 9);
const slow = ctx.ta.ema(ctx.price.close, 21);
const p1 = ctx.plot(fast, 'Fast EMA', { color: '#26a69a' });
const p2 = ctx.plot(slow, 'Slow EMA', { color: '#ef5350' });
ctx.fill(p1, p2, {
colorUp: 'rgba(38,166,154,0.15)',
colorDown: 'rgba(239,83,80,0.15)'
});
// Strategy: enter on crossover
const cross = ctx.ta.crossover(fast, slow);
const crossDn = ctx.ta.crossunder(fast, slow);
const last = ctx.price.close.length - 1;
if (cross[last]) ctx.strategy.entry('long', 'long');
if (crossDn[last]) ctx.strategy.close();