Skip to content

SMI Ergodic Oscillator ​

SMI Ergodic minus its signal, as a histogram.

Kind indicator · Drawn in its own pane

Try it ​

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

Inputs ​

InputTypeDefault
Long lengthint20
Short lengthint5
Signal line lengthint5
Above zerocolor"#26A69A"
Below zerocolor"#FF5252"

Source ​

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

js
indicator({ name: "SMI Ergodic Oscillator", shortTitle: "SMIO", 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(ta.calc([erg, ta.ema(erg, signalLength)], (e, s) => e - s), { title: "SMI Ergodic Oscillator", style: "columns",
  colorUp: input.color("Above zero", "#26A69A", { group: "Style" }), colorDown: input.color("Below zero", "#FF5252", { group: "Style" }) });

AlphaScript language v0.1 · runtime 0.2.0