Home    |    Trading Alchemy Manual    |    Alchemy Functions Index

AlchemyVolatileTrlSt (Function)

AlchemyVolatileTrlSt is a multiple-output function to be used with strategies.  It detects if the current position is either long or short and calculates a volatility trailing stop from the entry point forward.  The function returns the volatility trailing stop value for the current position.  The value for the position high in a long position and the position low in a short position is passed by reference back to the variable PosHi.

AlchemyVolatileTrlSt (StopPrice, VolatilePr, VolatileFact, PosHi)

Parameters

 

StopPrice

Specifies the price to which the volatility range is being added to or subtracted from.

VolatilePr

Specifies the average volatility range

VolatileFact

Specifies the volatility range multiplier

PosHi The value for the position high in a long position and the position low in a short position is passed by reference back to this variable.

 

Returns

AlchemyVolatileTrlSt returns the volatility trailing stop value for the current position.  The value for the position high in a long position and the position low in a short position is passed by reference back to the variable PosHi.

Home    |    Trading Alchemy Manual    |    Alchemy Functions Index