Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
ignore divide by zero error in FISH indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
peerchemist committed Apr 9, 2020
1 parent 30b491e commit 36fc4de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion finta/finta.py
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,8 @@ def FISH(cls, ohlc: DataFrame, period: int = 10, adjust: bool = True) -> Series:
A signal line which is a previous value of itself is also calculated.
"""

from numpy import log
from numpy import log, seterr
seterr(divide='ignore')

med = (ohlc["high"] + ohlc["low"]) / 2
ndaylow = med.rolling(window=period).min()
Expand Down

0 comments on commit 36fc4de

Please sign in to comment.