Comments (4)
Take a look at the pull request section. Someone found a solution for this (thread) issue which works quite nicely.
from bta-lib.
Team, getting same error
any solution ?
from bta-lib.
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.
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)
- AttributeError: module 'btalib' has no attribute 'sma' HOT 1
- dm and dx indicators seem broken HOT 1
- Memory Usage when calling e.g. btalib.rsi(df) in a loop HOT 5
- Not able to multiply scalar value with bta-lib object
- Indicator on indicator gives different values from bt.indicators HOT 2
- bta-lib compatibility issues with new Numpy releases.
- Is this library active? HOT 4
- bta-lib error : trying to use rsi indicator but gives ValueError: cannot set using a slice indexer with a different length than the value
- Add Donchian Channel indicator
- kama, ema indicators are giving errors HOT 2
- Documentation is down HOT 1
- helloalgotrading raise exception FileNotFoundError HOT 1
- SMMA is not thread proof
- The stochastic RSI only shows one value instead of 2
- Most indicators are working but mama.
- the macd indicator are giving errors HOT 3
- MAMA indicator ValueError HOT 2
- Fractals
- dynamic update
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bta-lib.