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").
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 candlesRSI— oscillator in a panel below the chartBBAND— 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
| Function | Plain English |
|---|---|
HIGHEST | Rolling highest high over N bars |
LOWEST | Rolling lowest low over N bars |
DISPLACE | Shift a series forward/back in time |
IGLUE | Add, subtract, multiply, or divide two series |
IF | If A > B return X, if A = B return Y, else Z |
SUM / AVERAGE | Combine up to 10 inputs |
FIBONACCI | Fib levels from rolling high/low |
1x | Reciprocal 1/x of a series |
Why they exist: build custom math without writing C++ or TypeScript. Example pipeline:
EMAon closeDISPLACEthat EMA by 5 barsIFcomparing 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:
| Signal | Meaning |
|---|---|
Buy | Enter long |
Sell | Enter short |
Exit long | Close long |
Exit short | Close short |
Exit all | Flatten |
Do nothing | No 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 bandCANDLESTICKPATTERNS— hammer, doji, engulfing, …POSITION— turn a signal stream into a position size line in a new panelMIX— 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.CloseEMA.EMARSI.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):
| Tab | Controls |
|---|---|
| Indicators | Plot / scale label / visible |
| Functions | Same |
| Strategies | Visible (signals on/off) |
| Drawings | User shapes |
API: setChartIndicatorVisibility, setChartFunctionVisibility, setChartStrategyVisibility — ChartInstance.
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?
- Series and panels — UI and API for inputs and placement
- Indicators overview
- Functions overview
- Strategies overview
- Authoring conventions — add new keys to the package source