Trend

Median Indicator with ATR Bands on Gold

The Median takes the middle value of recent prices instead of the average, so a single spike cannot drag it. It carries bands a multiple of the ATR away, and an EMA of itself that shows which way it is leaning.

Loading the live chart.

Close
–
Median
–
Upper Band
–
Lower Band
–
Median EMA
–

Open the gold chart

What it shows

Everything draws on the price chart. The Median is a thick red line, with a green band above it and a purple band below. A thin blue EMA of the Median runs beside it, and the space between the two is shaded green when the Median is above its EMA and purple when it is below.

How Pravex works it out

  1. Take the middle value of the source over the last median window of candles (nearest-rank median). With 3 candles, it is the one in between.
  2. Upper band = Median + distance in ATRs × ATR over the range length. Lower band = Median − distance in ATRs × ATR.
  3. The blue line is an EMA of the Median over the same median window, 3 candles by default.
  4. The shading follows which of the Median and its EMA is higher.
  5. Invented numbers to show it: if the Median is 100, the ATR is 4 and the multiplier is 2, the bands sit at 108 and 92.

Settings

SettingDefaultWhat changing it does
Source(H + L)/2The price that goes into the median. The default is the middle of each candle; the close gives a line that follows closing prices.
Median window3How many candles the median looks at. A longer window ignores more spikes and reacts later.
Range length14How many candles the Wilder-smoothed ATR covers. A longer length gives steadier bands.
Distance in ATRs2How many ATRs the bands sit from the Median. A larger number gives wider bands that price touches less often.

How traders read it

The colour of the shading is the quickest read. Green says the Median is above its EMA, so recent prices are leaning up, and purple says they are leaning down.

The bands show a normal range around the Median in units of recent volatility. A candle that closes outside a band is a larger move than the last 14 candles usually produce.

Red crossing blue marks a change of lean. A close beyond a band is the stronger event, because it beat twice the usual range of the last 14 candles.

When it misleads

With a median window of 3, the Median follows the candles closely, so the shading flips often in a sideways stretch. The bands are built from the ATR, which lags: after a quiet spell they are narrow and a sudden move breaks them at once. On gold, a news release can stretch the ATR for a long time and leave the bands too wide long after the move.

Questions and answers

Why use a median instead of a moving average?

A median takes the middle value of the window. An average adds the values up. One extreme value shifts an average, but it hardly moves a median.

Why is the Median window only 3 candles?

That is the Pravex default, with a 14-candle range and bands 2 ATRs out. At 3 the red line drops single-candle spikes but still hugs price; 9 or more gives a calmer line that turns later.

What do the green and purple areas mean?

Green means the Median is above its EMA. Purple means it is below.

Why is the default source the middle of the candle?

The Median starts from (H + L)/2, so a long wick on one side moves it half as much as a close would. Switch the source to close if you want the line to follow closing prices.

Related: Volatility Stop, Chande Kroll Stop, Bollinger Bands %b, every indicator.

Not financial advice. Read our disclaimer.

Pro charts. Zero paywalls.

Charts for gold, oil, US indices and crypto, with every tool free to use.

Open the chart

No card, no trial, no upgrade pop-ups.