Esempio n. 1
0
        public TradeAgent(MainWindow UIWindow)
        {
            Config = new Config();
            ActiveCharacter = new Character();
            OrderSet = new MarketOrderSet(Config);
            _decide = new Strategy(ActiveCharacter, Config);

            // Load non-character specific configs.
            _loadGeneralConfig();

            // hook with UI, and delete old logs.
            _UIWindow = UIWindow;
            Log.Initialize(_UIWindow.WriteLogToWindow);
            Log.WriteLog("Done initializing trade agent.");

            // init other parts
            // updateInfo()
        }
Esempio n. 2
0
 public void SetConfig(Config config)
 {
     _config = config;
 }
        public MyMarketOrder(MyOrder isxEveOrderObject, List<MyMarketOrder> orderList, Config config)
            : base(isxEveOrderObject)
        {
            _orderList = orderList;
            _config = config;
            EvaluateCoolDownEndTime = System.DateTime.UtcNow;
            DateTime lastModifiedTime = new System.DateTime(1601, 1, 1).AddSeconds(isxEveOrderObject.TimeStampWhenIssued / 10000000);
            ModifyCoolDownEndTime = lastModifiedTime.AddMilliseconds(_config.RandomizedOrderModifyIntervalInMilliSec);
            Status = OrderStatus.Unknown;

            ID = isxEveOrderObject.ID;
            _skip = false;
            foreach (long id in _config.OrderIDsToSkip)
            {
                // When we load orders for first time, we need to retrive the saved "Skip" mark from config file.
                if (ID == id)
                {
                    _skip = true;
                }
            }
        }
Esempio n. 4
0
 public Strategy(Character character, Config config)
 {
     _character = character;
     _config = config;
 }
 public MarketOrderSet(Config config)
 {
     _config = config;
     Orders = new List<MyMarketOrder>();
 }