OPEN-SOURCE SCRIPT

David Varadi Intermediate Oscillator

Updated
The David Varadi Intermediate Oscillator (DVI) is a composite momentum oscillator designed to generate trading signals based on two key factors: the magnitude of returns over different time windows and the stretch, which measures the relative number of up versus down days. By combining these factors, the DVI aims to provide a reliable and objective assessment of market trends and momentum.

Methodology:
To calculate the DVI, a specific formula is applied. The magnitude component involves averaging smoothed returns over various lengths, weighted according to user-defined parameters. This calculation helps determine the magnitude of price changes. The stretch component follows a similar process, averaging smoothed returns over different lengths to gauge market momentum. Users have the flexibility to adjust the weights and lengths to suit their trading preferences and styles.

Utility:
The DVI offers versatility in its applications. It can be used for both momentum trading and trend analysis due to its smooth and consistent signals. Unlike some other oscillators, the DVI provides longer and uncorrelated signals, allowing traders to effectively combine trend-following and mean-reversion strategies. For example, the DVI is adept at identifying overbought levels above the 200-day moving average, serving as a useful tool for determining exit points during price strength and even potential shorting opportunities. Traders can develop simple trading systems based on the DVI, buying above the 200-day moving average and selling when the DVI exceeds a specified threshold. Conversely, they can consider short positions below the 200-day moving average and cover when the DVI falls below a specific threshold. The DVI's objective approach to analyzing market momentum makes it a valuable resource for traders seeking to identify trading opportunities.

Key Features:
  • Bar coloring: based on Trend, Extremeties or Reversions
  • Reversions: Potential reversal points marked with triangles above\below oscillator
  • Extremity Hues: Highlighting oxcillator reaching traditional OB\OS levels


Example Charts:
snapshot
Release Notes
fixed short title.
Release Notes
Updated license
magnitudemeanreversionMomentum Indicator (MOM)Momentum OscillatorsOscillatorspercentilerankstretchtrendindicatorvaradi

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer