Home | Trading Alchemy Manual | Alchemy Functions IndexAlchemyVolatility (Function)The function AlchemyVolatility is a multiple-output function that provides the trailing stop value, trend direction and the highest high or lowest low of the Alchemy Automatic Volatility Stop indicator (Alchemy VolatStpAuto). AlchemyVolatility(Length,Factor,UseCloseTrail,UseCloseStop,Trend,PosHi) Parameters
|
Length |
Specifies the trailing bars to consider in the volatility calculation. |
Factor | Specifies the volatility multiplication factor. |
UseCloseTrail | Specifies whether the trailing stop is based on the close of the bar or on the high of the bar in an up trend and the low of the bar in a down trend, whereas a setting of true uses the close of the bar and a setting of false uses the high/low of the bar. |
UseCloseStop | Specifies whether the trailing stop needs to be taken out by the close of a bar or by the high of a bar in a down trend and by the low of a bar in an up trend in order to change trend. A setting of true uses the close of a bar and a setting of false uses the high/low of a bar. |
Trend | A numeric reference that receives 1 if the trend is up and -1 if the trend is down. |
PosHi |
A numeric reference that receives the highest high in an uptrend and the lowest low in a down trend. |
ReturnsThe AlchemyVolatility function returns the trailing stop value of the Alchemy Automatic Volatility Stop indicator (Alchemy VolatStpAuto). The value for the trend direction is passed by reference back to the variable Trend. The value for the highest high or lowest low is passed by reference back to the variable PosHi. Home | Trading Alchemy Manual | Alchemy Functions Index |