Пример #1
0
        public string getResult()
        {
            var result = new StringBuilder();

            resultDateList = getResultDateList();
            result.AppendLine("Protocal");
            result.AppendLine(TradingProtocal.toTitle());
            result.AppendLine(tradeProtocal.ToString());
            result.AppendLine("----------");
            result.AppendLine("Trade Summary");
            result.AppendLine(getTradeSummaryTitle());
            result.AppendLine(getTradeSummaryCols());
            result.AppendLine(getTradeSummary());
            result.AppendLine("----------");
            result.AppendLine("Dealed Trade");
            foreach (var line in getDealedTradeResult())
            {
                result.AppendLine(string.Join("\t", line));
            }

            result.AppendLine("----------");
            result.AppendLine("Daily Trade Detail");
            foreach (var thisDate in resultDateList)
            {
                foreach (var line in getDailyTradeDetail(thisDate))
                {
                    result.AppendLine(string.Join("\t", line));
                }
            }
            return(result.ToString());
        }