gdemos01 / crypto-trading-ai-bot-basic Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I liked the concept and wanted to extend the training dataset ... so I pulled the data for one more month and then moved the resulting file from the "raw_historic_data" to the datasets/BTC-USD folder.
Then changed the config.py to extend it by one more month, like this:
TRAINING_MONTHS = ["2018_06","2018_07","2018_08","2018_09","2018_10","2018_11","2018_12","2019_01",
"2019_02","2019_03","2019_04","2019_05","2019_06","2019_07","2019_08","2019_09",
"2019_10","2019_11","2019_12","2020_01","2020_02","2020_03","2020_04","2020_05",
"2020_06","2020_07","2020_08","2020_09","2020_10"]
TESTING_MONTHS = ["2020_11"]
..... but I'm getting the following "type mismatch" error:
Traceback (most recent call last):
File "c:\Development\crypto-trading-ai-bot-basic\Controller.py", line 68, in <module>
x_test, y_test, prices = dataset.createTrainTestSets(COIN_PAIR, data, training_window=TRAINING_WINDOW, labeling_window=LABELING_WINDOW)
File "c:\Development\crypto-trading-ai-bot-basic\Dataset.py", line 169, in createTrainTestSets
change_rate = (next_close_price/latest_close_price) - 1
TypeError: unsupported operand type(s) for /: 'str' and 'float'
I think you could add indicators' historical data to improve bot predictions such as MACD, RSI, EMAs, etc.
It would be very useful to have a requirements.txt
file listing required package versions. I am currently seeing a deadlock in package versions:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
cbpro 1.1.4 requires six==1.10.0, but you have six 1.16.0 which is incompatible.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.9.1 requires six>=1.12.0, but you have six 1.10.0 which is incompatible.
Why are the data arrays shuffled on this line?
crypto-trading-ai-bot-basic/Dataset.py
Line 185 in d96250f
This results in the buy and sell prices being random when running the bot. This means the results are completely random.
You will see what I am talking about when you change the following lines:
crypto-trading-ai-bot-basic/AutoTrader.py
Line 17 in d96250f
print(">> BUYING $",self.trade_amount," WORTH OF BITCOIN FOR", self.account.btc_price)
and
crypto-trading-ai-bot-basic/AutoTrader.py
Line 30 in d96250f
print(">> SELLING $",self.trade_amount," WORTH OF BITCOIN FOR", self.account.btc_price)
Please see the following Traceback:
> Trading Automatically for ['2020_10']
#################################################################################################
#################################################################################################
########################################## DAY 1 #########################################
Traceback (most recent call last):
File "Controller.py", line 75, in
auto_trader.runSimulation(x_test, prices)
File "/home/crypto-trading-ai-bot-basic/AutoTrader.py", line 54, in runSimulation
prediction = self.advisor.predict(np.array([samples[i]]))
File "/home/crypto-trading-ai-bot-basic/Model.py", line 73, in predict
prediction = np.array(tf.argmax(self.model.predict(sample),1))[0]
IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed
Any idea what could be wrong?
i am not sure how you come up with data set ? or how to collect it to apply to a different kinds of trade or more months.
I know your code is run base on historical data for stimulation only. How do we convert it to run real-time data to evaluate how good or bad it is?
= check every 30 sec or 60 sec
= do buy or sell on the virtual account
I see you have no LICENSE file for this project. The default is copyright.
I would suggest releasing the code under the AGPL-3.0-or-later license so that others are encouraged to contribute changes back to your project.
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.