Ejemplo n.º 1
0
        public static string ToFormattedString(this TickField field)
        {
            int yyyy = field.Date / 10000;
            int MM   = field.Date % 10000 / 100;
            int dd   = field.Date % 100;

            int hh = field.Time / 10000;
            int mm = field.Time % 10000 / 100;
            int ss = field.Time % 100;

            string date = string.Format("{0}-{1:D2}-{2:D2} {3:D2}:{4:D2}:{5:D2}.{6:D3}", yyyy, MM, dd, hh, mm, ss, field.Millisecond);

            return(string.Format("{0},{1},{2},{3},{4},{5},{6},{7}",
                                 date, field.LastPrice, field.Volume, field.OpenInterest,
                                 field.BidPrice1, field.BidSize1, field.AskPrice1, field.AskSize1));
        }
Ejemplo n.º 2
0
 public static string ToFormattedHeader(this TickField field)
 {
     return("DateTime,Price,Size,OpenInt,Bid,BidSize,Ask,AskSize");
 }