This is a fun project and I hope this tutorial will be helpful for those interested in experimenting with a cryptocurrency trading bot.

What is Trading Bot ?

Crypto trading bots consist of automated software that, at the right moment, buys and sells cryptocurrencies. Their only aim is to produce as much profit as possible for their users. The way they do this is by constantly tracking the market and adapting to a collection of predetermined laws. As per your tastes and preferences, you can decide how the bot will analyze different market behavior, such as number, orders, price, and time.

What is Gekko?

Gekko is an open source software for automating trading techniques through bitcoin markets. Gekko is going to take care of: Aggregation of live market data, Calculation of indicators, Execution of live orders (trade bot), Simulating the execution of the order (paper trader), Calculation of benefit and risk metrics, Graphing the performance of the web interface, Managing and importing historic industry info, Simulation of live stocks using historical data (back-testing).


Installation

Step 1: Installing Nodejs

Gekko runs on nodejs so we have to install that first. Go to the nodejs homepage and install the LTS version of nodejs.
Go to this link => Nodejs

Step 2: Installing Git

As part of the Gekko installation process, git is used. Go to the git homepage. Go to this link => Git and install as per your operating system (Linux, windows, mac).

Step 3: Installing Gekko

The preferred way to download Gekko is by using git. This makes it a lot easier to keep Gekko up to date. The new stable version of Gekko will be downloaded. To download the latest version; the final -b stable component will be omitted to update the current latest update (which may not be as secure).

In the terminal ; Run the code written below =>

git clone git://github.com/askmike/gekko.git -b stable
cd gekko

Step 4: Installing Gekko's dependencies

You need to instal the dependencies once you've downloaded Gekko, open your terminal and navigate to the gekko folder.

In the terminal ; Run the code written below =>

cd exchange
npm install --only=production
cd ..

Step 5: Starting Gekko

Now it's time to start it.

In the terminal ; Run the code written below =>

node gekko --ui


Procedure

Step 1: Backtesting

Backtest is a simulation where you simulate running a plan for a long time (such as the past 30 days) in a matter of seconds. Backtesting requires that business data is currently available locally. After a backtest, Gekko will have data on the demand and the success of the plan. Only because a technique has done well in the past does not mean that it will perform well in the future. Be vigilant of overfitting, in other words: don't just tweak the plan before you get a high profit and say it's going to be as lucrative while you work. The backtest simulation is small, this is not really an issue on larger markets (such as BTC / USD), but the variations between backtests and live traders on very low-volume markets can be high.

Step 2: Simulation

Simulation of trades is achieved by a module called a paper trader. This module would use business candles along with charge, slip and spreadsheet numbers to approximate the cost of trade executions. Though default settings work well for most large markets (USD / BTC or BTC / ETH), they become much less reliable in smaller markets with low turnover and liquidity. In live trading, the notion of "speed" is more complicated than a simple number. Both spread and slippage can influence your selling prices: these figures identify the ideal trades in comparison to what people are actually buying on the market (this is called the orderbook). You can see a lot of price swings going up and down. There are not necessarily price swings, but rather trades that happen on both sides of the orderbook (the bid is made and the offer is taken). How far up and down is the distribution (between the demands and the bids). In these situations, the simulation figures would not be very reliable (unless you have set a higher slippage for the spread account). Unfortunately, this is a drawback of Gekko's backtesting model.

Step 3: Importing

You would need to provide historical business evidence to assess for your tactics. The best way to access this information is to import it using the Gekko UI directly from the exchange. You can initiate an import by heading to the "Local page" tab and scrolling to the bottom and pressing "Go to the importer."

Step 4: Paper Trading

Gekko will automatically execute a plan through live markets and simulate what will happen in real-time if the signals are traded. This is a perfect way to test out ideas without throwing the cash on the table. You can start a trade by clicking on the "Start a new Gekko live" tab. Keep in mind that a paper trader is a test, the precision depends on the market where you want to run it (for large markets like USD / BTC you can get pretty detailed results).

Step 5: Preparation

Gekko would need to have API keys on your exchange account that have permissions to access balances and orders and to generate new orders. Bear in mind that: Gekko does not require removal permission, since your authentication does not generate the API keys that can be disabled. Make sure you just use Gekko's API key, and for nothing else. If in trouble, generate a new key (and delete the stale keys). If possible, attempt to limit the API key to the IP address you will be running Gekko from (this makes the most sense in server environments).

Step 6: Execution

Launch your gekko by either the UI or the command line interface!

Similar read:

________________________________________________________

Disclaimer: The information contained on this web page is for education purpose only. Readers are suggested to conduct their own research, review, analyze and verify the content before relying on them.

To publish press releases, project updates and guest posts with us, please email at contact@etherworld.co.

Subscribe to EtherWorld YouTube channel for easy digestable content.

Support us at Gitcoin

You've something to share with the blockchain community, join us on Discord!

Follow us at Twitter, Facebook, LinkedIn, and Instagram.