Skip to content

StochasticCalculationType

enum cAlgo.API

DesktopCLICloud

An enumeration of the different Stochastic Oscillator indicator calculation types.

Definition

public enum StochasticCalculationType

Namespace: cAlgo.API · Group: Indicators

Examples

var lowHigh = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.LowHigh);
var closeClose = Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.CloseClose);
Print("%K low/high: {0}, %K close/close: {1}", lowHigh.PercentK.LastValue, closeClose.PercentK.LastValue);
lowHigh = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.LowHigh)
closeClose = api.Indicators.StochasticOscillator(9, 3, 9, MovingAverageType.Simple, StochasticCalculationType.CloseClose)
api.Print(f"%K low/high: {lowHigh.PercentK.LastValue}, %K close/close: {closeClose.PercentK.LastValue}")

Values

Name Value Description
LowHigh 0 Uses lowest low and highest high (default).
CloseClose 1 Uses lowest close and highest close.

See also