public IndicatorsInputs(databasemarkethistoryfilter database, int historiesLength) { StartingIndex = 0; OutputArrayLength = historiesLength; if (database.HistoryIsCustom) { StartingIndex = database.ManualStartingIndex; int boundsToSubtract = (historiesLength > database.CurrentHistory.Count) ? historiesLength - database.CurrentHistory.Count : 0; OutputArrayLength = historiesLength - boundsToSubtract; //use historiesLength as long as it is smaller than custom history } EndIndex = OutputArrayLength - 1; }
public TaLibTester() { FakeDataBase = new databasemarkethistoryfilter(); var rng = new Random(); for (int i = 0; i < HistoriesLength; i++) { FakeDataBase.CurrentHistory.Add( new GraphBar( rng.NextDouble(), rng.NextDouble(), rng.NextDouble(), rng.NextDouble(), rng.NextDouble(), DateTime.UtcNow)); } OpeningPrices = FakeDataBase.CurrentHistory .Select(bar => bar.OpeningPrice) .ToArray(); ClosingPrices = FakeDataBase.CurrentHistory .Select(bar => bar.ClosingPrice) .ToArray(); PriceHighs = FakeDataBase.CurrentHistory .Select(bar => bar.PriceHigh) .ToArray(); PriceLows = FakeDataBase.CurrentHistory .Select(bar => bar.PriceLow) .ToArray(); Volumes = FakeDataBase.CurrentHistory .Select(bar => bar.Volume) .ToArray(); PeriodsPerPrices = ClosingPrices .Select(close => rng.NextDouble()) .ToArray(); }
public Volatilities(databasemarkethistoryfilter databaseInstance) { database = databaseInstance; }
public OverlapStudies(databasemarkethistoryfilter databaseInstance) { database = databaseInstance; }
public Statistics(databasemarkethistoryfilter databaseInstance) { database = databaseInstance; }
public PriceTransforms(databasemarkethistoryfilter databaseInstance) { database = databaseInstance; }
public Cycles(databasemarkethistoryfilter databaseInstance) { database = databaseInstance; }
public Momentums(databasemarkethistoryfilter databaseInstance) { database = databaseInstance; }