Parks the current order if it is active.
Visual Basic |
---|
Public Sub Park( _ Optional ByVal until_ As Date = "12/30/1899 12:00:00 AM" _ ) |
- until_
- UTC Date/time the parked order should automatically activate.If value equals to "12/30/1899 12:00:00 AM" UTC (the default value) method will park order without automatic activation.
This method works in asynchronous mode, which means that it returns after the request is sent, but without waiting for its results.
The method fails with an error in the following cases:
- If the order is inactive;
- If the order's execution instructions contain the oeiTrailing flag;
- If the order status is one of osContingent, osRejectGW, osRejectFCM, osCanceled, osFilled, osExpired, osBusted, osParked, osDisconnected, osInTransitTimeout.
This method changes the order status to osParked. The change will be reported through the OrderChanged event.
CanBeParked property determines the order's availability for parking.
The opParked order property determines if the order is parked.
It is possible to remove or change activation time through the CQGOrderModify object. Refer to the opActivationTime order property description.