TulipCharts / tulipindicators

Technical Analysis Indicator Function Library in C
https://tulipindicators.org/
GNU Lesser General Public License v3.0
849 stars 157 forks source link

ATR index error #106

Closed selimozbas closed 3 years ago

selimozbas commented 3 years ago

Hi,

when I try to get atr with this command

data = client.get_klines(symbol=pair, interval=period)

    high = [float(entry[2]) for entry in data]
    low = [float(entry[3]) for entry in data]
    close = [float(entry[4]) for entry in data]

    close_array = np.asarray(close)
    high_array = np.asarray(high)
    low_array = np.asarray(low)

for i in range(0, len(close_array)): atrc = get_atr[i]

I receive following error IndexError: index 408 is out of bounds for axis 0 with size 408

codeplea commented 3 years ago

This is the C code repo.

meysamiran commented 3 years ago

for i in range(0, len(close_array)-1):

On Thu, Mar 4, 2021 at 5:55 PM Lewis Van Winkle notifications@github.com wrote:

Closed #106 https://github.com/TulipCharts/tulipindicators/issues/106.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TulipCharts/tulipindicators/issues/106#event-4408351023, or unsubscribe https://github.com/notifications/unsubscribe-auth/APDW4ZMJQENSEREGUQQNZKLTB6J67ANCNFSM4YTKXA3Q .