Пример #1
0
        private void OnReceiveConditionResult(object sender, OnReceiveStrateyStateResultArgs e)
        {
            Item = new MartinGailItem();

            Item.itemState = e.State;
            Item.itemCode  = e.ItemCode;
            startOrderTime = DateTime.Now;
            CoreEngine.GetInstance().SendLogMessage("!!!!! 마틴게일 아이템 :" + e.State.ToString());
        }
Пример #2
0
        public void PopMartinGailItem(long profit)
        {
            CoreEngine.GetInstance().SendLogMessage("PopMartinGailItem");
            Item = null;
            if (martinGailStack.Count == 0)
            {
                CoreEngine.GetInstance().SendLogWarningMessage("!!!!!!!!!!empty stack!!!!!!");
                RestartSameStep();
                return;
            }
            MartinGailItem itempop = martinGailStack.Pop();

            TodayAllTry++;

            if (profit > 0)
            {
                if (itempop != null)
                {
                    itempop.martinState = MARTIN_RESULT.WIN;
                    winCount++;
                    Restart();
                }
            }
            else if (profit == 0)
            {
                drawCount++;
                if (itempop != null)
                {
                    itempop.martinState = MARTIN_RESULT.DRAW;
                    RestartSameStep();
                }
            }
            else
            {
                loseCount++;
                if (itempop != null)
                {
                    itempop.martinState = MARTIN_RESULT.LOSE;

                    if (itempop.step >= MARTIN_MAX_STEP)
                    {
                        Restart();
                    }
                    else
                    {
                        GoNext();
                    }
                }
            }
        }