ExitAllUnitsOnStopOpen

Top  Previous  Next

Exits all units for the current instrument on the next open if it is lower than the stop price for long positions or higher than the stop price for short positions. This function is generally used by an Exit Block to close out a position.

 

Syntax

 

ExitAllUnitsOnStopOpen( stopPrice )

 

Parameters

stopPrice

 

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

 

Example

' Exit all units on the next open if it hits our stop.

broker.ExitAllUnitsOnStopOpen( exitStop )