Closed ghost closed 6 years ago
You have to install the following libs:
And finally, your python must be at least 3.6 version for using f-strings (ex: f"Last prediction: {prediction}")
Then you can successfully run the code.
I have still got a problem with talib. I have ran a command - pip install TA-lib but it still says that it is not there.
Command "c:\users\administrator\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\ADMINI~1\AppData\Local\Temp\3\pip-install-_8hutpuv\TA-Lib\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\ADMINI~1\AppData\Local\Temp\3\pip-record-z8hc4ocx\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ADMINI~1\AppData\Local\Temp\3\pip-install-_8hutpuv\TA-Lib\
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\administrator\appdata\local\programs\python\python37-32\lib\site-packages\numpy\core\include -Ic:\ta-lib\c\include -Ic:\users\administrator\appdata\local\programs\python\python37-32\include -Ic:\users\administrator\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tctalib/_ta_lib.c /Fobuild\temp.win32-3.7\Release\talib/_ta_lib.obj _ta_lib.c talib/_ta_lib.c(524): fatal error C1083: Cannot open include file: 'ta_libc.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\cl.exe' failed with exit status 2
I am very frustrated, what should I do to make the bot work?
I think but may be wrong on windows you have to do something to get TA-lib to work if you can? Google Search should find something.
On Sun 29. Jul 2018 at 21:38, 1221328 notifications@github.com wrote:
I am very frustrated, what should I do to make the bot work?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/IlyaKrotov/BitMEX-simple-trading-robot/issues/1#issuecomment-408700546, or mute the thread https://github.com/notifications/unsubscribe-auth/AjWb4TpJjdpd5HNv41FJ13tWXkwa4WeWks5uLg8vgaJpZM4VlPLU .
I wrote this code on Mac OS X. Seems that your problem mostly about ta-lib. So try to google how to install it correctly on Windows. It may help https://stackoverflow.com/questions/45337509/failing-on-install-talib-in-windows-7
got some problems initially, but after installations of pandas, ta-lib, numpy all works fine
Are you using conda for this? Because I am getting this error: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 return f(*args, **kwds)
I fixed it.
I wrote the code in Jupyter notebook without using conda, just pip.
Got it working thanks a lot.
On Sat 18. Aug 2018 at 23:29, Ilya Krotov notifications@github.com wrote:
I wrote the code in Jupyter notebook without using conda, just pip.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IlyaKrotov/BitMEX-simple-trading-robot/issues/1#issuecomment-414087402, or mute the thread https://github.com/notifications/unsubscribe-auth/AjWb4cS6tO_fs6I7cUNtsQ_kaoKQC2iDks5uSIdMgaJpZM4VlPLU .
Strategy.py Traceback (most recent call last): File "C:\Users\PB\Desktop\BitMEX-simple-trading-robot-master\strategy.py", line 1, in
import talib
ImportError: No module named talib
Current directory: C:\Users\PB
Command to be executed: "C:\WINDOWS\system32\cmd.exe" /C "C:\Users\PB\Desktop\BitMEX-simple-trading-robot-master\strategy.py"
Trader.py File "C:\Users\PB\Desktop\BitMEX-simple-trading-robot-master\trader.py", line 12 print(f"Last prediction: {prediction}") ^ SyntaxError: invalid syntax
Current directory: C:\Users\PB
Command to be executed: "C:\WINDOWS\system32\cmd.exe" /C "C:\Users\PB\Desktop\BitMEX-simple-trading-robot-master\trader.py"
Main_loop.py Traceback (most recent call last): File "C:\Users\PB\Desktop\BitMEX-simple-trading-robot-master\main_loop.py", line 1, in
import bitmex
ImportError: No module named bitmex
Current directory: C:\Users\PB
Command to be executed: "C:\WINDOWS\system32\cmd.exe" /C "C:\Users\PB\Desktop\BitMEX-simple-trading-robot-master\main_loop.py"