Coder Social home page Coder Social logo

Comments (4)

drhighliner avatar drhighliner commented on August 21, 2024 2

Take a look at the pull request section. Someone found a solution for this (thread) issue which works quite nicely.

from bta-lib.

vijay-r avatar vijay-r commented on August 21, 2024

Team, getting same error
any solution ?

from bta-lib.

karaolidis avatar karaolidis commented on August 21, 2024

I found a workaround which is less than ideal but will have to do until we get an update from the maintainers.

I created a separate script for the bta-lib calculations that had looked something like this...

import pandas as pd
import pickle
import btalib
import sys

symbol = sys.argv[1]

with open('./data/' + symbol + '/' + symbol + '_kline.p', 'rb') as handle:
    kline_df = pickle.load(handle)

sma = btalib.sma(kline_df).df

with open('./data/' + symbol + '/sma.p', 'wb') as handle:
    pickle.dump(sma, handle)

...and then, from the main script, from inside the thread, I run...

subprocess.Popen(['python', 'bta.py', 'BTCEUR']).wait()

with open('./data/' + symbol + '/sma.p', 'rb') as handle:
    sma = pickle.load(handle)

It's clunky but it will have to do for now.

from bta-lib.

Beauj34 avatar Beauj34 commented on August 21, 2024

Has anyone found a better explanation why BTA-Lib doesn't work within threading? Getting the same errors with different indicators

from bta-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.