예제 #1
0
        public override void Get(ref object Prototype, IIndicatorValues Ind)
        {
            IDivergentIndicator divergentIndicator = (IDivergentIndicator)this.IndicatorParameters.List[0];

            (Prototype as Trends).PeakToPeak = divergentIndicator.GetPeakToPeakLine(0, Ind);
            (Prototype as Trends).DipToDip   = divergentIndicator.GetDipToDipLine(0, Ind);
        }
예제 #2
0
        public override void Get(ref object Prototype, IIndicatorValues Ind)
        {
            IDivergentIndicator studyIndicator      = (IDivergentIndicator)this.IndicatorParameters.List[0];
            IDivergentIndicator divergenceIndicator = (IDivergentIndicator)this.IndicatorParameters.List[1];

            TrendLine studyPeakToPeak      = studyIndicator.GetPeakToPeakLine(0, Ind);
            TrendLine studyDipToDip        = studyIndicator.GetDipToDipLine(0, Ind);
            TrendLine divergencePeakToPeak = divergenceIndicator.GetPeakToPeakLine(0, Ind);
            TrendLine divergenceDipToDip   = divergenceIndicator.GetDipToDipLine(0, Ind);

            (Prototype as Divergence).StudyPeakToPeakValue              = (studyPeakToPeak == null) ? (decimal?)null : studyPeakToPeak.GetValueAt(Ind.Bar[0].Number);
            (Prototype as Divergence).StudyPeakToPeakGradient           = (studyPeakToPeak == null) ? (decimal?)null : studyPeakToPeak.Gradient;
            (Prototype as Divergence).StudyDipToDipValue                = (studyDipToDip == null) ? (decimal?)null : studyDipToDip.GetValueAt(Ind.Bar[0].Number);
            (Prototype as Divergence).StudyDipToDipGradient             = (studyDipToDip == null) ? (decimal?)null : studyDipToDip.Gradient;
            (Prototype as Divergence).DivergencePeakToPeakValue         = (divergencePeakToPeak == null) ? (decimal?)null : divergencePeakToPeak.GetValueAt(Ind.Bar[0].Number);
            (Prototype as Divergence).DivergencePeakToPeakGradient      = (divergencePeakToPeak == null) ? (decimal?)null : divergencePeakToPeak.Gradient;
            (Prototype as Divergence).DivergenceDipToDipValue           = (divergenceDipToDip == null) ? (decimal?)null : divergenceDipToDip.GetValueAt(Ind.Bar[0].Number);
            (Prototype as Divergence).DivergenceDipToDipInstantGradient = (divergenceDipToDip == null) ? (decimal?)null : divergenceDipToDip.Gradient;
        }