QTScript indicators

Every indicator a QTScript strategy can call, free and pro, grouped by kind.

Every indicator a .qtscript file can call, grouped by kind, with what each one computes. A line under setup: writes one call by its bare name, like ema(20) or atr(14).

  • The arguments each name accepts are the forms in the table under “What goes under setup:” in the QTScript guide. This page does not repeat them.
  • Free names work on every plan. There are 39.
  • Pro names come with the Pro and Elite plans and need a uses line (see “The pro indicators: uses” in the QTScript guide, which has their forms and the names they register). There are 12.
  • Called without a name of its own, an indicator registers a name made from its own and its parameters: rsi(14) registers rsi14, ema(9) registers ema9, wma(5) registers wma5. Where the name is not that obvious, the notes give it.
  • A name that is on neither list, and a pro name whose uses line is missing, is rejected as unknown indicator '<name>'.
GroupFree names
Averages7
Oscillators4
Bands3
Volatility5
Distance and change4
Counting and extremes5
Arithmetic3
Transformations2
Comparisons6

Averages

NameWhat it isNotes
smaSimple moving averageDiscrete by default; sma(String, int, boolean) with false is the continuous mode
emaExponential moving average
wmaWeighted moving average
temaTriple exponential moving average
hmaHull moving average
kamaKaufman’s adaptive moving averageTakes the efficiency-ratio period and the fast and slow periods; kama() registers kama10_2_30
mmaMoving average with Wilder’s smoothing

Oscillators

NameWhat it isNotes
rsiRelative strength indexCutler’s by default; rsi(int, boolean) with false is Wilder’s smoothing
stochRsiStochastic RSIBetween 0 and 100; stochRsi(14) registers stochRsi14
macdMoving average convergence divergence12 and 26 by default; macd() registers macd; the last form runs it on another indicator
cciCommodity channel indexcci(20) registers cci20

Bands

NameWhat it isNotes
bollingerBollinger bandsRegisters the middle line and, beside it, <name>Upper and <name>Lower
bollingerBandwidthWidth of a Bollinger band, in percentTakes the name of the band it measures
bollingerPercentBBollinger %B, where the price sits within the bandsCarries bands of its own; bollingerPercentB() registers pctB20_2

Volatility

NameWhat it isNotes
atrAverage true range, with Wilder’s smoothingReads whole bars: use it in a kline strategy. On a ticker strategy its values are not the bar’s and mean nothing. atr() registers atr14. It is free: there is no pro.atr
stdDevStandard deviation
varianceVariance
volatilityAverage of how often the price changesvolatility(5) registers vol5
percentVolatilityThe same as a percentagepercentVolatility(5) registers pvol5

Distance and change

NameWhat it isNotes
distanceDistance between two indicators, (a - b) / b
distanceMaDistance of the price from a moving average, (close - ma) / ma
rateChangeRate of changeThe boolean form chooses percent
percentChangePercent change, tick over tick

Counting and extremes

NameWhat it isNotes
gainConsecutive periods of gain
lossConsecutive periods of loss
maxRunning maximum
minRunning minimum
sumRunning sum

Arithmetic, transformations and comparisons

NameWhat it isNotes
addSum of two indicators
diffFirst indicator minus the second
mulAn indicator scaled by a number, or two indicators multiplied
clampAn indicator held to a range
roundAn indicator rounded to a number of decimals
equal, notEqual, greatThan, greatOrEqual, lessThan, lessOrEqualAn indicator compared with a number, as a boolean indicatorThe five-argument forms choose between two indicators: equal("selected", "signal", 1, "emaFast", "emaSlow") gives emaFast while signal equals 1 and emaSlow otherwise

The pro indicators

They read whole bars, so use them in a kline strategy. A uses line brings them in: uses pro.adx, pro.obv for those two, uses pro.* for all twelve, and several uses lines add up. A plan without them can register the strategy but not run it (402).

NameWhat it is
adxAverage directional index; the two directional lines register beside it
superTrendSuperTrend line, with an upper and a lower band beside it
ichimokuIchimoku cloud; the Tenkan line is the main one, with the Kijun, Senkou A, Senkou B and Chikou lines beside it
obvOn-balance volume
vwapVolume-weighted average price
mfiMoney flow index
cmfChaikin money flow
kurtosisKurtosis of the close over a period
parkinsonVolatility estimator over whole bars
garmanKlassVolatility estimator over whole bars
rogersSatchellVolatility estimator over whole bars
yangZhangVolatility estimator over whole bars

The four estimators take an annualization factor as their last, optional argument.

What QTScript cannot call

The builder methods that take a function (predicate, fun, decorate, periodCount) and conditional can only be written in a Java strategy. So can the indicator classes that are not builder names: the Java engine has many more, free and pro (a z-score, Aroon, the Sharpe ratio and others), and the Java indicator catalogue lists them with the package each lives in.