Appearance
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
| Input | Type | Default |
|---|---|---|
| Long length | int | 20 |
| Short length | int | 5 |
| Signal line length | int | 5 |
| SMI color | color | "#2962FF" |
| Signal color | color | "#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" });