Offset moving average — Tradetron Community
← Community

Offset moving average

Keyword help 1,040 views

Amit Pathak

yes …compare -1 Candle with SMA/EMA 21 -8

Tradetron Team Tradetron team

Yes. An offset (shifted) moving average is the same average read from an earlier candle, and you do that with the Position keyword’s candle index.

Example: SMA 21 shifted forward by 8 candles

At the last closed candle (-1), the shifted SMA equals the SMA of 8 candles earlier, i.e. candle -9:

Position(CLOSE(Symbol(<instrument>, '15m')), -1) > Position(SMA(CLOSE(Symbol(<instrument>, '15m')), 21), -9)

This reads: “the last closed candle closed above the 21-SMA displaced by 8 candles”.

Tips

  • Index 0 is the candle still forming; -1 is the last closed one.
  • The same works for EMA or any other series indicator.
  • Check the result against your charting tool with the same timeframe and offset, in Live Offline with the Notification Log.

Docs: Keyword Documentation — Tradetron

:sparkles: Answer written with AI from Tradetron docs (Oct 2026). Original replies are kept above. Spot something wrong? Reply below.