TRIX is the rate of change of a triple-exponentially-smoothed close, expressed in basis points. Triple smoothing strips out minor noise, so TRIX crossing its zero line (or a signal line) gives relatively clean momentum and trend-change signals with little whipsaw. Copy the version for your platform.
//@version=5
indicator("TRIX", overlay=false)
length = input.int(15, "Length")
trixVal = ta.trix(length)
plot(trixVal, title="TRIX", color=color.fuchsia, linewidth=2)
hline(0)inputs: Length(15);
variables: E1(0), E2(0), E3(0), MyTrix(0);
E1 = XAverage(Close, Length);
E2 = XAverage(E1, Length);
E3 = XAverage(E2, Length);
MyTrix = 10000 * (E3 - E3[1]) / E3[1];
Plot1(MyTrix, "TRIX");{TRIX - triple-smoothed EMA rate of change}
e1 := Mov(C, 15, E);
e2 := Mov(e1, 15, E);
e3 := Mov(e2, 15, E);
10000 * (e3 - Ref(e3, -1)) / Ref(e3, -1)To use it inside dtcharts, paste any version into the Script Converter and it becomes a native indicator on your chart.