How it is calculated
The midpoint of each bar is (high + low) / 2. AO is the SMA of the midpoints over the fast length minus their SMA over the slow length, drawn as a histogram. Nothing else is smoothed. After Bill Williams, Trading Chaos, 1995.
Reference: Williams 1995, Trading Chaos
How to read it
Above zero the short average is over the long one, below zero under it. Williams read a zero crossing, a saucer (two falling bars, then a rising one, on the same side of zero) and two peaks on the same side as signals. The values are in price units and not comparable between markets. Like any crossing of averages it lags and whipsaws in a sideways market.
In a strategy
A momentum entry when AO crosses above zero: ctx.ind("ao", fast=5, slow=34) compared with its value a bar earlier, with the opposite crossing as the exit.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Fast lengthfast | Whole number | 5 | min 1, max 5000 |
Slow lengthslow | Whole number | 34 | min 1, max 5000 |
What it draws
| Line | Drawn as |
|---|---|
| AO | Columns |
Guide lines at 0.
Used in
No strategy template reads it yet.