Bitcoin Forum

Economy => Trading Discussion => Topic started by: fbunaren on June 01, 2018, 03:32:07 PM



Title: Highest High equals Lowest Low while Calculating Stochastic
Post by: fbunaren on June 01, 2018, 03:32:07 PM
Hello,

Currently, I am trying to calculate Stochastic and i use this formula to calculate Stochastic

Quote
%K = (Current Close - Lowest Low)/(Highest High - Lowest Low) * 100
%D = 3-day SMA of %K
(Source : http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:stochastic_oscillator_fast_slow_and_full)

I found some cases where the Lowest Low is equal to Highest High, which cause Math Error (0 Divisor).
Is there any solution for this problem? Is there any additional calculation that should be done to solve this problem?

Thank You for your attention :)