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.
|