Ejemplo n.º 1
0
        public AccountStateFileParser(ImportAccountStateBot bot)
        {
            _config        = bot.Config.CSVConfig;
            _stateFilePath = bot.StateFile.FullPath;
            _bot           = bot;

            _separator     = new string[] { _config.Separator };
            _defaultHeader = string.Join(_config.Separator, new string[] { "Time", "Symbol", "Side (Buy - true, Sell - false)", "Volume" });

            FileLinesRead = _config.SkipFirstLine ? 1 : 0;  //skip .csv file headers

            CheckOrCreateStateFile();
        }
Ejemplo n.º 2
0
        public ImportAccountStateBotConfig()
        {
            IsDebug        = false;
            RefreshTimeout = 1000;
            Mode           = ImportMode.Market;

            CSVConfig = new CSVFileConfig
            {
                DefaultVolume = 1.0,
                Separator     = ",",
                TimeFormat    = "yyyy-MM-dd'T'H:mm:ss'Z'",
                SkipFirstLine = true,
            };

            TrailingLimitPercentMode = new TrailingLimitPercentModeConfig
            {
                Percent = 0.1,
            };
        }