VOLATILITY, DISPERSION & CANDLES

Mean abs deviation

The typical distance between price and its own average — a plain-spoken volatility measure that one outlier cannot blow up.

spec id: madlength (default 20)

What does Mean abs deviation measure?

The typical distance between price and its own average — a plain-spoken volatility measure that one outlier cannot blow up.

How is Mean abs deviation calculated?

Over the last 20 closes, take how far each one sits from the window's average, drop the minus signs, and average those distances.

Written by reading the engine’s real computation, not a textbook — where the two differ, the page describes what actually runs.

How do I use Mean abs deviation in a bot?

In the builder, add an indicator of type mad (parameters: length, default 20). Its value becomes an operand you can compare in any entry or exit rule. The engine grades the whole rule honestly: real fills, no look-ahead, half the history held back.

Related indicators

Or browse all 158 indicators in the full library.

Build a bot that trades on Mean abs deviation — the first backtest is free.

Run a free backtest