public Indicators_Test()
 {
     this.daysCount = 30;
     this.indicators = new InvestmentStrategies.Indicators();
     this.indicators.readData(pathToTestData);
     this.rsii = new RSI(indicators, daysCount);
 }
 public CommodityChannelIndex_Test()
 {
     this.daysCount = 30;
     this.indicators = new InvestmentStrategies.Indicators();
     this.indicators.readData(pathToTestData);
     this.CCI = new CommodityChannelIndex(indicators, daysCount);
 }
示例#3
0
        public TRIX(Indicators indicators, int period)
        {
            this.period = period;
            this.indicators = indicators;
            this.data = new double[this.indicators.stockData.Count];

            this.calculate();
        }
 public StochasticOscillator_Test()
 {
     this.period = 30;
     this.movingAveragePeriod = 3;
     this.indicators = new InvestmentStrategies.Indicators();
     this.indicators.readData(pathToTestData);
     this.SO = new StochasticOscillator(indicators, period, movingAveragePeriod);
 }
        public Williams(Indicators indicators, int period, int movingAveragePeriod)
        {
            this.period = period;
            this.indicators = indicators;
            this.movingAveragePeriod = movingAveragePeriod;
            this.data = new double[this.indicators.stockData.Count];
            this.averageData = new double[this.indicators.stockData.Count];

            this.calculate();
        }
示例#6
0
        public RSI(Indicators indicators, int daysCount)
        {
            this.daysCount = daysCount;
            this.indicators = indicators;
            this.avgGains = new double[this.indicators.stockData.Count];
            this.avgLosses = new double[this.indicators.stockData.Count];
            this.data = new double[this.indicators.stockData.Count];

            this.calculate();
        }
        public CommodityChannelIndex(Indicators indicators, int period)
        {
            this.period = period;
            this.indicators = indicators;
            this.data = new double[this.indicators.stockData.Count];
            this.SMATP = new double[this.indicators.stockData.Count];
            this.typicalPrice = new double[this.indicators.stockData.Count];
            this.meanAbsoluteDeviationData = new double[this.indicators.stockData.Count];

            this.calculate();
        }
示例#8
0
        public MFI(Indicators indicators, int period)
        {
            this.period = period;
            this.indicators = indicators;
            this.data = new double[this.indicators.stockData.Count];
            this.typicalPrice = new double[this.indicators.stockData.Count];
            this.rawMoneyFlow = new double[this.indicators.stockData.Count];
            this.positiveMoneyFlow = new double[this.indicators.stockData.Count];
            this.negativeMoneyFlow = new double[this.indicators.stockData.Count];

            this.calculate();
        }
        static void Main(string[] args)
        {
            //Indicators indicators = new Indicators();
            //indicators.readData("../../data-stock/BZWBK.txt");
            //indicators.testReadData(1);
            //RSI rsi = new RSI(indicators, 30);
            //BOA.BOA boa = new InvestmentStrategies.BOA.BOA(20, 20);
            //boa.BayesianOptimisationAlgorithm();

            Indicators indicators = new Indicators();
            indicators.readData("../../data-stock/BZWBK.txt");
            indicators.calculateIndicators();
            Console.WriteLine(indicators.indicators[0].decide(50));
            indicators.indicators[0].printDecisions(50);
            Console.ReadLine();
            //StochasticOscillator SO = new StochasticOscillator(indicators, 30, 3);
        }
 public Trix_Test()
 {
     indicators = new InvestmentStrategies.Indicators();
     this.indicators.readData(pathToTestData);
 }