This function is an advanced "IB" (InteractiveBrokers)trade clearing option.  Clearing can beIBto clear the trade at "IB", orAwaywhich means the trade is placed with InteractiveBrokers, but cleared elsewhere.

 

Syntax:

order.SetClearingIntent( "textClearingOption" )

 

Parameter:

Description:

textClearingOption

Use one of the following:

"IB"  to clear the trade at InteractiveBrokers

Away” to place the trade at InteractiveBrokers, but clear it at another facility.

 

Returns:

 

 

Example:

'  When the order returns after the Broker Statement,
'  Check to ensure the order is active.  Then
'  only use one the following statements to specify
'  where the order is to be cleared.
If system.OrderExists THEN
  '  Use this statement to clear the order at IB
  order.SetClearingIntent( "IB" )
  OR
  '  Use this statement when the order is placed
  '  at IB, but it is not cleared at IB
  order.SetClearingIntent( "Away" )
ENDIF

 

Alternate Order Object:

Access to Order Object properties and functions in other scripts is made possible by using the AlternateOrder Object as the prefix ahead of the "." property or function. AlternateOrder Object is discussed below.

 

Notes:

Always check to be sure the order is available after a Broker function call using the system.orderExists() function prior to accessing it.

 

Using the alternateOrder object when orders are not in context will provide the same access as the Order object.  However, the alternateOrder object must be brought into context using the system.SetAlternateOrder object function prior to any attempt to use is properties and functions.

 

Once orders are brought into context their properties and function are available to reference and changes.

 

Links:

 

See Also:

AlternateOrder Object, AlternateSystem Object, Order Functions, Order Object, Order Properties

 


Edit Time: 9/21/2020 2:48:55 PM


Topic ID#: 539

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software