StochasticDistanceOsc

Description

The StochasticDistanceOsc is a technical indicator designed to evaluate an instrument’s current price position relative to its maximum and minimum ranges. Its calculation is similar to that of other stochastic oscillators (e.g, StochasticFull); however, it uses momentum to determine relative price strength and direction.

The StochasticDistanceOsc is calculated as: 

 

where:

  • CurrentDistance is the difference between the current close and the first close in the specified period (set with the momentum length parameter).
  • MinDistance is the lowest value of CurrentDistance in the lookback period.
  • MaxDistance is the highest value of CurrentDistance in the lookback period.

The study determines price direction based on the value of the CurrentDistance:

  • Positive. If the current close is higher than the first close in the lookback period; can indicate upward momentum.
  • Negative. If the current close is lower than the first close in the lookback period; can indicate downward momentum.
  • Zero. If the current close is equal to the first close in the lookback period.

The main plot is smoothed using a moving average (set with the average type parameter).

Crossings between the StochasticDistanceOsc and oversold or overbought levels can indicate trend reversals.

Input Parameters

Parameter Description
momentum length The length of the period used to calculate momentum.
high low length The length of the period used to calculate the highest and lowest values of momentum.
average length The length of the average used in the calculations.
over bought The overbought level value.
over sold The oversold level value.
average type The type of moving average used in the calculations: simple, exponential, weighted, Wilder’s, or Hull.

Plots

Plot Description
SDO The Stochastic Distance Oscillator plot.
OverBought The overbought level.
OverSold The oversold level.

Further Reading

1. “A Momentum Indicator – The Stochastic Distance Oscillator” by Vitali Apirine. Technical Analysis of Stocks & Commodities, June 2023.

Example*

*For illustrative purposes only. Not a recommendation of a specific security or investment strategy.

Past performance is no guarantee of future performance.