kieran-mackle / AutoTrader

A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.

Home Page:https://kieran-mackle.github.io/AutoTrader/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: find_swings()

mikmolefe opened this issue · comments

Hi,
Running indiview with:

from datetime import datetime
from autotrader import AutoData, AutoPlot, indicators
from finta import TA

get_data = AutoData(data_source="yahoo")

instrument = 'EURUSD=X'
data = get_data.fetch(
instrument=instrument,
granularity='1h',
start_time=datetime(2021, 1, 1),
end_time=datetime(2021, 3, 1),
)

rsi = TA.RSI(data, 12)
rsi_divergence = indicators.autodetect_divergence(ohlc=data, indicator_data=rsi)

produces:

Traceback (most recent call last):
File "autotrader-demo-main/indiview.py", line 19, in
rsi_divergence = indicators.autodetect_divergence(ohlc=data, indicator_data=rsi)
File "/home/kgori/.local/lib/python3.8/site-packages/autotrader/indicators.py", line 730, in autodetect_divergence
indicator_swings = find_swings(indicator_data, data_type="other")
TypeError: find_swings() got an unexpected keyword argument 'data_type'