Welcome Guest, you are in: Login
CTS Futures
Home
Pricing
FAQ

T4 Desktop
User Guide
Scripting Guide
Release Notes

Mobile and Web
T4 Mobile
T4 WebTrader

Admins
T4 Admin Guide

Developers
API 4.0 Guide
API 4.0 Reference
FIX API




Search the wiki
»

Activation On Market Mode Order

RSS
A single Activation on Market Mode order can be submitted using the SubmitNewOrder method on the AccountList object:

' Submit an order.
moOrder = moAccounts.SubmitNewOrder( _
oAccount, _
oMarket, _
BuySell.Buy, _
PriceType.StopMarket, _
TimeType.Normal, _
1, _
0, _
CDbl(6534), _
OpenClose.Undefined, _
"", _
0, _
ActivationType.OnMarketMode, _
MarketMode.PreOpen)

The parameters for the SubmitNewOrder method are described here.

penPriceTypeSet to PriceType.StopMarket for a stop market order.
penTimeTypeSet to TimeType.Normal for a day order that will exist for the current trading day only.
piVolumeSet to the order volume you want.
pdblLimitPriceLimit price is not needed for a stop market order so set this to 0.
pdblStopPriceSet 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.
penOpenCloseSet to OpenClose.Undefined.
psTagFree text field for developer use.
piTrailTicksSet to 0 to disable trailing.
penActivationTypeSet to ActivationType.OnMarketMode to activate the order when the specified market mode becomes active.
psActivationValueThis string contains the details for when to activate the order.

In this example, the order will be held on our servers until the Market mode is PreOpen. At that time it will submit the order to the exchange.

The format of the ActivationValue is "mode;cancel time"
modeRequired. The market mode to activate the order on.
cancel timeOptional. The time to cancel the order if the order is still working or not yet activated. The time can be specified as either a full date time in the format "dd MMM yyyy HH:mm:ss" or as a number of seconds from now.

Examples for psActivationValue:
  • "Open" - activates when the market opens.
  • "PreOpen" - activates when the market goes pre-open.
  • "Open;05 Jul 2012 18:00:00" - activates the order when the market opens. The order is cancelled at the specified time (all times are U.S. Central Time) if it has not triggered yet and also if it has triggered but is still working. Using the datetime format of "dd MMM yyyy HH:mm:ss" is highly recommended.
  • "Open;100" - activates the order when the market opens. The second paramter specifies the cancel time but as a number of seconds from the current time. In this case it is 100 seconds from now. At that time the order will be cancelled if it is working or not yet triggered.

Trade how you want, where you want

support@ctsfutures.com (312) 939 0164

141 W. Jackson Blvd., Suite 211A, Chicago, IL 60604

© 2009-2012 Cunningham Trading Systems Inc. All rights reserved.