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
»
When an order gets a fill then the OrderFill event is raised. This occurs once only per fill:

' Event raised when the order has received a fill.
Private Sub moOrder_OrderFill(ByVal poOrder As T4.API.Order, ByVal poTrade As T4.API.Order.Trade) Handles moOrder.OrderFill

' Display some of the fill details.
Trace.WriteLine("OrderUpdate: " & poOrder.UniqueID & _
", Fill: " & poTrade.Volume & "@" & _
poOrder.Market.ConvertTicksDisplay(poTrade.Ticks))

End Sub

If you are not connected when the fill occurs then the fill event will not be raised when you reconnect. You would need to check your orders for fills after the AccountComplete event has fired on reconnection.

The fills or trades of an order are kept in the Order's Trades property. The TradeData has trade lists for the following:

TradesList of every individual fill received for this order. The newest fill is the highest index in the list. The combination of the order's UniqueID property and the index of the Trade in this list is unique. You can also Use the TradeID property as a unique identifier.
AggregatesList of Trades grouped by price so that multiple Trades at the same price have a single combined entry.
TradeLegsList of the individual leg fills received for this order. This is only populated for strategy markets where the exchange supplies leg fill information. The newest fill is the highest index in the list.

Some example filled orders:

OrderTradesAggegatesLegs
Corn Dec12, 1 fill1@67321@6732
Corn Dec12, 2 fills at same price1@6732
1@6732
2@6732
Corn Dec12, 2 fills at different price1@6732
1@6734
1@6732
1@6734
Corn Dec12-Mar13, 1 fill1@-761@-76dec12 1@6556
mar13 1@6564
Corn Dec12-Mar13, 2 fills1@-76
1@-74
1@-76
1@-74
dec12 1@6556
mar13 1@6564
dec12 1@6556
mar13 1@6562
Soybean Aug12-2Sep12-Nov12
Butterfly, 1 fill
1@901@90Aug12 1@15326
Sep12 2@15004
Nov12 1@14772
Soybean Aug12-2Sep12-Nov12
Butterfly, 1 fill
1@901@90Aug12 1@15326
Sep12 1@15004
Sep12 1@15004
Nov12 1@14772
Corn Dec12, 1 filled
and then busted
1@6732
-1@6732
0@6732

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.