Skip to content

SMI Ergodic Indicator ​

True strength index on fast settings with a signal line.

Kind indicator · Drawn in its own pane

Try it ​

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

Inputs ​

InputTypeDefault
Long lengthint20
Short lengthint5
Signal line lengthint5
SMI colorcolor"#2962FF"
Signal colorcolor"#FF6D00"

Source ​

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

js
indicator({ name: "SMI Ergodic Indicator", shortTitle: "SMII", overlay: false, precision: 4 });
const longLength = input.int("Long length", 20, { min: 1 }), shortLength = input.int("Short length", 5, { min: 1 }), signalLength = input.int("Signal line length", 5, { min: 1 });
const erg = ta.tsi(candle.close, shortLength, longLength);
plot(erg, { title: "SMI", color: input.color("SMI color", "#2962FF", { group: "Style" }) });
plot(ta.ema(erg, signalLength), { title: "Signal", color: input.color("Signal color", "#FF6D00", { group: "Style" }) });
hline(0, { title: "Zero", color: "rgba(120,123,134,0.5)", style: "dashed" });

AlphaScript language v0.1 · runtime 0.2.0