Skip to content

TechnicallyWeb3/TradingBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# TradingBot
My first trading bot. This is my code for my trading bot. I am a hobbyist and though I am spending some time on this project I have many others I also spend my time on. This project should be used at your own risk. I will not be responsible for any losses you suffer as a result of putting real money into these untested, unverified strategies and bots, which may be subject to failure and crashing. This is a knowledge building project and should be used for coding education purposes only! 

Currently the bot gets historical data for an asset, processes the data by adding the required technical indicators and then applies a strategy to the data and defines positions based on the indicators and applied strategy. A buy position will be indicated by a value of 1 in the 'Position' column dataframe and a sell position will be a -1. Another column used is 'Holding' which returns true if the last (or current) position is 1 and false if it was -1. Depending on the strategy you may want your bot to take corrective action by buying if you should be holding and other times you may want to only buy or sell on the position only.

I have loads of work to do on the bot. I want to make position any value, not just 1 or -1, but rather want the bot to decide how much of an asset to buy based on the budget the bot is given. You could chose to make the bot only trade with 10% of the overall balance or use a budget amount. I hope to make the code more modular so a user has to choose which platforms they want the bot to trade on and in which quantities. To do this I plan to make classes for each exchange with properties including assets to trade, trading budget and any functions to pull data and make trades.

I also need to process all data uniformly so that I can apply these strategies no matter which source they came from. I would like to make it simple to change the strategies I add to this bot. For the time being that would be changing hardcoded values in the python script. Ideally in the future this could be a complete build that someone could add to their Raspberry Pi and access on their network to change the settings of their bot on a webpage. 

I imagine an add button to add a trading bot, you would select your platform and follow instructions to connect your account. You would have a list of strategies with on and off toggles and parameters to set the strategy variables so that anyone can use a bot. I would program in common strategies as well as my own, hopefully other guys add their own into the project also so people could add strategies like trading view. 

I am currently able to connect to Alpha Insider to perform paper trades. This is allowing me to track the success of my own strategy. I have been collecting data from Yahoo Finance however I noticed the data was not a good source for performing trades on the 1m as Yahoo data on the 1m was flat (no difference between OHLC values) and delayed by upto 4 minutes. I have since started coding in ByBit's API to allow the bot better access to data and the ability to trade on my behalf using real funds.

I have planned on adding 3 of my own strategies, they are trend based and I plan to add common strategies as well. I will provide you with updates as I work on this however this is not my main job, and I cannot spend too much time on this. One of my other projects includes AI and so a trading strategy may be added into this bot also down the road.

About

My first trading bot.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages