which means we cannot do that?
Latest posts made by zmwang
-
RE: Is it possible to plot two data with different kinds of style?
-
Is it possible to plot two data with different kinds of style?
Here I have only the tick data of one stock. And I want to use the resample in backtrader as an indicator to see where to create an order on tick data. I accomplished it. But when I want to plot the figure, I want the tick data to be 'line' style and resampled data 'bar' or 'candlestick' style. Can it be done in backtrader?
-
RE: AttributeError: module 'backtrader.talib' has no attribute 'SMA'
Thank you for point out the problem.
-
RE: AttributeError: module 'backtrader.talib' has no attribute 'SMA'
when I write a script which is named test.py
import backtrader as bt
print('SMA:', bt.talib.MA_Type.SMA)
print('T3:', bt.talib.MA_Type.T3)and in command line, I use
python3 test.py
, it shows me the error.Traceback (most recent call last):
File "test.py", line 2, in <module>
print('SMA:', bt.talib.MA_Type.SMA)
AttributeError: module 'backtrader.talib' has no attribute 'MA_Type'and I use
locate ta-lib
to see whether TA-Lib is installed, it shows/usr/local/bin/ta-lib-config
/usr/local/include/ta-lib
/usr/local/include/ta-lib/ta_abstract.h
/usr/local/include/ta-lib/ta_common.h
/usr/local/include/ta-lib/ta_defs.h
/usr/local/include/ta-lib/ta_func.h
/usr/local/include/ta-lib/ta_libc.hso I think TA-Lib is installed on my ubuntu. And I use
sudo pip3 install TA-Lib
, it showsRequirement already satisfied: TA-Lib in /usr/local/lib/python3.6/dist-packages
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from TA-Lib)however, the example can not be executed correctly. Why?
-
RE: AttributeError: module 'backtrader.talib' has no attribute 'SMA'
I‘m using Ubuntu 18.04, and download the source files from sourceforge. Next I
cd
into the directory and follow the instructions below../configure
sudo make
sudo make installand then I use command
sudo pip3 install ta-lib
-
RE: AttributeError: module 'backtrader.talib' has no attribute 'SMA'
after installation of TA-Lib, I still have the problem.
-
AttributeError: module 'backtrader.talib' has no attribute 'SMA'
I'm trying to execute the examples on https://www.backtrader.com/blog/posts/2016-07-26-talib-integration/talib-integration.html, however I got this problem.
AttributeError Traceback (most recent call last)
<ipython-input-4-f67b7df8a734> in <module>()
1 import backtrader as bt
----> 2 print(bt.talib.SMA.__doc__)
AttributeError: module 'backtrader.talib' has no attribute 'SMA' -
RE: Is backtrader possible to backtest for HFT?
Thank you for reply! I notice that there have been some discussion on the "Escape from OHLC Land", and we can build our own class that store the data we want. But when building strategy using
buy
, the error'Lines_LineSeries_DataSeries_OHLC_OHLCDateTime_Abst' object has no attribute 'close'
shows up, and I notice that
buy(data=None, size=None, price=None, plimit=None, exectype=None, valid=None, tradeid=0, oco=None, trailamount=None, trailpercent=None, parent=None, transmit=True, **kwargs)
, but when I setbuy(price = self.data.BP1[0])
, where BP1 is the data I specified in my own data feed, it also gives me the same error. So how to deal with such problem? -
Is backtrader possible to backtest for HFT?
Newbie here, and fortunately found backtrader. My question is whether backtrader can be used directly in HFT or need to be edit to suit the HFT?