Esempio n. 1
0
 protected override decimal Calculate(int index)
 {
     // trix = 3 * ema - 3 * emaEma + emaEmaEma
     return(Decimals.THREE.MultipliedBy(
                _ema.GetValue(index)
                .Minus(_emaEma.GetValue(index)))
            .Plus(_emaEmaEma.GetValue(index)));
 }
Esempio n. 2
0
        protected override decimal Calculate(int index)
        {
            decimal shortEmaValue = _shortTermEma.GetValue(index);
            decimal longEmaValue  = _longTermEma.GetValue(index);

            return(shortEmaValue.Minus(longEmaValue)
                   .DividedBy(longEmaValue)
                   .MultipliedBy(Decimals.HUNDRED));
        }
Esempio n. 3
0
        protected override decimal Calculate(int index)
        {
            int     startIndex = Math.Max(0, index - _timeFrame + 1);
            decimal massIndex  = Decimals.Zero;

            for (int i = startIndex; i <= index; i++)
            {
                decimal emaRatio = _singleEma.GetValue(i).DividedBy(_doubleEma.GetValue(i));
                massIndex = massIndex.Plus(emaRatio);
            }
            return(massIndex);
        }
Esempio n. 4
0
 protected override decimal Calculate(int index)
 {
     return(_ema.GetValue(index).MultipliedBy(Decimals.TWO)
            .Minus(_emaEma.GetValue(index)));
 }
Esempio n. 5
0
 protected override decimal Calculate(int index)
 {
     return(_ema13OfEma25OfPriceChangeIndicator.GetValue(index).DividedBy(_ema13OfEma25OfAbsolutePriceChangeIndicator.GetValue(index))
            .MultipliedBy(Decimals.HUNDRED));
 }
Esempio n. 6
0
 protected override decimal Calculate(int index)
 {
     return(_shortTermEma.GetValue(index).Minus(_longTermEma.GetValue(index)));
 }