backtrader.indicators.awesomeoscillator module

Awesome Oscillator Module - AO momentum indicator.

This module provides the Awesome Oscillator (AO) developed by Bill Williams to measure market momentum.

Classes:

AwesomeOscillator: Awesome Oscillator indicator (aliases: AwesomeOsc, AO).

Example

class MyStrategy(bt.Strategy):
def __init__(self):

self.ao = bt.indicators.AO(self.data)

def next(self):
if self.ao.ao[0] > 0 and self.ao.ao[-1] < 0:

self.buy()

class backtrader.indicators.awesomeoscillator.AwesomeOscillator[source]

Bases: Indicator

Awesome Oscillator (AO) is a momentum indicator reflecting the precise changes in the market driving force, which helps to identify the trend’s strength up to the points of formation and reversal.

Formula:
  • median price = (high + low) / 2

  • AO = SMA (median price, 5)- SMA (median price, 34)

See:
alias = ('AwesomeOsc', 'AO')
plotlines = <backtrader.metabase.plotlines_obj object>
__init__(*args, **kwargs)
next()[source]

Calculate AO for the current bar.

Formula: AO = SMA(median_price, fast) - SMA(median_price, slow)

once(start, end)[source]

Calculate AO in runonce mode.

frompackages = ()
packages = ()
backtrader.indicators.awesomeoscillator.AwesomeOsc

alias of AwesomeOscillator

backtrader.indicators.awesomeoscillator.AO

alias of AwesomeOscillator