Skip to content

IIndicatorsAccessor.RainbowOscillator

method · IIndicatorsAccessor · cAlgo.API.Internals

DesktopCLICloud

The Rainbow Oscillator is a process of repetitive smoothing of simple moving averages resulting in a full spectrum of trends.

Definition

RainbowOscillator RainbowOscillator(DataSeries source, int levels, MovingAverageType maType)
api.Indicators.RainbowOscillator(source: DataSeries, levels: int, maType: MovingAverageType) -> RainbowOscillator

Parameters

Name C# type Python type Description
source DataSeries DataSeries The price source data used for calculation.
levels int int The value of the levels used for calculation.
maType MovingAverageType MovingAverageType The Moving Average type used for calculation.

Returns RainbowOscillator — The Rainbow Oscillator instance.

Examples

var rainbow = Indicators.RainbowOscillator(Bars.ClosePrices, 9, MovingAverageType.Simple);
Print("Rainbow Oscillator: {0}", rainbow.Result.LastValue);
rainbow = api.Indicators.RainbowOscillator(api.Bars.ClosePrices, 9, MovingAverageType.Simple)
api.Print(f"Rainbow Oscillator: {rainbow.Result.LastValue}")