Five useful technical indicators (Part 1)

Five useful technical indicators

 
In my previous article, I shared with you the 7 popular technical indicators. In this article, I will go through five technical indicators that are very useful for trading and how you can create them with the Highcharts Stock library:

  1. On-Balance Volume (OBV)
  2. Disparity Index
  3. Directional Movement Index (DMI)
  4. Klinger Oscillator
  5. Chande Momentum Oscillator (CMO)

For the sake of simplicity, this subject is divided into two articles. This article is about the two first technical indicators: On-Balance Volume (OBV) and Disparity Index. In the next article, I will cover Directional Movement Index (DMI), Klinger Oscillator, and Chande Momentum Oscillator (CMO).

Let’s get started

On-Balance Volume (OBV)

On-Balance Volume, or OBV for short, is a technical trading momentum indicator that relies on volume flow to forecast stock prices’ change. In a nutshell, the On-balance Volume indicator helps traders to predict the price movement based on the volume.
The On-Balance Volume graph is calculated based on the following rules:

  1. If a bar’s closing price is higher than the previous bar’s closing price, their volumes are summed together.
  2. If a bar’s closing price is lower than the previous bar’s closing price, their volumes are subtracted.
  3. If the closing price of a bar is equal to the previous bar’s closing price, the volume remains the same.

How to create an On-Balance Volume with Highcharts?

Here are the steps to display an On-Balance Volume technical indicator:

  1. Be sure to add the main indicator module
    <script src="https://code.highcharts.com/stock/indicators/indicators.js"></script>
  2. Add the On-Balance Volume module
    <script src="https://code.highcharts.com/stock/indicators/obv.js"></script>
  3. Use the obv type series:
    {
      linkedTo: 'AAPL',
      type: 'obv',
      params: {
        volumeSeriesID: 'volume'
      },
      showInLegend: true,
      yAxis: 2
    }

Disparity Index

Like the On-Balance Volume indicator, the disparity index is a momentum indicator used to forecast the price relative to a moving average. Basically, each point of the disparity index chart is the percentage of the point’s current price versus the moving average. That is why you need to choose the moving average of your choice as a parameter to calculate the disparity index.

How to create a Disparity Index with Highcharts?

Here are the steps to display a Disparity Index technical indicator:

  1. Be sure to add the main indicator module
    <script src="https://code.highcharts.com/stock/indicators/indicators.js"></script>
  2. Add the Disparity Index module
    <script src="https://code.highcharts.com/stock/indicators/disparity-index.js"><script>
  3. Use the disparityindex type series:
    {
      type: 'disparityindex',
      linkedTo: 'aapl',
      yAxis: 1,
      params: {
        period: 9
      }
    }
  4. Be sure to set the Moving average number in the period parameter
    params:

    {
      period: 9
    }

 

Now, you know how to create On-Balance Volume (OBV) and Disparity Index with Highcharts Stock. Feel free to jump to the next part to know more about Directional Movement Index (DMI), Klinger Oscillator, and Chande Momentum Oscillator (CMO).

Don’t forget to try it out and share your thoughts and comments in the comment section below.
 


*You can only upgrade to Highcharts 9.1.0 for free if you have an active Advantage, or you’re using Highcharts for a personal website, a school website or a non-profit organization.

What is advantage?
Advantage gives you access to all new software releases (minor and major) and our extended support offering for the duration of your Advantage term.

If you need to renew your inactive Advantage or have related questions, please contact our sales team.