public void SetUp()
 {
     _constantIndicator = new ConstantIndicator <Decimal>(Decimal.ValueOf(6));
     _mockIndicator     = new FixedIndicator <Decimal>(Decimal.ValueOf("-2.0"), Decimal.ValueOf("0.00"), Decimal.ValueOf("1.00"), Decimal.ValueOf("2.53"), Decimal.ValueOf("5.87"), Decimal.ValueOf("6.00"), Decimal.ValueOf("10.0"));
     _mockIndicator2    = new FixedIndicator <Decimal>(Decimal.Zero, Decimal.One, Decimal.Two, Decimal.Three, Decimal.Ten, Decimal.ValueOf("-42"), Decimal.ValueOf("-1337"));
     _sumIndicator      = new SumIndicator(_constantIndicator, _mockIndicator, _mockIndicator2);
 }
        /**
         * Constructor.
         * @param indicator the indicator (usually close price)
         * @param longRoCTimeFrame the time frame for long term RoC
         * @param shortRoCTimeFrame the time frame for short term RoC
         * @param wmaTimeFrame the time frame (for WMA)
         */
        public CoppockCurveIndicator(IIndicator <decimal> indicator, int longRoCTimeFrame, int shortRoCTimeFrame, int wmaTimeFrame)
            : base(indicator)
        {
            SumIndicator sum = new SumIndicator(
                new ROCIndicator(indicator, longRoCTimeFrame),
                new ROCIndicator(indicator, shortRoCTimeFrame)
                );

            _wma = new WMAIndicator(sum, wmaTimeFrame);
        }
Exemple #3
0
        public void setUp()
        {
            ConstantIndicator <decimal> constantIndicator = new ConstantIndicator <decimal>(6M);
            FixedIndicator <decimal>    mockIndicator     = new FixedIndicator <decimal>(
                -2.0M, 0.00M, 1.00M, 2.53M, 5.87M, 6.00M, 10.0M
                );

            FixedIndicator <decimal> mockIndicator2 = new FixedIndicator <decimal>(
                Decimals.ZERO,
                Decimals.ONE,
                Decimals.TWO,
                Decimals.THREE,
                Decimals.TEN,
                -42M,
                -1337M
                );

            sumIndicator = new SumIndicator(constantIndicator, mockIndicator, mockIndicator2);
        }