A single Stop Limit order can be submitted using the SubmitNewOrder method on the AccountList object:
' Submit an order.
moOrder = moAccounts.SubmitNewOrder( _
oAccount, _
oMarket, _
BuySell.Buy, _
PriceType.StopLimit, _
TimeType.Normal, _
1, _
CDbl(6534), _
CDbl(6534))
The parameters for the SubmitNewOrder method are described
here.
| penPriceType | Set to PriceType.StopLimit for a stop limit order. |
| penTimeType | Set to TimeType.Normal for a day order that will exist for the current trading day only. |
| piVolume | Set to the order volume you want. |
| pdblLimitPrice | Set to the limit price you want the order to work at once it has been triggered. 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. |
| pdblStopPrice | Set to the stop trigger 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 stop order will trigger when the price of 6534 or higher trades. The order then changes into a Limit order with a limit price of 6534. If the market has already gone through that price then you will be left with a working limit order.