Home | Trading Alchemy Manual | Alchemy Functions IndexAlchemyDivergence (Function)AlchemyDivergence function searches for and finds divergence. It returns +1 for bullish divergence, -1 for bearish divergence, otherwise it returns 0. AlchemyDivergence (Occur, Bear Price, BullPrice, Osc, OVBOVS, OverB, OverS, Cycles, OverSCyc, OverBCyc, MinPos, MinNeg, Strength, Length, DivFact) Parameters
|
Occur |
Specifies which occurrence (that is, 1 = most recent, 2 = 2nd most recent, and so on. |
BearPrice |
Specifies which price of the asset of interest is to be used for bearish divergence |
BullPrice | Specifies which price of the asset of interest is to be used for bullish divergence |
Osc |
Specifies the indicator applied to the asset of interest |
OVBOVS | The AlchemyDivergence function looks for bearish divergence when the indicator is in overbought territory as determined by the OverB input and it looks for bullish divergence when the indicator is in oversold territory as determined by the OverS input. This input enables or disables these overbought/oversold zones restrictions. |
OverB | The AlchemyDivergence function looks for bearish divergence when the indicator is in overbought territory as determined by this input. |
OverS | The AlchemyDivergence function looks for bullish divergence when the indicator is in oversold territory as determined by this input. |
Cycles | When the AlchemyDivergence function finds bearish divergence in overbought territory, the function requires for the indicator to cycle back down into oversold territory as determined by the OverSCyc input, in order to qualify for the next bearish divergence in overbought territory. When the AlchemyDivergence function finds bullish divergence in oversold territory, the function requires for the indicator to cycle back up into overbought territory as determined by the OverBCyc input, in order to qualify for the next bullish divergence in oversold territory. This input enables or disables these overbought/oversold cycle restrictions. |
OverSCyc | When the AlchemyDivergence function finds bearish divergence in overbought territory, the function requires for the indicator to cycle back down to oversold territory as determined by this input, in order to qualify for the next bearish divergence in overbought territory. |
OverBCyc | When the AlchemyDivergence function finds bullish divergence in oversold territory, the function requires for the indicator to cycle back up into overbought territory as determined by this input, in order to qualify for the next bullish divergence in oversold territory. |
MinPos | Specifies minimum positive value in which to look for bearish divergence. A negative setting disables the positive value requirement |
MinNeg | Specifies minimum negative value in which to look for bullish divergence. A negative setting disables the negative 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. |
ReturnsAlchemyDivergence function searches for and finds divergence. It returns +1 for bullish divergence, -1 for bearish divergence, otherwise it returns 0. UsageThe AlchemyDivergence function checks for corresponding swing points between two values and evaluates if the most recent swing high values or the most recent swing low values are moving in opposite directions. |