Skip to content

Result Property

Summary

The resulting time series of Detrended Price Oscillator calculation.

Signature

1
public abstract IndicatorDataSeries Result {get;}

Return Value

IndicatorDataSeries

Declaring Type

cAlgo.API.Indicators.DetrendedPriceOscillator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 private _detrendedPriceOscillator _dpoFast;
 private _detrendedPriceOscillator _dpoSlow;
 protected override void OnStart()
 {
     _dpoFast = Indicators.DetrendedPriceOscillator(Source, PeriodFast, MaType);
     _dpoSlow = Indicators.DetrendedPriceOscillator(Source, PeriodSlow, MaType);
 }
 protected override void OnBar()
 {
     if(_dpoFast.Result.Count < 1)
         return;
     int currentIndex = _dpoFast.Result.Count - 1;
     int prevIndex = currentIndex - 1;
     if (_dpoFast.Result[prevIndex] > _dpoSlow.Result[prevIndex])
     {
         //Do something
     }
 }

Last update: July 1, 2022

Comments