示例#1
0
 public void OnTick()
 {
     if (_order.IsRunning && _order.IsOpen)
     {
         //_profitProtector.TryProtectProfit();
     }
     else
     {
         _ea.OrderCompleted();
     }
     // should trail and lock profit ?
 }
示例#2
0
 public void OnTick()
 {
     if (_order.IsRunning)
     {
         _ea.MoveToOrderRunningState(_order);
     }
     else if (!_order.IsValid)
     {
         CloseOrder();
         _ea.OrderCompleted();
     }
 }