EnterLongOnStop

Top  Previous  Next

Enters a long position if any time during the next bar the market goes higher than the specified price. This function is generally used by an Entry Block to initiate a position.

 

Syntax

 

EnterLongOnStop( stopPrice [, protectStopPrice] )

 

Parameters

stopPrice

 

the price which the market must be higher in order to trigger this order

protectStopPrice

 

the protect stop price to be used in case the market goes against the position (optional)

 

Example

' Enter the market if above the entry price.

broker.EnterLongOnStop( entryPrice, protectStopPrice )

 

or

 

' Enter the market if above the entry price with no stop

broker.EnterLongOnStop( entryPrice )