public OptionTrade(HugoDataSet.ConfirmationCorrectionsRow row)
        {
            tradeType   = ConvertTradeTypeName(row.TradeTypeName, "");
            tradeVolume = Convert.ToDouble(row.TradeVolume);
            tradePrice  = Convert.ToDouble(row.TradePrice);
            totalCost   = Convert.ToDouble(row.TotalCost);
            subAcctName = row.SubAcctName;

            underlyingSymbol = row.UnderlyingSymbol;
            optionSymbol     = row.OptionSymbol;
            expirationDate   = row.ExpirationDate;
            strikePrice      = row.StrikePrice;
            optionType       = row.OptionType;

            exchangeName = row.ExchangeName.StartsWith("?") ? null : row.ExchangeName;
            tradeDate    = ConvertExt.ToValidDateTime(row.TradeDate);

            if (row.RecordType == "Correction")
            {
                tradeNote = "Changed to: " + row.GetDifferenceMsg(false /* use Hugo account and underlying symbols */);
            }
            else
            {
                tradeNote = "(" + row.RecordType + ")";
            }
        }
Esempio n. 2
0
        private static string BuildStockConfirmationCorrectionLine(HugoDataSet.ConfirmationCorrectionsRow row)
        {
            string outputLine;

            outputLine = String.Format("\"{0}\",{1:d},{2:d},\"{3}\",\"{4}\",\"{5}\",,,,, \"{6}\",{7},{8},\"{9}\",\"{10}\",{11:d},\"{12}\"",
                                       row.RecordType ?? String.Empty,
                                       row.ImportDate,
                                       row.TradeDate,
                                       row.TradeReferenceNumber ?? String.Empty,
                                       row.AccountNumber ?? String.Empty,
                                       row.UnderlyingSymbol ?? String.Empty,
                                       row.TradeTypeName ?? String.Empty,
                                       row.TradeVolume,
                                       row.TradePrice,
                                       row.ExecutingBroker ?? String.Empty,
                                       row.ExchangeName ?? String.Empty,
                                       row.TradeDate,
                                       row.GetDifferenceMsg(true) ?? String.Empty);
            return(outputLine);
        }