Home | Trading Alchemy Manual | Alchemy Functions IndexAlchemyTrendDirection (Function)AlchemyTrendDirection is a multiple-output function that returns the trailing stop value of the primary TrendDirection stop of the Alchemy TrendCatcher (Alchemy TrendCatcherComplete) indicator. double AlchemyTrendDirection ( double Length, double Factor, double AverageType, double RangeType, double TrendType, double DetectStrategyPosition, double Trend, double PosHi) Parameters |
Parameter Name | Parameter Type | Parameter Description |
Length |
numeric |
Specifies the number of trailing bars to include in the TrendDirection calculation. |
Factor |
numeric | Specifies the TrendDirection sensitivity factor. For a more long term trend calculation, this factor can be increased and for a more short term trend calculation, this factor can be decreased. |
AverageType |
numeric |
Specifies the smoothing factor of the TrendDirection calculations and the options are whole numbers from 1 through 6. |
RangeType | numeric | Specifies the range factor of the TrendDirection calculations and the options are whole numbers from 1 through 4. |
TrendType | numeric | Specifies the trend calculation method of the TrendDirection and the options are whole numbers from 1 through 4. |
DetectStrategyPosition |
numeric | With a setting of 1, the TrendDirection detects all strategy positions on the chart to stay in sync with these strategy positions. For example, when the TrendDirection displays bullish and a strategy enters a short position, the TrendDirection automatically reverses to bearish and starts its bearish calculation with this new short entry bar. A setting of 0 disables this feature. |
Trend | numericref | This is an output variable that returns -1 when the TrendDirection is bearish and 1when the TrendDirection is bullish. |
PosHi | numericref | This is an output variable that returns the highest high in bullish trend since the TrendDirection changed from bearish to bullish and it returns the lowest low in bearish trend since the TrendDirection changed from bullish to bearish. |
|