Ejemplo n.º 1
0
        protected OrderBaseWatcher(string symbol, ImportAccountStateBot bot)
        {
            _bot    = bot;
            _symbol = _bot.Symbols[symbol];

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