OPEN-SOURCE SCRIPT

CBA Chande Momentum OscillatorX2 B&S

97
Summary (using 2 Chande Momentum Values)
Inputs & Data: The script begins by defining inputs for two lookback periods and the price source.

Momentum Calculation: It calculates the price change (momentum) and then separates the positive and negative changes.

Oscillator Computation: For each period, it sums the positive and negative momentum and computes the oscillator value as a percentage using the difference divided by the total.

Plotting: The oscillator lines are plotted along with a zero reference line.

Signal Generation: Buy and sell signals are generated based on reversed crossover logic between the two oscillator lines, and visual markers are placed on the chart when these signals occur.

This script provides both numerical plots (the oscillator lines) and visual cues (the BUY/SELL labels) to help a trader understand the underlying momentum signals in the market.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.