Awesome oscillator
All indicators

LibraryMomentum

Indicator

Awesome oscillator

The gap between a short and a long simple average of the bar midpoints: whether recent momentum is stronger or weaker than the longer term one.

MomentumOwn pane2 inputsAO

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

InputTypeDefaultRange or choices
Fast lengthfastWhole number5min 1, max 5000
Slow lengthslowWhole number34min 1, max 5000

What it draws

LineDrawn as
AOColumns

Guide lines at 0.

Used in

No strategy template reads it yet.

OrionQuant