You are here: Trading System Programming > Reference > Callback Functions > Functions > onOrderModify

onOrderModify

This callback function gets called whenever ActiveTick receives a response from a trading broker to previously placed order modify request.

 

Syntax

onOrderModify(previousOrder, newOrder, orderResults);

Parameters

previousOrder

Instance of Order object filled with details about previous order.

 

newOrder

Instance of Order object filled with details about new order.

 

orderResults

Instance of OrderResults object filled with result details about the order.

Remarks

This callback is useful to receive status indications wether the order placement has successfully been processed, or if it has failed.

Example

The following example demonstrates the use of onOrderModify() callback function.

 

ffunction onOrderModify(previousOrder, newOrder, orderResults)

{

//process order results

 

if(getSymbol() != order.getSymbol())

return;

 

if(orderResults.getErrors().length == 0)

{

//order was placed successfully

..

..

}

else

{

//order failed

..

..

}

}

See Also

placeOrderModify(), getSymbol(), Account Class, Order Class, OrderResults Class

 


Copyright © 2006-2009 ActiveTick LLC