Home    |    Trading Alchemy Manual    |    Alchemy Functions Index

AlchemyTrendDirectionOOEL (Function)

AlchemyTrendDirectionOOEL is a multiple-output function that returns the trailing stop value of the TrendDirection stop of the Alchemy TrendCatcher (Alchemy TrendCatcherComplete) indicator.

double AlchemyTrendDirectionOOEL double Length, double Factor, double AverageType, double RangeType, double TrendType, double DetectStrategyPosition, string SymbolNme, integer NumberBarsBack, string FirstDate, string LastDate, integer Interval, double IntervalBarType, double Trend, double PosHi, double oOpen, double oHigh, double oLow, double oClose)

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.

SymbolNme

string

Specifies the symbol to use for the TrendDirection calculation.  This is a string input which needs to stay within quotation marks.  To use the symbol of the chart that the study is applied on, the reserved word getsymbolname can be used.

NumberBarsBack numeric Specifies the historical number of bars to load from the current date and time for calculating the TrendDirection of a separate data series.  If NumberBarsBack is not set to load in enough bars for calculating all the way back to the beginning of the chart, the TrendDirection calculations won't start until later on the chart.  Therefore, it is better to load in more bars then not enough.  However, as this number increases, it will substantially slow down the load in time of this study. If the last bar of the chart is not the current date, to save unnecessary processing power, we recommend using the FirstDate and LastDate inputs for specifying the dates to load the historical bars for calculating the TrendDirection of the separate data series. With a setting of 0, FirstDate and  LastDate left blank, TrendDirection is calculated on the same time symbol as applied.  If you receive an error message Not enough Data, you need to either reduce the value of this input and/or increase the date range of your symbol setting.
FirstDate string Specifies the earliest date for loading the historical bars to calculate the TrendDirection of the separate data series.  In order to use this method of loading the historical bars to calculate the TrendDirection of the separate data series, the input NumberBarsBack has to be set to 0.  As explained above, if the last bar of the chart is not the current date, to save unnecessary processing power, we recommend using the FirstDate and LastDate inputs for specifying the dates to load the historical bars for calculating the TrendDirection of the separate data series.  This is a string input and when used, the precise format has to be "month/day/year".  For example a date of February 1st, 2012 would be entered as "2/1/2012".  When not used, this input should be left blank with 2 quotation marks as follows "".  If the format of this input is not correct, the indicator will generate an invalid date time format error message. With NumberBarsBack set to 0, FirstDate and  LastDate left blank, TrendDirection is calculated on the same time symbol as applied.
LastDate string Specifies the latest date for loading the historical bars to calculate the TrendDirection of the separate data series.  In order to use this method of loading the historical bars to calculate the TrendDirection of the separate data series, the input NumberBarsBack has to be set to 0.  As explained above, if the last bar of the chart is not the current date, to save unnecessary processing power, we recommend using the FirstDate and LastDate inputs for specifying the dates to load the historical bars for calculating the TrendDirection of the separate data series.  This is a string input and when used, the precise format has to be "month/day/year".  For example a date of February 1st, 2012 would be entered as "2/1/2012".  When not used, this input should be left blank with 2 quotation marks as follows "".  If the format of this input is not correct, the indicator will generate an invalid date time format error message. With NumberBarsBack set to 0, FirstDate and  LastDate left blank, TrendDirection is calculated on the same time symbol as applied.
Interval numeric Specifies the interval setting for a Tick, Volume or Intra-Day interval of the separate data series TrendDirection.  With IntervalBarType set to either a daily, weekly or monthly interval, the Interval does not have an affect.  With a setting of 0, TrendDirection is calculated on the same time symbol as applied.
IntervalBarType numeric Specifies the interval of the separate data series TrendDirection.  A setting of -1 uses a Volume chart.  A setting of 0 uses a Tick chart.  A setting of 1 uses an Intra-Day Minute chart.  A setting of 2 uses a Daily chart.  A setting of 3 uses a Weekly chart.  A setting of 4 uses a Monthly chart.  To use the bar type of the chart that the study is applied on, the reserved word bartype can be used. With a setting of -2, TrendDirection is calculated on the same time symbol as applied.
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.
oOpen numericref This is an output variable that returns the open price of the separate data series that the TrendDirection is based on, if applicable
oHigh numericref This is an output variable that returns the high price of the separate data series that the TrendDirection is based on, if applicable
oLow numericref This is an output variable that returns the low price of the separate data series that the TrendDirection is based on, if applicable
oClose numericref This is an output variable that returns the close price of the separate data series that the TrendDirection is based on, if applicable

 

Home    |    Trading Alchemy Manual    |    Alchemy Functions Index