public void GetBarsPeriodTest() { var myAccountSettings = new AccountSettings { BASEURI = BASEURI, APIKEY = APIKEY, ID = ID }; var instrument = new InstrumentAccessor(myAccountSettings, "EUR_USD"); int period = 25; var bars = instrument.GetBars(period, "M5"); Assert.AreEqual(period, bars.candles.Count); }
public void GetBarsTimeFrameTest() { var myAccountSettings = new AccountSettings { BASEURI = BASEURI, APIKEY = APIKEY, ID = ID }; var instrument = new InstrumentAccessor(myAccountSettings, "EUR_USD"); int period = 25; string timeFrame = "M15"; var bars = instrument.GetBars(period, timeFrame); Assert.AreEqual(timeFrame, bars.granularity); }
public InstrumentManager(InstrumentAccessor instrumentAccessor) { _instrumentAccessor = instrumentAccessor; }