Home    |    Trading Alchemy Manual    |    Alchemy Functions Index

AlchemyBearishDiverg (Function)

AlchemyBearishDiverg function searches for and finds occurrences of highs in prices (i.e., High, Close, etc.) not accompanied by highs in an oscillator (i.e., RSI, Percent R, SlowD). If the criteria of the Bearish Divergence function is met, a +1 will be returned; if it has not been met, a 0 will be returned.
The AlchemyBearishDiverg function calls the function SwingHighBar. The SwingHighBar function returns the bar number of the most recent occurrence of the pattern. It can also be set to return the second, third, fourth, etc., most recent occurrence of a Swing High.

The AlchemyBearishDiverg can be used to look for bearish divergence in overbought territory only as it is commonly used in conjunction with the Stochastics indicator.  The function can also look for complete overbought to oversold cycles requirements.

The AlchemyBearishDiverg can be used to look for bearish divergence in positive territory only as it is commonly used in conjunction with the MACD indicator.

AlchemyBearishDiverg (Occur, Price, Osc, OverB, OverSCyc, MinPos, Strength, Length, DivFact)

Parameters

 

Occur

Specifies which occurrence (that is, 1 = most recent, 2 = 2nd most recent, and so on.

Price

Specifies which price of the asset of interest is to be used

Osc

Specifies the indicator applied to the asset of interest

OverB Specifies the overbought value in which to look for bearish divergence.  A negative setting disables the overbought requirement
OverSCyc Specifies the minimum oversold value for the oscillator to reach to qualify for one full cycle from oversold to overbought territory.  A full cycle must be completed before a next bearish divergence.  A negative setting disables the overbought to oversold cycle requirement.
MinPos Specifies minimum positive value in which to look for bearish divergence.  A negative setting disables the positive value requirement
Strength Specifies the required number of bars on either side to determine a swing point.

Length

Specifies the number of trailing bars to consider

DivFact

Specifies the minimum amount by which the divergent oscillator needs to fail the oscillator pivot it is compared to.

 

Returns

AlchemyBearishDiverg returns 1 when bearish divergence is found, otherwise it returns 0.

Usage

The AlchemyBearishDiverg function checks for corresponding swing points between two values and evaluates if the most recent swing high values are moving in opposite directions.

Home    |    Trading Alchemy Manual    |    Alchemy Functions Index