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.
Syntax: |
---|
order.SetCustomValue( value ) |
Parameter: |
Description: |
---|---|
value |
Property will accept decimal, or Integer values. |
Returns: |
---|
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. |
Example: |
---|
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Results: |
order.customValue = 12 |
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: 10/23/2020 11:44:08 AM |
Topic ID#: 541 |