public static string ToFormattedString([In] this PositionField field) { return(string.Format("[InstrumentID={0};ExchangeID={1};HedgeFlag={2};Side={3};" + "Position={4};TodayPosition={5};HistoryPosition={6};ID={7}]", field.InstrumentID, field.ExchangeID, Enum <HedgeFlagType> .ToString(field.HedgeFlag), Enum <PositionSide> .ToString(field.Side), field.Position, field.TodayPosition, field.HistoryPosition, field.ID)); }
public void AddPosition(PositionField position) { Symbol = position.Symbol; Instrument = position.InstrumentID; Exchange = position.ExchangeID; if (position.Side == PositionSide.Long) { Long = position; } else { Short = position; } }
public PositionFieldEx() { Long = new PositionField(); Short = new PositionField(); }
public static string InstrumentName([In] this PositionField field) { return(PInvokeUtility.GetUnicodeString(field.InstrumentName)); }