For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Fast Stochastic with low period
-
Hey,
I want to use the fast stochastic's K value and check when that one crosses under 10 from a strategy in a book. I'm doing this:
self.inds[d]['faststoch'] = bt.indicators.Stochastic(d, period= 2)
and I'm geting this:
ZeroDivisionError: float division by zero
the definition of the fast stochastic is I beleive:
%K = (C – L) / (H – L) * 100 %D = 3 days smoothing
I would like only to use the %K value. Is this possible?
-
Explanation here:
https://community.backtrader.com/topic/98/float-division-by-zero/5