Sets the Order Report Message for the order. This message will show up on the order report, for this order.



order.SetOrderReportMessage( message )





Text description of the rule that created the order.  



Rule Labels assigned will appear in the new order section of the Position and Order Report.



'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If instrument.position = LONG THEN
  '  Protective Exit Price
  LongEx = instrument.RoundTick(Max(UpTrend, SellLine))
  '  Update Risk Basis Property
  '  Update Protective Exit Indicator
  StopPrice = LongEx
  '  Assemble Order's Rule Details
  sRuleLabel = "Lx@" + instrument.PriceFormat(StopPrice - PriceAdj) +"s,"
  '  Send Order to Market
  '  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  '  When Broker Order Exist,...
  If system.OrderExists() THEN
    '  Apply Order Detail To Trade Information
    order.SetRuleLabel( sRuleLabel )
    '  Apply Order Details To Order Information
    order.SetOrderReportMessage( sRuleLabel )
  ENDIF '  OrderExists
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ENDIF '  i.Position = LONG


'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

'  Printing order.ruleLabel after assignment:

Print "order.ruleLabel = ", order.ruleLabel


order.ruleLabel = Lx@100.35s


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