Sets the Exit-Price Limit for an active position's specified unit.  

 

This function works where order are being processed to assign a value:

Order object script sections:

Unit Size

Can Add Unit

Can Fill Order

 

Instrument object scripts:

Entry Order Filled

Exit

Entry

Adjust Stops

After Instrument Day

 

NOTE:

If you set the limit with this function no order is placed. To place an actual limit order in the market use a broker order like this: broker.ExitAllUnitsAtLimit( instrument.unitExitLimit ).

 

Syntax:

SetExitLimit( [unitNumber,] limitPrice )

 

Parameter:

Description:

[unitNumber,]

The unit number (optional). If not supplied this will default to the first unit.

limitPrice

The value of the limit to be set.

 

Example:

' Set the limit price.
instrument.SetExitLimit( limitPrice )
 
' Set the limit price for the specified unit.
instrument.SetExitLimit( unitNumber, limitPrice )

Returns:

Values assigned can be printed and used after assignment.  It is also available to the Broker object to execute.

 

Links:

unitExitLimit

See Also:

Position Functions, Position Properties

 


Edit Time: 9/25/2017 09:09:58 AM


Topic ID#: 542

 

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