Вставить индикатор из ТА в Plotly Subplot
Никак не могу правильно прописать в модуле .py индикатор из библиотеки ТА 0.5.25. В Subplot уже разместил пару графиков с данными из DataFrame (беру по API, не из файла), а дальше никак... В документации индикатор прописан так:
class ta.momentum.AwesomeOscillatorIndicator(high: pandas.core.series.Series, low: pandas.core.series.Series, s: int = 5, len: int = 34, fillna: bool = False)
ta.momentum.ao(high, low, s=5, len=34, fillna=False)
Вот часть кода, на которой я встал:
Import ta (так тоже пробовал - from ta.momentum import AwesomeOscillatorIndicator as ao)
def candlestick_chart(gc)
data = gc
high = data['high']
low = data['low']
data = fig.add_trace(go.Histogram(
ta.momentum.ao(high, low, s=5, len=34, fillna=False),
name ='ao'), row=4, col=1)
ValueError: The first argument to the plotly.graph_objs.Indicator
constructor must be a dict or
an instance of :class:plotly.graph_objs.Histogram