Ejemplo n.º 1
0
 internal void PositionClosed(TradeResult tradeResult)
 {
     if (tradeResult.IsSuccessful)
     {
         Grids.Where(x => x.Status == TradeStatus.Active && x.RobotPosition.Id == tradeResult.Position.Id).All(x => {
             x.Reset();
             return(true);
         });
         if (Grids.All(x => x.Status == TradeStatus.Inactive))
         {
             Reset();
         }
     }
 }
Ejemplo n.º 2
0
 internal void PendingOrderCancelled(TradeResult tradeResult)
 {
     if (tradeResult.IsSuccessful)
     {
         Grids.Where(x => x.Status == TradeStatus.Pending && x.RobotPendingOrder.Id == tradeResult.PendingOrder.Id).All(x => {
             x.Reset();
             return(true);
         });
         if (Grids.All(x => x.Status == TradeStatus.Inactive))
         {
             Reset();
         }
     }
 }