chandeMomentumOscillator() function

The chandeMomentumOscillator() function applies the technical momentum indicator developed by Tushar Chande.

    n: 10,
    columns: ["_value"],

The Chande Momentum Oscillator (CMO) indicator calculates the difference between the sum of all recent data points with values greater than the median value of the data set and the sum of all recent data points with values lower than the median value of the data set, then divides the result by the sum of all data movement over a given time period. It then multiplies the result by 100 and returns a value between -100 and +100.



The period or number of points to use in the calculation.


The columns to operate on. Defaults to ["_value"].


Input data. Default is piped-forward data (<-).

Output tables

For each input table with x rows, chandeMomentumOscillator() outputs a table with x - n rows.


Transform data with a two point Chande Momentum Oscillator

The following example uses data provided by the sampledata package to show how chandeMomentumOscillator() transforms data.

import "sampledata"
    |> chandeMomentumOscillator(n: 2)

View input and output

Was this page helpful?

Thank you for your feedback!

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.