36 lines
835 B
C#
36 lines
835 B
C#
using System;
|
|
using System.Collections;
|
|
namespace sharp.trading
|
|
{
|
|
public class HistoricTrade : MarshalByRefObject, IComparable
|
|
{
|
|
public Int64 UniqueID;
|
|
public DateTime TimeStamp;
|
|
|
|
public Double Volume;
|
|
public Double Price;
|
|
public Double TotalPrice;
|
|
|
|
public OrderType OrderType;
|
|
|
|
public HistoricTrade()
|
|
{
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return string.Format("[HistoricTrade: UniqueID={0}, TimeStamp={1}, Volume={2,14:#0.00000000}, Price={3,14:#0.00000000}, TotalPrice={4,14:#0.00000000}, OrderType={5}]", UniqueID, TimeStamp, Volume, Price, TotalPrice, OrderType);
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
return this.UniqueID.Equals(((HistoricTrade)obj).UniqueID);
|
|
}
|
|
|
|
public int CompareTo(object obj)
|
|
{
|
|
return -this.UniqueID.CompareTo(((HistoricTrade)obj).UniqueID);
|
|
}
|
|
}
|
|
}
|