The order object (and the alternateOrder object) have the following properties. These properties can only be access in scripts that have a default order object context, or if you have set the order object using the SetAlternateOrder system function.
Properties: |
Description: |
---|---|
Name of the order's originating block. |
|
brokerSymbol |
Returns the broker symbol |
clearingIntent |
Value used by IB for clearing intent. Defaults to "IB" |
When this property return a TRUE condition, the order can continue. When this property returns a FALSE condition, the order has been rejected. |
|
By default it is always blank unless scripting assigned a numeric value with the order function the SetCustomValue. Once a value is assigned, this property will returns the custom value. It will also pass the value along to the instrument.unitCustomValue[x] property so that it can be used in the system, and discovered in the system's TradeLog. |
|
Entry risk of the order. Value is the difference between the order-price and the stop-price. This is not adjusted by the fill price. |
|
Returns the execution type as a string: "at Market", "on Stop", "on Open", "on Close", "on Stop Close", "at Limit Close", "on Stop Open", "Limit", "on Limit Open" |
|
Calculated fill price of an order. This value is not used automatically by Trading Blox. |
|
TRUE when order is a buy order |
|
TRUE when the order is an entry. When it is an Exit order, the results will be False. |
|
isWholeExit |
TRUE when Exiting a position unit where the order.quantity = instrument.unitQuantity[x]
Note:Each unit in a multiple unit position will have an entry and exit order. Some exit orders can be less the total unit. This property only return information about the unit number being examined. |
Profit taking limit price of the order |
|
TRUE when order has no order.stopPrice has no value |
|
Price of the order for stop or limit orders uses the close price for OnOpen orders and OnClose orders |
|
Order report message as set by order.SetOrderReportMessage( "Message" ) |
|
Order is a string with one of the following: "Long Entry", "Short Entry", "Long Exit", "Short Exit" |
|
OutsideRTH |
Returns the Outside RTH flag. |
order.position returns an integer where: 1 = LONG and -1 = SHORT. Constants LONG and SHORT can be used for comparison purposes. |
|
Contains the reject message when an order is rejected. |
|
Quantity of shares for Stock Class instruments and contracts for Futures Class instruments. |
|
referenceID |
Unique order reference ID value |
Information added by order.SetRuleLabel("text") after the order has been created. |
|
scriptName |
Script section name where an order was created. |
Numeric sort value assigned by order.SetSortValue( iNum ) |
|
The protect stop price of the order. This value is only used automatically on the order entry day, and only if the Entry Day Retracement is greater than zero. |
|
Symbol identified in the order. |
|
symbolIndex |
Add to with LoadSymbol. Returns the instrument.priorityIndex based on the system portfolio. |
symbolRef |
When using Instrument.LoadSymbol( order.symbolRef ), this property enables a direct access to order instrument that is quicker than using the instrument's symbol with LoadSymbol |
symbolWithType |
Useful when looping over orders and want to load the order's symbol. |
Combined system and block name of the order's originating system blox. |
|
systemIndex |
|
systemName |
Blox name that originated the order. |
The unit number of the order. |
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: |
---|
AlternateOrder Object, AlternateSystem Object, Changing Orders, Order Functions, Order Object |
See Also: |
Edit Time: 10/23/2020 11:44:09 AM |
Topic ID#: 452 |