/// <summary> /// the data loader for openquant. /// </summary> /// <param name="instrument">The instrument.</param> /// <param name="dtfrom">The dtfrom.</param> /// <param name="dtto">The dtto.</param> /// <param name="barsize">The barsize.</param> /// <returns></returns> public static LoaderTypes OpenquantDataLoader(string instrument, DateTime dtfrom, DateTime dtto, Data.Data.BarType bartype, long barsize) { var BarSerie = new DataArray(); Console.WriteLine("Initialized the Openquant-Encog Loader"); try { // BarSerie = this.GetHistoricalBars(dtfrom, dtto, BarType.Time, barsize); // BarSerie = this.GetHistoricalBars(this.MarketDataProvider,Instrument,dtfrom,dtto,(int)barsize); // BarSerie = DataManager.GetHistoricalBars(instrument, Data.Data.BarType.Time, 3600); var typeLoaded = new LoaderTypes(instrument, dtfrom, dtto, bartype, barsize); Console.WriteLine("Loaded Types instrument:" + typeLoaded.Instrument); return(typeLoaded); } catch (Exception ex) { var er = new EncogError(ex); Console.WriteLine("Error :" + ex.Message); Console.WriteLine("Error :" + ex.StackTrace); Console.WriteLine("Error:" + ex.InnerException); Console.WriteLine("Full message:" + ex); return(null); } }
public LoaderTypes(string instrument, DateTime StartingDate, DateTime ToDate, Data.Data.BarType Type, long SizeOfBars) { this.from = StartingDate; this.to = ToDate; this.Barsize = SizeOfBars; this.Instrument = instrument; this.TypeBar = Type; }
public LoaderTypes(string instrument, DateTime StartingDate, DateTime ToDate,Data.Data.BarType Type, long SizeOfBars) { this.from = StartingDate; this.to = ToDate; this.Barsize = SizeOfBars; this.Instrument = instrument; this.TypeBar = Type; }