Skip to content
All library documents

Using an OBV Oscillator to Spot Divergences

Article ProRealCode

Summary

This document defines an On Balance Volume oscillator as the difference between OBV and its moving average. The default averaging period is 20, and the code constrains the chosen period to a range of 1 to 999. The resulting difference series is intended to make divergences easier to detect, offering a way to compare changes in volume-weighted flow with price behavior.

The document provides an indicator calculation, not a complete trading strategy. It gives no market, timeframe, entry or exit rules, performance evidence, or guidance for interpreting divergences. As a result, the oscillator is best understood as a signal component that would need further testing and explicit trading rules before use.

Key ideas

  • The oscillator subtracts a moving average of OBV from the current OBV value.
  • Its default smoothing period is 20, with the input limited to values from 1 to 999.
  • The stated use is to help identify divergences.
  • The document does not specify trading rules or provide performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.