Пример #1
0
        public override void Start(bool AtFirst)
        {
            try
            {
                if (AtFirst)
                {
                    LState.Reset();
                    FirstInit();
                }
                else
                {
                    ActiveOrdersInfo();
                }

                if (CStrategyPrices.StartUpdateTicker())
                {
                    LState.IsStartegyRun = true;
                    ChangeState?.Invoke(true, true, LParam.StrategyName);
                }
                else
                {
                    LState.IsStartegyRun = false;
                    ChangeState?.Invoke(true, false, LParam.StrategyName);
                }
                SaveData();
            }
            catch (Exception ex)
            {
                System.Media.SystemSounds.Beep.Play();
                Print("Error in start: " + ex.Message);
                ChangeState?.Invoke(true, false, LParam.StrategyName);
            }
        }
Пример #2
0
        public override void Start(bool AtFirst)
        {
            if (AtFirst)
            {
                LState.Reset();
            }
            else
            {
                ActiveOrdersInfo();
            }
            ErrorsCount = 0;
            InitLLStrategies();

            if (CStrategyPrices.StartUpdateTicker())
            {
                LState.IsStartegyRun = true;
                ChangeState?.Invoke(true, true, LParam.StrategyName);
            }
            else
            {
                LState.IsStartegyRun = false;
                ChangeState?.Invoke(true, false, LParam.StrategyName);
            }
            SaveData();
        }