Exemplo n.º 1
0
        public void Execute(int barNum)
        {
            int barsCount = m_context.BarsCount;

            if (!m_context.IsLastBarUsed)
            {
                barsCount--;
            }
            if (barNum < barsCount - 1)
            {
                return;
            }

            if (m_dropVirtualPositions)
            {
                try
                {
                    PositionsManager posMan = PositionsManager.GetManager(m_context);
                    m_context.Log("All virtual positions will be dropped right now.", MessageType.Warning, true);
                    posMan.DropVirtualPositions(m_context);

                    // Безтолку делать повторный пересчет
                    //context.Recalc(true);
                }
                finally
                {
                    m_dropVirtualPositions = false;
                }
            }
        }