MyAlgoMate
// INDICATOR FORMULAS

How indicators are calculated — with Excel.

The formulas behind 12 widely used technical indicators, explained step by step. Each page has a worked example, the Excel formulas column by column, a free Excel sheet and a box to calculate the indicator from your own prices.

Last updated:

RSI formula

Relative Strength Index

Wilder's 14-candle averages of the up-moves and down-moves in the close, turned into a 0–100 scale.

Needs: closing prices

Formula + Excel →.xlsx

MACD formula

Moving Average Convergence Divergence

12 EMA minus 26 EMA, a 9-period signal line and the histogram between them.

Needs: closing prices

Formula + Excel →.xlsx

EMA formula

Exponential Moving Average

A moving average that gives recent closes more weight, step by step from the first value.

Needs: closing prices

Formula + Excel →.xlsx

SMA & WMA formula

Simple and weighted moving averages

The plain average of the last n closes, and the weighted version that counts recent closes more.

Needs: closing prices

Formula + Excel →.xlsx

Bollinger Bands formula

A 20-period average with bands 2 standard deviations above and below, plus %B and bandwidth.

Needs: closing prices

Formula + Excel →.xlsx

Supertrend formula

ATR bands around the candle's midpoint and the rules that move the line from one band to the other.

Needs: high, low, close

Formula + Excel →.xlsx

VWAP formula

Volume Weighted Average Price

The day's running total of price × volume divided by the running total of volume.

Needs: intraday high, low, close, volume

Formula + Excel →.xlsx

ATR formula

Average True Range

True range for each candle and Wilder's 14-period average of it — a measure of how much price moves.

Needs: high, low, close

Formula + Excel →.xlsx

Stochastic formula

Stochastic oscillator

Where the close sits inside the last 14 candles' high–low range (%K), and its 3-period average (%D).

Needs: high, low, close

Formula + Excel →.xlsx

ADX formula

Average Directional Index (with +DI and −DI)

Directional movement, +DI and −DI, DX and Wilder's 14-period ADX, column by column.

Needs: high, low, close

Formula + Excel →.xlsx

Heikin Ashi formula

Heikin Ashi candles

The four formulas that turn normal candles into Heikin Ashi open, high, low and close.

Needs: open, high, low, close

Formula + Excel →.xlsx

OBV formula

On-Balance Volume

A running total that adds the day's volume on an up close and subtracts it on a down close.

Needs: close and volume

Formula + Excel →.xlsx

How these pages are worked out

Every page uses the same made-up prices of an imaginary stock — 60 daily candles, and 26 five-minute candles for VWAP — so you can follow each formula from the first candle to the last. The table on the page, the calculator and the Excel sheet all use the same maths, and every value in each Excel sheet was checked against the page.

We follow the standard settings most charts start with:

  • Wilder's smoothing (often called RMA) for RSI, ATR and ADX, as Wilder published them.
  • EMAs start from a simple average of their first n values (EMA, MACD).
  • Population standard deviation (Excel STDEVP) for Bollinger Bands.
  • Typical price, (High + Low + Close) ÷ 3, for VWAP, restarting each day at 09:15.

Indicators describe past prices. These pages show how they are calculated — not what to trade. For levels you work out from one high, low and close (pivot points, Camarilla, CPR, Fibonacci), see the free calculators.

// FAQ

Indicator formulas — questions, answered.

Yes. Every indicator page has a free .xlsx download — no sign-up. Each sheet has the example prices with every formula filled in, so you can replace the prices with your own and extend the rows.

Indicators that smooth (RSI, EMA, MACD, ATR, ADX, Supertrend) remember earlier candles, so they depend on how much history goes in — start from plenty of candles and the difference fades. Settings, spot vs futures prices and the timeframe matter too. Each page lists the usual causes for that indicator.

No. They are made-up prices of an imaginary stock, chosen so every step of each formula can be followed. They are not real market data and say nothing about any stock.

No. An indicator is a calculation from past prices. These pages explain how each one is worked out; they are not a forecast, a recommendation or advice. MyAlgoMate provides trading technology — what you do with an indicator is your own decision.

Yes. Every page has a box where you can paste your own prices — straight from Excel or your broker's download — and see the indicator worked out column by column. It runs in your browser; nothing you paste is stored or sent.

Free trading calculators

Turn your own rules into automated orders.

Already use indicators in your own rules? MyAlgoMate's algo trading software places the orders your rules call for at 150+ Indian brokers — and TradeBridge turns your own TradingView or Chartink alerts into live orders. You decide the rules; we provide the technology.

Share this page