Skip to content
QuasarGEN
Terminal documentation
Sections
On this page

QuasarGen Script reference

This reference is assembled from the language inventory in the terminal source. Capabilities added after the latest release are marked separately; users can run them once the corresponding build is released.

Candle series

NameWhat it isArguments
openThe bar's open pricenone
highThe bar's highest pricenone
lowThe bar's lowest pricenone
closeThe bar's close pricenone
volumeThe bar's volumenone
hl2Bar midpoint: (high + low) / 2none
hlc3Typical price: (high + low + close) / 3none
ohlc4Average of the bar's four pointsnone
bar_indexBar number from the start of historynone
timeBar time, epoch secondsnone

Functions

NameWhat it doesArguments
ta.smaSimple moving averagesource — the series to compute over; length — window length, constant
ta.emaExponential moving average; seeded with an SMA over the periodsource — the series; length — window length, constant
ta.rmaWilder's smoothing (as in RSI and ATR)source — the series; length — window length, constant
ta.rsiRelative strength index, 0…100source — the series; length — window length, constant
ta.atrAverage true rangelength — window length, constant
ta.trTrue range of the current barnone
ta.highestHighest value over the windowsource — the series; length — window length, constant
ta.lowestLowest value over the windowsource — the series; length — window length, constant
ta.medianWindow median; for an even length, the upper middle value. Added to source on 15 Nov 2026; unavailable in released builds so far.source — numeric series; length — constant or input.int, 1…4096
ta.stdevStandard deviationsource — the series; length — window length, constant
ta.changeDifference from the previous barsource — the series
ta.crossover1 on the bar where the first series crosses the second upwardssource1 — first series; source2 — second series
ta.crossunder1 on the bar where the first series crosses the second downwardssource1 — first series; source2 — second series
state.captureHolds the value saved on the latest event bar; na before the first event. Added to source on 15 Nov 2026; unavailable in released builds so far.trigger — finite nonzero value fires; source — series to save
state.peakMaximum of finite source values since the latest event, including its bar; na before the first event. Added to source on 15 Nov 2026; unavailable in released builds so far.trigger — finite nonzero value begins a new segment; source — series for the maximum
math.absAbsolute valuex — a number
math.sqrtSquare rootx — a number
math.logNatural logarithmx — a number
math.roundRoundingx — a number
math.signSign of a number: −1, 0 or 1x — a number
math.maxThe greater of twox — first; y — second
math.minThe lesser of twox — first; y — second
math.powRaise to a powerx — base; y — exponent
nzReplace “no value” with a replacement (or zero)source — the series; replacement — what to use instead (optional)
na1 when there is no valuesource — the series

Drawing on the chart

NameWhat it doesArguments
indicatorThe indicator header: its name and where to drawtitle — indicator name; overlay — over the candles or in its own pane (optional); precision — decimal places (optional)
plotDraw a series as a lineseries — what to draw; title — line label (optional); color — colour (optional); width — thickness (optional); style — kind: 0 line, 5 histogram, 10 circles (optional); offset — shift in bars: forward (+) or back (−) (optional)
hlineA horizontal line at a given priceprice — the price; title — label (optional); color — colour (optional)
fillFill between two plotted linesplot1 — first line; plot2 — second line; color — colour when the first line is above (optional); colorDown — colour when it is below (optional); opacity — density, percent (optional)
profile.sessionSession profile of available candle volume, with POC and value areastartHourUtc — UTC session start hour, 0…23; rows — maximum price rows; valueAreaPct — value-area volume percent; mode — 0 total, 1 up/down, 2 delta (optional); showPoc, showValueArea — level visibility (optional); widthPct — histogram width as 5…80% of session (optional); placement — 0 left, 1 right (optional); showBackground — session backdrop (optional); extendPoc, extendVah, extendVal — extend levels right until first touch (optional); upColor, downColor, pocColor, valueAreaColor, backgroundColor — colours (optional)

The profile uses available chart candles: each candle's volume is distributed across price rows in proportion to overlap with its low…high range. Detail changes with zoom. This is an approximation: lower-timeframe data is not fetched specifically for this indicator, and Forex/CFD volume may be tick volume. Missing volume is never fabricated.

Indicator settings

NameWhat it doesArguments
input.intAn integer settingtitle — label in the form; defval — default value; minval — no less than (optional); maxval — no more than (optional); group — Arguments or Style tab (optional)
input.floatA fractional settingtitle — label; defval — default; minval — no less than (optional); maxval — no more (optional); group — Arguments or Style tab (optional)
input.boolA switchtitle — label; defval — default; group — Arguments or Style tab (optional)
input.stringA text settingtitle — label; defval — default; group — Arguments or Style tab (optional)
input.colorA colour settingtitle — label; defval — default; group — Arguments or Style tab (optional)
input.sourceA series picker: close, hl2 and the resttitle — label; defval — default; group — Arguments or Style tab (optional)

Colours

NameWhat it doesArguments
color.rgbAn exact colour from componentsr — red 0…255; g — green; b — blue; a — opacity (optional)
color.bullThe theme's colour for a risenone
color.sellThe theme's colour for a fallnone
color.textMain text colournone
color.softMuted colournone
color.accentAccent colournone
color.gridGrid colournone