ilyakrotov / bitmex-simple-trading-robot Goto Github PK
View Code? Open in Web Editor NEWSimple BitMEX trading robot.
License: MIT License
Simple BitMEX trading robot.
License: MIT License
tanzeel@tanzeel-HP-Compaq-dx7500-SFF:~/BitMEX-simple-trading-robot$ python3 main_loop.py
Traceback (most recent call last):
File "main_loop.py", line 19, in <module>
if round(time.time()) % time_to_wait_new_trade[TIMEFRAME] == 0:
KeyError: '10d'
tanzeel@tanzeel-HP-Compaq-dx7500-SFF:~/BitMEX-simple-trading-robot$
what command do you have to type to run this?
how do you stop the bot as well?
tanzeel@tanzeel-HP-Compaq-dx7500-SFF:~/BitMEX-simple-trading-robot$ python3 main_loop.py
Traceback (most recent call last):
File "main_loop.py", line 7, in <module>
from trader import Trader
File "/home/tanzeel/BitMEX-simple-trading-robot/trader.py", line 12
print(f"Last prediction: {prediction}")
^
SyntaxError: invalid syntax
tanzeel@tanzeel-HP-Compaq-dx7500-SFF:~/BitMEX-simple-trading-robot$
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
Any idea how to get around this? Running main_loop.py on MacOS with Python 3.6
tanzeel@tanzeel-HP-Compaq-dx7500-SFF:~/BitMEX-simple-trading-robot$ python3 main_loop.py
Last prediction: {prediction} 0
Last prediction: {prediction} 0
Last prediction: {prediction} -1
/home/tanzeel/.local/lib/python3.5/site-packages/bravado_core/spec.py:271: Warning: guid format is not registered with bravado-core!
category=Warning,
Last prediction: {prediction} 0
Last prediction: {prediction} 0
Last prediction: {prediction} 0
Last prediction: {prediction} 0
Last prediction: {prediction} 0
Last prediction: {prediction} 0
Last prediction: {prediction} 0
What am i doing wrong ?
my configuration.py is :
TEST_EXCHANGE=True
API_KEY="XXXXXXXXXXXXXXXXXX"
API_SECRET="XXXXXXXXXXXXXXXXXXXXXX"
AMOUNT_MONEY_TO_TRADE=200 #$
LEVERAGE=25
TIMEFRAME = '1m'
time_to_wait_new_trade = {'1m': 60,
'5m': 60*5,
'1h': 60*60,
'1d': 60*60*24}
Hello, thank you for developing this. I am trying to run the notebook file but when ever I run it I get:
NameError Traceback (most recent call last)
in ()
----> 1 client = bitmex.bitmex(
2 test=True,
3 api_key="",
4 api_secret=""
5 )
NameError: name 'bitmex' is not defined
I am new to python and I got no idea of how to fix this any help?
tanzeel@tanzeel-HP-Compaq-dx7500-SFF:~/BitMEX-simple-trading-robot$ python main_loop.py
Traceback (most recent call last):
File "main_loop.py", line 1, in
import bitmex
ImportError: No module named bitmex
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"
thx for the code! (especially for the insight to divide timestamp by waitingtime :))
I noticed that the output of ohlcv_candles needs to be flipped (ohlcv_candles.iloc[::-1]) to get the last values with [-1] and [-2]
regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.