Search code examples
stockstradingalgorithmic-trading

How is the Bollinger Oscillator Calculated?


The Upperband is calculated: Middleband + (D + sqrt(((close - Middle band)^2)/n))

And I know how to calculate the lower bollinger band and middle bollinger bands.

But there is an elusive indicator called the bollinger oscillator which I find combines the bollinger bands into a single oscillating indicator. Please explain how to calculate it. Use SQL if possible assume fields contain relevant values.


Solution

    1. Find the 9-day moving average average (n1 + n2 ... + n9)/9
    2. Find the standard deviation of the 9-days
    3. Subtract 9-day Moving average from the current ruling price
    4. Take the answer devide by the standard deviation
    5. Answer is the BOS (Bollinger Oscillator)