Closed thistleknot closed 1 year ago
Minimal example produces this error. Python 3.10.x
import trendln
import yfinance as yf # requires yfinance - pip install yfinance tick = yf.Ticker('^GSPC') # S&P500 hist = tick.history(period="max", rounding=True) h = hist[-1000:].Close mins, maxs = trendln.calc_support_resistance(h) minimaIdxs, pmin, mintrend, minwindows = trendln.calc_support_resistance((hist[-1000:].Low, None)) #support only mins, maxs = trendln.calc_support_resistance((hist[-1000:].Low, hist[-1000:].High)) (minimaIdxs, pmin, mintrend, minwindows), (maximaIdxs, pmax, maxtrend, maxwindows) = mins, maxs
I see this can be rectified within findiff's coef.py by modifying the if check for acc if ((acc % 2 == 1 or acc <= 0) and acc !=1):
Minimal example produces this error. Python 3.10.x
import trendln
this will serve as an example for security or index closing prices, or low and high prices
import yfinance as yf # requires yfinance - pip install yfinance tick = yf.Ticker('^GSPC') # S&P500 hist = tick.history(period="max", rounding=True) h = hist[-1000:].Close mins, maxs = trendln.calc_support_resistance(h) minimaIdxs, pmin, mintrend, minwindows = trendln.calc_support_resistance((hist[-1000:].Low, None)) #support only mins, maxs = trendln.calc_support_resistance((hist[-1000:].Low, hist[-1000:].High)) (minimaIdxs, pmin, mintrend, minwindows), (maximaIdxs, pmax, maxtrend, maxwindows) = mins, maxs