Creating an Automated Crypto Trading Bot

evo

Site Admin
Joined
Apr 2017
Creating an Automated Crypto Trading Bot
This is my ongoing research journey to create a successful automated cryptocurrency trading bot...

Over the last two days, I've been working on building an automated crypto trading bot. And often times, my mind feels ready to explode!

A few weeks ago, I started working within Trading View to track different cryptocurrencies, looking for good entry points to buy and sell. From there, I started watching YouTube tutorial videos about charting and technical analysis, in an effort to make smarter decisions. And I started to see some traction, and my first achievement was looking at a chart and being able to make fairly accurate predictions.

From there, I started researching public and paid scripts that can add further analysis into charts. When looking at different script results, combined with signal indicators, I was able to analyze further into better buying and selling opportunities.

I quickly realized the biggest challenge was the time requirement to find a good trade, and more importantly, to stay in a good trade. I was constantly glued to my computer, waiting for a solid entry point in my buy zone. Trading View allows you to setup signal indicators, and I eventually set this up to notify me with an alarm, forcing me to stop whatever I was doing to immediately get in or out of a trade. This was not sustainable.

And then I realized Trading View allows alert signals to be sent externally, which brought the idea of taking these signals and creating an automatic trading bot. The premise is straightforward:
  1. Chart Analysis — Send notification signal to buy/sell
  2. Automated Bot — Interpret incoming signals to execute a buy/sell on an exchange
  3. Connected Exchange — Allow incoming automated signals for buy/sell orders
Using this setup, I was able to deploy my first trading bot. I started with small order amounts, for testing purposes. I want to see a certain percentage of success before increasing order sizes.

More details to come...
 

evo

Site Admin
Joined
Apr 2017
Connecting to Exchange Account
After getting everything setup, I created my first bot, backtested the signals, and everything appeared good to go. I underestimated how easy you can send signals into Binance, and any trading exchange for that matter. Every trading account on an exchange has an API key, allowing external read only access of your exchange account. During the API key creation process is where you choose how much control and access should be granted, and it's easy to change these permissions at any time. For obvious security reasons, I disabled withdrawals, and only allowed the ability to a)read the account, and b)send buy/sell orders.

From within my exchange account, I put $1,000 into USDT for my bot to trade new orders out of USDT and into the coin(s) of my choice. This allows me to trade against any coin paired with USDT.

Trading View Subscription
For chart analysis, I'm using Trading View to create alerts. Unfortunately, their free account only allows one server-side alert, and a minimum of two alerts is required (one buy signal and one sell signal). The cheapest paid plan is the Pro, allowing up to 10 alerts. I took advantage of the 30-day free trial and went with the Premium plan, allowing up to 400 alerts. After my one month trial ends, I'll decide the best paid plan for my needs.

First Wave of Automated Bots
Everything was setup. I confirmed my signals from within Trading View were interfacing correctly into my Binance account. I deployed a total of 10 bots, comprised of 5 buy signals and 5 sell signals spread across 5 coins. My goal is to try different scenarios for the best configuration. I don't have the technical expertise to create an automatic trading bot connect with a decentralized exchange, but there's more than enough liquidity and volume on Binance for my needs. At first, I all buy signals were market orders, and then I expanded to limit orders also. All sell signals are considered panic sells and are sent as market orders.

I'm continuing to experiment with the timing of sending the trading signal. Generally speaking, I'm finding it's best to only send signals when a candle closes, and avoid any signals that may occur during the candle's timeframe. The downside is, depending on your timeframe, you may lose profits because the sell signal is sent after the candle has printed.

Additional notes:
  • All buy orders are preconfigured to use the same amount, to make sure I always have enough guaranteed liquidity in my wallet. I can set this to a predetermined value or percentage.
  • When the buy order is created, the bot automatically creates a sell order for 2x to immediately close an order when hitting this take profit threshold, without having to wait for a sell signal. After I get things dialed in more, I will experiment the best take profit percentage threshold to have.
  • An automatic stop loss can also be created when the buy order is created. Binance is one of a few exchanges that supports a trailing stop loss signal, and I need to experiment with this more. Admittedly, I've never used stop losses for long term investing, but I intend to start using stop losses during scalping or swing trading using these bots, especially as I increase order amounts.
I'm learning so much...
 

evo

Site Admin
Joined
Apr 2017
Trying to scalp coins has proven to be difficult...

Today, I setup some new bots to look at MFI and Volume, to determine when to send buy/sell signals.

Money Flow Index Bot
MFI is Money Flow Index. MFI is an oscillator showing money flow on a range from 0 to 100:
  • MFI below 20 is oversold, should send a Buy signal
  • MFI above 80 is overbought, should send a Sell signal
Using these judgements, I created two bots:
  1. MFI Indicator (crosses down) crosses below 20, send alert signal to Buy (typically oversold)
  2. MFI Indicator (crosses up) crosses above 80, send alert signal to Sell (take profit)
Stop-loss percentage set to 3% and stop-loss timeout enabled for 100 seconds.

Volume Profile Bot
Volume Profile charts trading activity over time. For this bot, I'm only focused on DVA (Developing Value Area), mixing volume and trading into fair value (auction market theory).

For Developing Value Area to work, there needs to be some experimentation with Row Size. As a point of reference:
  • Large Market Cap Coins - Set Row Size to 100
  • Medium Market Cap Coins - Set Row Size to 10
  • Small Market Cap Coins - Set Row Size to 1
Some coins don't have enough volume to chart. When Trading View gives this study error, increase the row size 10x and go from there. Because BTC has a ton of volume, I had to set Row Size to 1,000 to chart correctly.

Once you get the row size figured out, backtest the following guidelines:
  • Buy when price goes above the value indicator low.
  • Sell when price goes below the value indicator high.
When everything looks good, I set the following bot signals:
  1. Price (crossing up) goes above Developing VA Low, once per bar close, send alert signal to Buy
  2. Price (crossing down) goes below Developing VA High, once per bar close, send alert signal to Sell
And using the same stop-loss setting as the MFI Bot above.

Working on more bots and different timeframes for sending buy/sell signals...
 

evo

Site Admin
Joined
Apr 2017
I'm not worried about the FUD for the long term, but given all the short-term bullish sentiment that's out there, I've pulled my swing trading funds out of the moving market and into a stablecoin. I'm going to wait this out and see what happens. We need to get back to the previous low and retest support, before we know the direction of things.




I have setup some aggressive buy zones for some of my favorite coins, and am expecting those to hit since BTC is going down. And in anticipation of the Binance exchange going down for maintenance, I've also paused all of my bots. The last open bot order is a short on BTC, which is currently up in the trade since BTC is still going down.
 
Joined
Sep 2021
From
Philippines
Others are mining bitcoins and you’re still watching? It’s high time you tried it yourself, especially since there is the CryptoTab Browser - the world’s one and only Web browser allowing you to earn crypto with no investments, hidden costs, or scams. Seems like earning crypto has never been easier! Download it and see for yourself: https://cryptotabbrowser.com/20857741
 
Joined
Sep 2021
From
usa
♥♥Playing games can receive a lot of airdrops! !♥♥♥

内文

Everyone said that the simpler the game, the harder it is to play On DiDi, there are two super simple games, I find it difficult to challenge

But after the challenge is successful, you can get a lot of cryptocurrency, many people here pk
1.png2.png


Are you a bounty hunter for simple games? Welcome to join us, hurry up and win NO.1


3.png
Scan the QR code to register to join
 
Joined
Sep 2021
From
USA
Lead generation through business email leads can be the difference between success and failure. A business email leads provider can help you in every way that you would like it to be with https://belkins.io/help-center/lead...utbound-lead-generation-services-for-b2b-saas. They help companies with all potential methods and techniques by generating leads, employing all available technologies and methods to the fullest. For any business-to-business e-marketing initiative to be successful, it has to utilize all of the available tools and techniques to its maximum. If you need a whole new chance to climb up the corporate ladder and purchase targeted email leads online, constant improvements and always improving professionals are a requirement!
 
Top