Skip to main content
Skip to main content

Scripts overview

Exeria charts run on a Fusion script engine. Everything in this section — RSI, MACD, IF, CROSS — is a script with a stable string key.

You do not install them separately. They ship inside @efixdata/exeria-chart and mount with chart.addScript("KEY").

Loading chart…
Two indicators on one chart — overlay + separate panel.

Indicators — the familiar ones

An indicator reads price (or volume), runs a formula, and draws the result as lines, bands, or histograms.

Examples:

  • EMA — moving average on top of candles
  • RSI — oscillator in a panel below the chart
  • BBAND — upper/middle/lower bands around price
chart.addScript("EMA");
chart.addScript("RSI");

Indicators are what most trading apps mean by “add a study.” Full list: Indicator catalog.

Functions — formulas between series

A function is not a classic indicator. It does not “analyze the market” on its own — it operates on series that already exist:

  • raw OHLC from the main symbol
  • output lines from indicators you added earlier
  • output from other functions or strategies
FunctionPlain English
HIGHESTRolling highest high over N bars
LOWESTRolling lowest low over N bars
DISPLACEShift a series forward/back in time
IGLUEAdd, subtract, multiply, or divide two series
IFIf A > B return X, if A = B return Y, else Z
SUM / AVERAGECombine up to 10 inputs
FIBONACCIFib levels from rolling high/low
1xReciprocal 1/x of a series

Why they exist: build custom math without writing C++ or TypeScript. Example pipeline:

  1. EMA on close
  2. DISPLACE that EMA by 5 bars
  3. IF comparing displaced EMA to original EMA

Deep dive: Functions overview.

Strategies — rules that fire signals

A strategy watches one or more series and outputs discrete signals, not just numbers:

SignalMeaning
BuyEnter long
SellEnter short
Exit longClose long
Exit shortClose short
Exit allFlatten
Do nothingNo action

They render as markers/arrows on the chart (main panel by default).

Examples:

  • CROSS — signal when series A crosses series B (default: MACD line vs signal)
  • EXCEED — price pushes outside a band
  • CANDLESTICKPATTERNS — hammer, doji, engulfing, …
  • POSITION — turn a signal stream into a position size line in a new panel
  • MIX — combine two strategies with a custom truth table

Why they exist: backtesting visuals, alert UX, and chaining logic without a separate rules engine.

Deep dive: Strategies overview.

Series inputs — what gets calculated

Almost every script asks: “Calculate from which data?”

In the settings dialog, series inputs appear as dropdowns like:

  • BTCUSDT.Close
  • EMA.EMA
  • RSI.RSI

Under the hood each value is seriesId:field (for example main:c).

You can point an RSI at:

  • main symbol close (default)
  • high or low instead
  • another indicator’s output line
  • a second overlay symbol if multi-instrument mode is on

Full guide: Series and panels.

Panel placement — where it draws

Each script has a default:

  • Overlay — draws on the main price panel (newPane: false)
  • New panel — opens a row below (newPane: true)

You override this in the settings dialog with the Panel dropdown:

  • New panel — dedicated strip (good for RSI, MACD, ATR)
  • Main chart — draw on candles (good for EMA, BBAND)
  • Existing panel — stack on another study’s pane (e.g. two oscillators sharing one strip)

Details: Series and panels.

Visibility layers in Chart settings

After adding scripts, open Chart settings → On chart (Chart settings):

TabControls
IndicatorsPlot / scale label / visible
FunctionsSame
StrategiesVisible (signals on/off)
DrawingsUser shapes

API: setChartIndicatorVisibility, setChartFunctionVisibility, setChartStrategyVisibilityChartInstance.

Wiring scripts together

When a function or strategy needs another script’s output, clone the definition and set input values — do not mutate getScripts() templates in place.

const cross = cloneScript(chart.getScripts().CROSS);
cross.inputs.LINE.value = "abc123:EMA";
cross.inputs.SIGNAL.value = "abc123:SMA";
chart.addScript("CROSS", cross);

Walkthrough with live chart: Programmatic wiring.

What is next?