예제 #1
0
 public static OrderDirection GetOrderDirection(this IBaseOrder order)
 {
     return(order.Volume >= 0 ? OrderDirection.Buy : OrderDirection.Sell);
 }
예제 #2
0
 public static bool GetIsFullfilled(this IBaseOrder order)
 {
     return(0 == Math.Round(order.GetRemainingVolume(), MarginTradingHelpers.VolumeAccuracy));
 }
예제 #3
0
 public static decimal GetRemainingVolume(this IBaseOrder order)
 {
     return(Math.Round(Math.Abs(order.Volume) - order.MatchedOrders.SummaryVolume,
                       MarginTradingHelpers.VolumeAccuracy));
 }
예제 #4
0
 public static OrderDirection GetCloseType(this IBaseOrder order)
 {
     return(order.Volume >= 0 ? OrderDirection.Sell : OrderDirection.Buy);
 }