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 Price Order

RSS
A single Activation on price 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.AtOrAboveTradeTicks, _
"12867")

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.AtOrAboveTradeTicks to activate the order when the specified price or higher trades. Set to ActivationType.AtOrBelowTradeTicks to activate the order when the specified price or lower trades.
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 trades at or above a price of 12867 in ticks. At that time it will submit the order to the exchange.

The format of the ActivationValue is "ticks;activation cancel time;cancel time;volume"
ticksRequired. The price in ticks trading that causes the order to be activated.
activation cancel timeOptional. The time to cancel the order if it has 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.
cancel timeOptional. The time to cancel the order after it has been 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.
volumeOptional. The last trade total volume at the activation price that needs to have traded before the order is activated. So to have the order activate when the last trade total volume for the activation price is 1000 or more specify 1000 here. Note that if the market trades through the activation price the order will be activated regardless of volume.

Examples for psActivationValue:
  • "12867" - activates the order when the specified price (must be entered as Ticks and not as display price) as long as the market is in a pre-open, open or other mode that allows order submission.
  • "12867;100" - activates the order when the specified price (must be entered as Ticks and not as display price) as long as the market is in a pre-open, open or other mode that allows order submission. If the order has not been activated within 100 seconds it is cancelled.
  • "12867;100;05 Jul 2012 18:00:00" - activates the order when the specified price (must be entered as Ticks and not as display price) as long as the market is in a pre-open, open or other mode that allows order submission. If the order has not been activated within 100 seconds it is cancelled. If the order is activated but not completed by 05 Jul 2012 18:00:00 then the order is cancelled.
  • "12867;;1000" - activates the order when the specified price (must be entered as Ticks and not as display price) has traded 1000 or more lots since that price became the last traded price, as long as the market is in a pre-open, open or other mode that allows order submission.

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.