Issue With ADX Indicator, ta Library

hi guys. i’ve been experiencing a seemingly minor issue, which has been frustrating me to no end, i say “seemingly minor” because i am able to run the code in other Python IDEs, however this has not been the case with Datalore.

here is the code which creates the error (the last line, exclusively):

Blockquote
import datetime as datetime
import pandas as pd
import oandapyV20
import oandapyV20.endpoints.instruments as instruments
from oandapyV20.types import DateTime
granularity = [“M15”]; N = 132; end_date = datetime.datetime.utcnow(); params = {“granularity”: granularity, “to”: DateTime(end_date).value, “count”: N+1}
r = instruments.InstrumentsCandles(instrument= instrument, params= params); rv = client.request(r); OHLCV_RNames =
for i in range(0, N):
OHLCV_RNames.append(rv[“candles”][i][“time”][:10] + " " + rv[“candles”][i][“time”][11:19])
OHLCV = pd.DataFrame(np.full([N, 5], float), index= pd.to_datetime(OHLCV_RNames), columns= [“Open”, “High”, “Low”, “Close”, “Volume”])
for i in range(0, N):
if rv[“candles”][i][“complete”]==True:
OHLCV[“Open”][i] = float(rv[“candles”][i][“mid”][“o”]); OHLCV[“High”][i] = float(rv[“candles”][i][“mid”][“h”])
OHLCV[“Low”][i] = float(rv[“candles”][i][“mid”][“l”]); OHLCV[“Close”][i] = float(rv[“candles”][i][“mid”][“c”]); OHLCV[“Volume”][i] = rv[“candles”][i][“volume”]
w0 = 5
ADX = ta.trend.ADXIndicator(high= OHLCV[“High”], low= OHLCV[“Low”], close= OHLCV[“Close”], window= LWin+w0+1).adx()

the error message(s) produced:

Traceback (most recent call last):

  • at D5NUJK8tpqT4ggG3D8vfzAline 18*
  • at /opt/python/envs/default/lib/python3.8/site-packages/ta/trend.pyline 717, in __ init __(self, high, low, close, window, fillna)*
  • at /opt/python/envs/default/lib/python3.8/site-packages/ta/trend.pyline 724, in _run(self)*
  • at /opt/python/envs/default/lib/python3.8/site-packages/ta/utils.pyline 76, in _get_min_max(series1, series2, function)*
  • at /var/datalore/manager/.pip/numpy/core/overrides.pyline 0, in amax(*args, *kwargs)
  • at /var/datalore/manager/.pip/numpy/core/fromnumeric.pyline 2793, in amax(a, axis, out, keepdims, initial, where)*
  • at /var/datalore/manager/.pip/numpy/core/fromnumeric.pyline 86, in _wrapreduction(obj, ufunc, method, axis, dtype, out, *kwargs)
    TypeError: ‘>=’ not supported between instances of ‘float’ and ‘NoneType’

any assistance would be greatly appreciated.