ExitUnitAtLimitClose

Top  Previous  Next

Exits the specified unit for the current instrument on the next close if it  trades through the specified limit price. This function is generally used by an Exit Block to lighten up a position.

 

Syntax

 

ExitUnitAtLimitClose( unitNumber, limitPrice )

 

Parameters

unitNumber

 

the unit to exit

limitPrice

 

the price which the next bar must trade beyond to trigger the order

 

Example

' Exit the first unit if the close trades through our target.

broker.ExitUnitAtLimitClose( 1, limitPrice )