ExitUnitAtLimitOpen

Top  Previous  Next

Exits the specified unit for the current instrument on the next open if it is higher than the limit price for long positions or lower than the limit price for short positions. This function is generally used by an Exit Block to lighten up a position.

 

Syntax

 

ExitUnitAtLimitOpen( unitNumber, limitPrice )

 

Parameters

unitNumber

 

the unit to exit

limitPrice

 

the price which the open must exceed (above/below)  to trigger the order

 

Example

' Exit the first unit on the next open if it trades through our limit.

broker.ExitUnitAtLimitOpen( 1, exitLimit )