コード例 #1
0
 public Indicators_Test()
 {
     this.daysCount = 30;
     this.indicators = new InvestmentStrategies.Indicators();
     this.indicators.readData(pathToTestData);
     this.rsii = new RSI(indicators, daysCount);
 }
コード例 #2
0
 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();
        }
コード例 #4
0
 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);
 }
コード例 #5
0
        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();
        }
コード例 #7
0
        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();
        }
コード例 #9
0
        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);
        }
コード例 #10
0
 public Trix_Test()
 {
     indicators = new InvestmentStrategies.Indicators();
     this.indicators.readData(pathToTestData);
 }