Skip to content

TRIX ​

Rate of change of a triple-smoothed EMA of the log price.

Kind indicator · Drawn in its own pane

Try it ​

On the chart, press / and choose TRIX under Oscillators. To change it, copy the source below into the AlphaScript editor.

Inputs ​

InputTypeDefault
Lengthint18
Colorcolor"#F23645"

Source ​

From packages/alphascript/indicators/trix.as.js.

js
indicator({ name: "TRIX", shortTitle: "TRIX", overlay: false, precision: 4 });
const length = input.int("Length", 18, { min: 1 });
const lg = ta.calc([candle.close], (c) => math.log(c));
const e3 = ta.ema(ta.ema(ta.ema(lg, length), length), length);
plot(ta.calc([ta.change(e3, 1)], (d) => 10000 * d), { title: "TRIX", color: input.color("Color", "#F23645", { group: "Style" }) });
hline(0, { title: "Zero", color: "rgba(120,123,134,0.5)", style: "dashed" });

AlphaScript language v0.1 · runtime 0.2.0