StochasticOscillator


Summary

The Stochastic Oscillator is a momentum indicator that aims to show price reversals by comparing the closing price to the price range.

Syntax

public StochasticOscillator StochasticOscillator(int kPeriods, int kSlowing, int dPeriods, MovingAverageType maType)
public StochasticOscillator StochasticOscillator(MarketSeries marketSeries, int kPeriods, int kSlowing, int dPeriods, MovingAverageType maType)

Parameters

NameDescription

Example 1

private StochasticOscillator stochastic;
//...
protected override void OnStart()
{
   stochastic = Indicators.StochasticOscillator(kPeriods, kSlowing, dPeriods, maType);
}
protected override void OnTick()
{
   double percentD = stochastic.PercentD.LastValue;
   double percentK = stochastic.PercentK.LastValue;
    //...
}