示例#1
0
 public BookmarkFile(string barFile, TimeBarItemType timeFrame)
 {
     this.barFile   = barFile;
     this.timeFrame = timeFrame;
     this.InitializeColumns(new BinaryField[] { new BinaryField("Time", BinaryColumnTypeOption.Long),
                                                new BinaryField("Position", BinaryColumnTypeOption.Long) });
 }
示例#2
0
        public BarItemFile(string barItemFile, BarItemType timeFrame, TimeBarItemType bookmarkTimeFrame)
        {
            this.barItemFile       = barItemFile;
            this.bookmarkTimeFrame = bookmarkTimeFrame;
            this.bookmarkFile      = Path.Combine(Path.GetDirectoryName(barItemFile), Path.GetFileNameWithoutExtension(barItemFile) + ".bmk");
            this.bookMark          = new BookmarkFile(bookmarkFile, bookmarkTimeFrame);

            Initialize();
        }
示例#3
0
        public TimeBasedDataFeed(TimeBarItemType timeBarItemType, BarItem openingBar, Guid cacheId, bool cachingEnabled = true)
        {
            this.timeBarItemType = timeBarItemType;
            this.period          = timeBarItemType.Value;
            this.startTime       = openingBar.Time;
            this.Restart(startTime);
            this.ResetPrice(openingBar.Open);
            this.Update(openingBar);
            this.SetNextRange();

            this.cachingEnabled = cachingEnabled;
            this.cacheId        = cacheId;
            if (cachingEnabled)
            {
                cachedPricebar = new PricebarCache(timeBarItemType, cacheId);
                cachedPricebar.Initialize();
            }
        }
示例#4
0
 internal BarItemAppender(string binaryFileName, byte[] fileHeader, BinaryField[] fields, TimeBarItemType bookmarkBarItemType)
     : base(binaryFileName, fileHeader, fields)
 {
     this.bookmarkBarItemType = bookmarkBarItemType;
 }