/// <summary> /// Creates a string which is to be published and converted back to Order on receiver end /// </summary> /// <param name="type">Order Type</param> public string DataToPublish(string type) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(type); stringBuilder.Append("," + OrderID); stringBuilder.Append("," + OrderSide); stringBuilder.Append("," + OrderSize); stringBuilder.Append("," + OrderTif); stringBuilder.Append("," + OrderStatus); stringBuilder.Append("," + Security.Symbol); stringBuilder.Append("," + OrderDateTime.ToString("M/d/yyyy h:mm:ss.fff tt")); stringBuilder.Append("," + OrderExecutionProvider); stringBuilder.Append("," + TriggerPrice); stringBuilder.Append("," + Slippage); stringBuilder.Append("," + Exchange); return(stringBuilder.ToString()); }
public override string ToString() { return(String.Format("{0,-5} {1,-20} {2,-20} {3, -20}", OrderNo, OrderDateTime.ToString("dd/MM/yyyy hh:mm:ss tt", CultureInfo.InvariantCulture), Amount, Status)); }
public Order() { ID = Guid.NewGuid(); OrderDateTime = DateTime.Now; TradeNo = OrderDateTime.ToString("yyyyMMddhhmmssffff"); }