EnterLongOnStopClose

Top  Previous  Next

Enters a long position if the close is at or above the specified price. This function is generally used by an Entry Block to initiate a position.

 

Syntax

 

EnterLongOnStopClose( stopPrice, [ protectStopPrice] )

 

Parameters

stopPrice

 

the entry stop price of the order

protectiveStopPrice

 

This sets the protective stop price of the order, and the position. Note that close orders are excluded from same day exits, so this protective stop is not used on the day of entry.

 

Example

 

' Enter the market if the close is at or above the entry price

broker.EnterLongOnStopClose( entryPrice )