A single Complete Volume / Fill or Kill / FOK order can be submitted using the SubmitNewOrder method on the AccountList object:
' Submit an order.
moOrder = moAccounts.SubmitNewOrder( _
oAccount, _
oMarket, _
BuySell.Buy, _
PriceType.Limit, _
TimeType.CompleteVolume, _
10, _
CDbl(6534))
The parameters for the SubmitNewOrder method are described
here.
| penPriceType | Set to PriceType.Limit for a limit order. |
| penTimeType | Set to TimeType.CompleteVolume for a complete volume order (also known as Fill Or Kill or FOK) that will be submitted and either filled completely or cancelled immediately. |
| piVolume | Set to the order volume you want. |
| pdblLimitPrice | Set to the limit price you want. Be sure that you are using the correct overloaded SubmitNewOrder method and providing either a display price as a double or a tick price as an integer. |
In this example, the order will be submitted and either filled all 10 lots (there may be one or multiple fills returned) immediately, or the order is cancelled.