-
Technical Analysis using embedPy
Hello All,
I’m just starting out with embedPy and wondering if aoneone can help. I’m trying to use a module in python for some technical analysis.
I was trying to use this module
https://technical-analysis-library-in-python.readthedocs.io/en/latest/
I’ve just got some bar data something like
t:([]sym:30#`A;open:30?50f;high:30?50f;low:30?50f;close:30?50f;vol:30?10000)
I’m having some difficulty passing the dataframe back and forth and can’t seem to get it to work. Wondering if someone could help me through this first example on their website, making this work properly from q.
import pandas as pd from ta.utils import dropna from ta.volatility import BollingerBands # Load datas df = pd.read_csv('ta/tests/data/datas.csv', sep=',') # Clean NaN values df = dropna(df) # Initialize Bollinger Bands Indicator indicator_bb = BollingerBands(close=df["Close"], window=20, window_dev=2) # Add Bollinger Bands features df['bb_bbm'] = indicator_bb.bollinger_mavg() df['bb_bbh'] = indicator_bb.bollinger_hband() df['bb_bbl'] = indicator_bb.bollinger_lband() # Add Bollinger Band high indicator df['bb_bbhi'] = indicator_bb.bollinger_hband_indicator() # Add Bollinger Band low indicator df['bb_bbli'] = indicator_bb.bollinger_lband_indicator()
Many thanks!
Log in to reply.