OPEN-SOURCE SCRIPT
Stochastic + Mini Divergence

BULLISH MINI DIVERGENCE (Long Signal)
What price does:
Makes a lower low, or a double bottom (second low equal to or lower than the first)
What %K does:
First trough: %K hooks down, reaches 20 or below at some point
%K then hooks back up
%K then hooks back down again for the second trough
The second trough of %K is higher than the first trough
Price went lower or equal, %K went higher
What %D must do:
Must stay below 45 the entire time between the two lows
Must NOT recover into the 45-55 zone
If %D crosses back above 45 — pattern invalidated
BEARISH MINI DIVERGENCE (Short Signal)
What price does:
Makes a higher high, or a double top (second high equal to or higher than the first)
What %K does:
First peak: %K hooks up, reaches 80 or above at some point
%K then hooks back down
%K then hooks back up again for the second peak
The second peak of %K is lower than the first peak
Price went higher or equal, %K went lower
What %D must do:
Must stay above 55 the entire time between the two highs
Must NOT pull back into the 45-55 zone
If %D crosses back below 55 — pattern invalidated
What price does:
Makes a lower low, or a double bottom (second low equal to or lower than the first)
What %K does:
First trough: %K hooks down, reaches 20 or below at some point
%K then hooks back up
%K then hooks back down again for the second trough
The second trough of %K is higher than the first trough
Price went lower or equal, %K went higher
What %D must do:
Must stay below 45 the entire time between the two lows
Must NOT recover into the 45-55 zone
If %D crosses back above 45 — pattern invalidated
BEARISH MINI DIVERGENCE (Short Signal)
What price does:
Makes a higher high, or a double top (second high equal to or higher than the first)
What %K does:
First peak: %K hooks up, reaches 80 or above at some point
%K then hooks back down
%K then hooks back up again for the second peak
The second peak of %K is lower than the first peak
Price went higher or equal, %K went lower
What %D must do:
Must stay above 55 the entire time between the two highs
Must NOT pull back into the 45-55 zone
If %D crosses back below 55 — pattern invalidated
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.