Sets a user assigned custom numeric value to an order so that the value will be available when the position is active and when it is reported in the Trade Log.



order.SetCustomValue( value )





Property will accept decimal, or Integer values.



Assigned a numeric value that will appear in the order.customValue, and instrument.unitCustomValue properties, after the trade has ended in the Trade Log report.



'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  Create a custom numeric value
value = 3 x 4
'  Assign that custom numeric value to the
'  order's customValue property.
order.SetCustomValue( value )
'  Display user's custom value
PRINT "order.customValue = ", 12
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


order.customValue = 12


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.



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.




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