예제 #1
0
        public ISymbol Create(string symbolName, int digits)
        {
            Symbol symbol = this[symbolName] as Symbol;

            if (symbol != null)
            {
                return(symbol);
            }

            TicksManager tm = new TicksManager();

            tm.History = new TicksFileData(_dirHistory, symbolName, digits);
            tm.Cache   = new TicksFileData(_dirCache, symbolName, digits);

            BarsFolder barsFolderHistory = new BarsFolder(_dirHistory);
            BarsFolder barsFolderCache   = new BarsFolder(_dirCache);

            MapsFolder mapsFolderHistory = new MapsFolder(_dirHistory);
            MapsFolder mapsFolderCache   = new MapsFolder(_dirCache);

            tm.InitializeBarsFiles(barsFolderHistory, barsFolderCache);
            tm.InitializeMapsFiles(mapsFolderHistory, mapsFolderCache);

            symbol = new Symbol(tm);
            return(symbol);
        }