Esempio n. 1
0
        /// <summary>
        /// Статистика
        /// </summary>
        virtual public void ConsoleHandlerS()
        {
            Console.Clear();
            Console.WriteLine("Base.ConsoleHandlerS()");
            TradeConsole.GetBuySellTrades(strategyHeader);
            var dealList = TradeConsole.GetDeals(strategyHeader);

            TradeConsole.ConsoleWriteDealList(dealList);
            //TradeConsole.ExportData<Deal>(dealList.Deals);
        }
Esempio n. 2
0
        /// <summary>
        /// Выход
        /// </summary>
        virtual public void ConsoleHandlerX()
        {
            Console.WriteLine("Base.ConsoleHandlerX()");
            Console.WriteLine("Base.ConsoleHandlerX().ExportDataOnExit");
            Export.ExportData <Tick>(AppSettings.GetValue <bool>("ExportTicksOnExit"));
            Export.ExportData <Bar>(AppSettings.GetValue <bool>("ExportBarsOnExit"));
            Export.ExportData <Signal>(AppSettings.GetValue <bool>("ExportSignalsOnExit"));
            Export.ExportData <Order>(AppSettings.GetValue <bool>("ExportOrdersOnExit"));
            Export.ExportData <Trade>(AppSettings.GetValue <bool>("ExportTradesOnExit"));

            ///TODO 2. Перенести Список сделок в Контекст
            if (AppSettings.GetValue <bool>("ExportDealsOnExit"))
            {
                Console.WriteLine("Base.ConsoleHandlerX().ExportDealsOnExit");
                var dealList = TradeConsole.GetDeals(strategyHeader);
                if (dealList != null)
                {
                    Export.ExportData <Deal>(dealList.Deals);
                }
            }

            MethodWaitExit();
        }