protected OrderBaseWatcher(string symbol, ImportAccountStateBot bot) { _bot = bot; _symbol = _bot.Symbols[symbol]; _tokenQueue = new ConcurrentQueue <TransactionToken>(); _openRequestTemplate = OpenOrderRequest.Template.Create().WithSymbol(symbol); }
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(); }
public OrderWatchersManager(ImportAccountStateBot bot) { _watchers = new Dictionary <string, OrderBaseWatcher>(); _bot = bot; }
public MarketModeWatcher(string symbol, ImportAccountStateBot bot) : base(symbol, bot) { }
public TralingLimitModeWatcher(string symbol, ImportAccountStateBot bot) : base(symbol, bot) { _config = bot.Config.TrailingLimitPercentMode; _tralingPercentCoef = _config.Percent * 0.01 * _symbol.Point; }