Automated Trading Overview

Basic Concepts

A quick introduction to automated trading at Alertatron...

How does it work?

  1. Your Trading Strategy Produces Signals.
    Most of our customers are using TradingView to run their trading strategy. This consists of indicators on their charts that trigger alerts at key moments, like Buy, Take Profit, etc.
  2. Alerts to Alertatron.
    Those signal alerts come into Alertatron. Learn how
  3. Orders executed on Exchange.
    Special commands in the alert message are seen by the automated trading bot, and the trades are automatically executed.

That's it really.

What do the 'special commands' look like?

Like this...

WhichKeys(XBTUSD) { market(side=buy, amount=100); }

But what does it mean....?

Let's break it down.

Part What it is for?
WhichKeys The name of the API keys you'd like to use. You can add API keys for several exchanges and accounts. Each set of keys is given a unique name that you use in the commands so our bot knows where to trade for you.
XBTUSD The symbol on the exchange you'd like to trade. Looks like we're trading BitMEX Perps here...
{ ... } Everything inside the curly brackets are the actual commands we'd like to execute on the exchange. In this example, place a market order to buy 100 contracts of XBTUSD.

Inside those curly brackets we can have as many commands as we like. The full list of available commands can be see to the side (at the bottom of the page on Mobile).

Each command is executed in turn and converted into actions on the exchange. So the market() command results in a market order being placed.

Command Values

Each command can be passed some values to change how it behaves, that are placed inside the brackets. This helps us keep track of which values belong to which command and keep everything neat and tidy. Each of the possible values are explained in the documentation for that command.

For a market order, we need to choose if we are buying or selling, and how much we want to buy/sell. Our example at the start used 2 values to specify exactly this information. side=buy told the market order that we want to buy. amount=100 told it how much to buy. As we are trading on BitMEX XBTUSD in this example, 100 would mean 100 contracts (the unit used for that symbol on that exchange). 100 contracts is basically $100 worth.

So, market(side=buy, amount=100); tells the bot execute a market buy of 100 contracts.

As soon as it is done, it will move on to the next command inside the curly brackets. Our example only had one command, so it's done and the bot will disconnect from the exchange and wait for another message to come in.

Chaining commands

Need to do more than place a single order. You can chain a series of orders in a single block to create more complex effect. For example...

WhichKeys(XBTUSD) { 
  cancel(which=all);
  scaled(side=buy, amount=500, from=5, to=100, orderCount=20);
}

This one is a little more complicated than before. First, there is a cancel command. The arguments for the command tells it to cancel all open orders.

Once that is done, it moves on to the next command, which places a scaled order of 20 limit orders, over a range from $5 to $100 from the current price.

There are a great many different commands available that the automated trading bot can execute for you. Take some time to have a look through the available commands and some of the examples available to see the kind of things that are possible.

It is also a good idea to start out using one of the supported testnet exchanges, such as Deribit and BitMEX, that allow you trade without risking real money.

Some images from Unsplash

About Alertatron.com

Your TradingView alerts, with charts, PM'd to you.

Get all your alerts from TradingView, sent to Telegram, Discord, Slack, Email or webhooks, with a chart snapshot attached.

Capture Charts

See a high quality chart with every alert, captured at the moment the alert was triggered. See exactly what the market was doing and make informed decisions.

Automate Trading

Trigger orders on popular cryptocurrency exchanges and trade 24/7. Access powerful algorithmic orders to maximise your profits.

Integrations

Connect your alerts to Telegram (channels, groups and private chats), Discord, Slack, email or send push notifications to other services with webhooks.

Easy To Setup

Nothing to install and no browser extensions. Captures alerts 24/7, even with your computer switched off. Be up and running in seconds.