Automated Trading Overview

Version History

An overview of the changes on each release of the automated trading bot

To update to the latest version of the bot, go to the bots settings and click on 'Restart Server'.

Most bots will automatically update the next time they are idle. If your bot is continuously tracking trades 24/7, we recommend stopping all your orders or manually restarting from time to time, to stay up to date. It can take up to 2 hours for the updates to be fully rolled out across our entire infrastructure.

8th Apr 2020 version 1.1.91

  • FTX now handles flaky connections better, using some of the same system that was developed to keep Bybit going through random connection issues.
  • Bybit added a new error code that we will retries requests. If we see this error, we assume it's a passing glitch, wait a moment and try again a few times.

5th Apr 2020 version 1.1.90

  • Adjustment to the PnL calculations for Trading Groups, and a fix for Deribits calculations when fetching only small amounts of data.

2nd Apr 2020 version 1.1.89

  • Tidy up of bot output in some areas
  • Some minor tweaks to trailing stops so they can use the same historical price spikes that trailing take profits support
  • Minor adjustments to network pings for some exchanges, especially during reconnection.
  • All a bit geeky and technical this time - nothing all that exciting. sorry.

1st Apr 2020 version 1.1.88

  • Updated Bybit with active connection analysis. The connection to the exchange will automatically be restarted if the bot fails to see fresh price data for a minute or two, as well as on other conditions. It will also restart the connection from time to time to keep things fresh. The goal of these changes is to improve the integrations ability to self-heal when the connection becomes unstable or unreliable.

1st Apr 2020 version 1.1.87

  • Some additional improvements to handle dropped connections and Bybit going partially down. Should be more able to recover in more combinations of situations now.

31st Mar 2020 version 1.1.86

  • More systems in place to ensure that position size is up to date after a market order is executed. Improvements on BitMEX and Bybit here, which will hopefully end the occasional problems people are seeing with incorrect position sizes affecting some orders. Hopefully this will fully solve the problem, but until it is used extreme extreme pressure and system overload it's hard to know for sure.
  • Made Limit and Market orders output a bit more useful.
  • A couple of other internal changes to ByBit that should make updating order prices more robust.
  • More tests added to test suite.

28th Mar 2020 version 1.1.85

  • Bybit was throwing an undocumented error while part of their infrastrucure was down last night. We now take action on this error to pause and retry, to increase the chance of success in future outages of theirs.
  • A few more adjustments to a new order type.
  • version 1.1.84 ended up getting added into this one.

28th Mar 2020 version 1.1.83

  • FTX min order size adjusted (reduced from 0.01BTC to 0.001BTC on BTC-PERP for example). This change was based on information from FTX devs which should help us here. Note that repeated orders below the original min size are likely to fail though (spam orders).

25th Mar 2020 version 1.1.82

  • Deribit rate limiting adjustments
  • Some updates to support PnL reporting for trading groups
  • Deribit termination during an 'exchange down' situation improved.
  • Fixed some issues with tagged orders on FTX BTC/USD market.
  • Added a new order type for testing (not released yet)

20th Mar 2020 version 1.1.81

  • balance() now gives useful results on Bybit

19th Mar 2020 version 1.1.80

  • Added handling for some undocumented Bybit errors codes.

18th Mar 2020 version 1.1.79

  • Performance improvements in the Bybit integration (especially around establishing the initial connection to the exchange).

16th Mar 2020 version 1.1.78

  • Updated the way Deribit handles bad or unreliable connections. It should now recover from dropped connections far more quickly and reliably than before.
  • Lots of internal updates to support a new feature in Trading Groups coming soon...

14th Mar 2020 version 1.1.77

  • Calculations for percentage of position size now round up to the nearest valid trade size (eg 1 steps on BitMEX, $10 steps on Deribit, market step size on FTX etc). This is to ensure that when creating multiple orders from your position, they will always cover your entire position. For example, placing 2 take profits, using 60% and 40% of your position will always result in orders that cover at least 100% of your position. Previously, this calculation rounded down, so the example above could leave your position open by a single unit under some conditions. This is now resolved. Don't forget to use ReduceOnly when closing positions though, as this will ensure you'll never close more than your current position size.

13th Mar 2020 version 1.1.76

  • Minor update to the FTX rate limiting handling. We normally stay inside the rate limits automatically, so don't usually see rate limit errors from the API, but in these unusual conditions we've seen a couple. This update ensures those are handled better and your orders are retried a few times, with suitable back-offs.

13th Mar 2020 version 1.1.75

  • Added some extra handling around getting order state on Bybit, especially in the case where the bot is missing order details locally.

12th Mar 2020 version 1.1.74

  • Improvements to the connection reset handling for Bybit. This triggers when the exchange drops the connection. We should now smoothly reconnect to the exchange and re-subscribe to any required channels.

10th Mar 2020 version 1.1.73

  • Test version of Bybit integration added for Trading Groups.

10th Mar 2020 version 1.1.72

  • More tweaks to BitMEX's reluctance to give us up to date position information after a market order.

8th Mar 2020 version 1.1.71

  • Changed the way that we wait for BitMEX market orders to confirm as filled, as we'd seen a case where the old system wasn't working correctly duing System Overload.

26th Feb 2020 version 1.1.70

  • managed() is no longer supported on Bitfinex or Coinbase, as it is not possible to have open stop loss order and take profit order on the same coins, limiting the usefulness of this order type to trading only a small part of your balance. Replace managed() with 3 orders instead though (market(), stopOrder(), limit()).

20th Feb 2020 version 1.1.69

  • Cancelling tagged orders on FTX was not working in some situations. Fixed.

18th Feb 2020 version 1.1.68

  • `stopOrTakeProfit() was producing a lot of pointless log output. This is now gone.
  • A few other tweaks to log output to keep things tidy.

18th Feb 2020 version 1.1.67

  • Several updates to tracking of background tasks. They now report what they are up to in the logs from time to time so it's clear what is processing and what it is doing.
  • Adjusted the way trailing offsets are calculated in some conditions. It is now clearer especially when using offsets that are a mixture of different relative operators and there is a big gap between average entry price and current price.

11th Feb 2020 version 1.1.66

  • fixed an issue where it was possible to drop some log lines if you sent multiple alerts to the bot at the same time. This should be resolved now.

10th Feb 2020 version 1.1.65

  • Update to some of the trailing stop orders to fix an issue with trailing, especially when using average entry offsets.
  • Some optimisations in batching logs and events back, to reduce load on parts of our infrastructure.

9th Feb 2020 version 1.1.64

  • logs and event logs are flushed a little more readily now.
  • BitMEX tweaks for when we get rate limited.

7th Feb 2020 version 1.1.63

  • managed() and marketMaker() orders now get less confused when you try and cancel only buy or only sell orders. For managed, just the active ones on the correct side will be cancelled and it will try and pick up the pieces from there.
  • market orders have had their failure cases tightened up a bit.
  • aggressive() orders now also handle failures on trying to place the initial entry order more gracefully, and can indicate if the order was left unfilled, partially filled or fully filled to systems like managed().
  • As a result of the other 2 things, managed() is now also able to handle failures on entry better. Previously, a failed aggressive entry would cause managed() to still attempt to place any requested stops and TP's. It now recognises that the entry order failed and does not attempt to place the stop and take profit orders.

6th Feb 2020 version 1.1.62

  • FTX Balance reports were not being notified to your account since yesterdays release. This is resolved now.
  • Logging has been improved a little, so the viewable content should be more up to date when the bot is essentially doing nothing and waiting for something to happen.
  • Restart bot button now a little more aggressive about getting things done.

5th Feb 2020 version 1.1.61

  • FTX now handles moving orders a little better. The initial order status returned by the API is not always accurate, so we now wait for the first order update to give us the true state of the order. This can help make aggressive() work more reliably.

5th Feb 2020 version 1.1.60

  • Lots of internal infrastructure related improvements to make scaling smoother.
  • Bots now auto-update, so you will no longer need to do anything to ensure you are running the most up to date version. This happens automatically while the bot is idle.
  • New log viewing screen that lets you see all your recent log activity between restarts and api key changes. The results are also paginated for easy viewing and you can hover the mouse over any log line to see the exact time that line was generated.
  • Adding and removing API keys will no longer interrupt active running trades, as it no longer needs to restart the bot to do this. Note: You will need one more restart to migrate to this version, but once you are on 1.1.60 you won't see restarts any more.
  • Added some details of the stack running the bot to the logs. This is just to help with diagnosis when there is a problem.
  • Puts in place all the ground work needed to support the up-coming Trading Group features.
  • Significantly increased capacity, so we can support many more customers without any additional strain on systems. Keeping everything running ultra-fast is one of our top priorities.

4th Feb 2020 version 1.1.59

  • Support added for BitMEX's new XRPUSD Perpetual Contract. The contract specification and details can be seen on BitMEX's website. Full support for percentage based order sizes is also included.
  • BitMEX Reduce Only stop orders now use Close to ensure they don't require additional margin to execute. This is equivalent to ticking 'Close on trigger' on BitMEX. The differences between this and regular reduce only orders are subtle, but on balance this should be the better option, as it increases the chance your stop will actually execute.

28th Jan 2020 version 1.1.58

  • trailingTakeProfit() updated to ensure it doesn't miss momentary price spikes. Previously it would sample the price each time it was polled (once or twice a second generally). Now it considers every price update that occured since it last checked. This has added new ability of the bot to query recent highs and lows on the exchanges, going back up to around 1 minute.
  • Logging output from trailingTakeProfit() is now a little more informative.

26th Jan 2020 version 1.1.57

  • Min order sizes for BitMEX are now based on 0.0025 XBT, in line with BitMEX's notice here:
  • aggressive() now have additional handling of cases where BitMEX double cancels orders, and a smarter recovery phase that should make the more stable on this exchange, even in 'wicky' moments.
  • trailing stop limits orders were not correctly trailing the limit price (just the trigger price). This has been resolved.

21st Jan 2020 version 1.1.56

  • Some big improvements to our stop order support. stopOrder(), trailingStop() and trailingTakeProfit() have all been updated with the following awesome:-
    • All 3 commands now support reduceOnly, so it is now possible to create stop orders that open positions as well as closing them.
    • They all also include support for a new argument. limitOffset. If you include limitOffset, then the stop order will be created using a stop limit order instead of a stop market order.
    • The docs for all 3 have been updated to include information about the new arguments.
    • It is supported on all exchanges.

19th Jan 2020 version 1.1.55

  • balance() now includes the key name in the response, so people tracking many accounts can work out which balance report is for which account.
  • aggressive() has been updated and refactored. Behaviour should be identical to before, only it now supports the background property. This allows you to either wait for the fill (default and previous behaviour), or allow the order to run in the background while the bot continues to process the commands that come after the aggressive() command.
  • Some improvements in logging - nothing exciting.

18th Jan 2020 version 1.1.54

  • Quick fix to add the new tagging system to stop market orders. 😊

18th Jan 2020 version 1.1.53

  • Upgraded the order tagging system. Tags are now long lived, and can be used between alerts and even between bot restarts. So now you can do something like this, for example...
    • open or add to a position
    • cancel existing stops and take profits using a tag (eg 'stops')
    • place new take profit and stop orders, giving them a tag ('stops' again). The new orders are placed relative to average entry and are sized to close the position in full
  • managed() max timeLimit has been increased from 1 day to 7 days.
  • More improvements to handling BitMEX overloads
  • Coinbase Pro and Bitfinex support improved to support the new internal tagging system
  • Deribit socket connection failures now report better information for diagnostics

11th Jan 2020 version 1.1.52

  • Percentage amounts now supported for ETHUSD on BitMEX

11th Jan 2020 version 1.1.51

  • managed orders timeLimit property was not being respected when using aggressive entry orders. It is now.
  • When the entry time limit has been reached, managed will still attempt to place a sl and tp if they were requested, to catch a partially filled entry.

2nd Jan 2020 version 1.1.50

  • Market maker order now support % sized bidAmount and askAmount.
  • Connections held open for slightly longer to prevent repeated reconnection attempts with stacked commands
  • Some updates to prepare for a cleaner event log in Alertatron.

31st Dec 2019 version 1.1.49

  • Updated FTX support to ignore attempts to use 'reduce only' orders on spot markets. The order is now submitted without the reduce only state enabled in this case.

30th Dec 2019 version 1.1.48

  • Couple of tweaks to BitMEX integration for better handling of position size information around startup and cancelling orders.
  • Minor improvements to the market maker order.

29th Dec 2019 version 1.1.47

  • BitMEX support now cleans up the orders table more often to reduce memory usage.
  • BitMEX cancelling orders is now faster
  • Trailing Take Profit orders now give out more consistent data to the log, making them a bit easier to track.
  • Managed order give clearer details on any failures
  • BitMEX support now enforces the exchange max stop order limit (10 stop orders). When you try and place the 11th stop order, it will fail.
  • Aggressive orders now handle price movements whilst trying to move an order better (especially on BitMEX, which just cancelled them before). This resolves an issue some customers were seeing when using managed() orders with an aggressive entry order.
  • Some behind-the-scenes updates to prepare for a new feature on the front-end (coming soon).

26th Dec 2019 version 1.1.46

  • BitMEX shutdown now waits for the socket connection to close.
  • Deribit rate limiting is looser on connection and tightens up with higher usage. Should result in faster performance when connecting for a few simple commands.
  • Aggressive orders now place their initial order a small distance away from the current price and move it up to the front of the book from there. This reduces the failure rate for placing the initial order during price action and leans on the more fault-tolerant 'move order' to adjust it into place.

24th Dec 2019 version 1.1.45

  • Ho ho ho edition
  • Big update to support the introduction of rate limits on the Deribit API. Alertatron now gracefully handles rate limit requests and imposes the required limits if you exceed your accounts rate limit. We use a smart rate limiting system that supports Deribits burst allowance, and only locks you down if you exceed the burst limits. We also auto reset the limits if your connection is idle for a while.

Full information about the limits can be see on Deribits site

23rd Dec 2019 version 1.1.44

  • Reduced min order size on BitMEX to $25
  • Rewrote the background processing system that manages background tasks. Previously this waiting for all commands in the block to execute, then ran background tasks until they all completed. Now the background processing starts as soon as the order is execute. The worst case scenario for the old solution was like so...
keys(symbol) {
    # Start a background order (like market maker or managed)

    # Wait a long time (any command that took a long time really)

    # Background tasks would not check their status until here

New Behaviour is like this...

keys(symbol) {
    # Start a background order (like market maker or managed)

    # Background task is now updating in the background from here

    # Wait a long time (any command that took a long time really)

    # Background tasks can keep going here, or they might have finished long ago

20th Dec 2019 version 1.1.43

  • Rewrote part of the order replacement strategy in the Market Maker order, so it can tolerate the wicks and post-only behaviour commonly seen on BitMEX.
  • A few minor adjustments to the BitMEX driver to help keep order information fresh, more of the time.

18th Dec 2019 version 1.1.42

  • Cancelling background orders now gives better information on what's happening
  • Updated the order in which orders are cancelled. Background orders are now cancelled right away, instead of being asked to cancel.
  • After using a cancel() command you can now be sure that all order will have finished cancelling before the next command starts, freeing up the relevant margin allocated to those orders. Previously, some orders were queued for deletion and that process had not completed by the time the next command started.
  • Version 42, which is the answer.

15th Dec 2019 version 1.1.41

  • Lots of minor improvements...
    • Deribit no longer attempts to cancel orders that were already cancelled
    • Track a little more about orders in sessions, for future features.
    • BitMEX now reports less pointless information into the log
    • A few logging messages tweaked for better clarity

15th Dec 2019 version 1.1.40

  • Added some more tests for trailing stops and take profits
  • Aggressive orders now handle some edge cases a little better
  • Bot is now capabale of telling Alertatron which version it is, making some planned features possible.

13th Dec 2019 version 1.1.39

  • Updated the ping pong order so it now works with % sized orders
  • Updated the aggressive entry order to function more reliably when used on multiple exchanges / markets at once.
  • Updated the logging of the aggressive entry order so it is clearer which messages are part of which order
  • Updated algorithic virtual order handling, also adding some clearer logging.

12th Dec 2019 version 1.1.38

  • Fixed an issue with placing market orders on FTX and updated some tests.

11th Dec 2019 version 1.1.37

  • Add support for balance() to FTX
  • Fixed a couple of potential issues on FTX if you have no open position

11th Dec 2019 version 1.1.36

  • Update to FTX to use the correct value for PnL and average entry prices.

11th Dec 2019 version 1.1.35

  • Beta of FTX support added
  • Updated the market market order to move orders in places when auto balancing, instead of using a cancel / place new order approach. Should be more efficient, esp on BitMEX.

9th Dec 2019 version 1.1.34

  • Fixed a bug in the market maker order that caused the autoBalanceEvery setting to be far far quicker than specified. Now 15m means 15 minutes and now a fraction of a second...

1st Dec 2019 version 1.1.33

  • Handle attempts to cancel orders that have already been cancelled better.
  • Updating order price will now validate the state of the order prior to attempting to change the price.
  • Both of these improvements are to help resolve some recent issues seen on BitMEX. If you use BitMEX, it is recommended that you restart your bot to get these changes as soon as possible.

1st Dec 2019 version 1.1.32

  • Updated the min order size for BitMEX XBTUSD to match their requirements and reduce the chance to people getting their BitMEX account banned for 'spam orders'. Min order size is now 20 contracts, with 1 contract increments.
  • Tweaked to the rate limiting on the BitMEX api. This should have no impact under normal conditions.

26th Nov 2019 version 1.1.31

  • Resolved an issue reported when running orders on multiple symbols simultaneously on the same exchange. BitMEX and Deribit that trade on more than one symbol / instrument, especially from the same alert are recommended to update to this release.

26th Nov 2019 version 1.1.30

  • Minor adjustments to logging wording for better clarity

25th Nov 2019 version 1.1.29

  • Reduced the amount of logging, especially during trailing stop orders.
  • Provided some details about cancellations, as BitMEX can report harmless errors in some conditions.

23rd Nov 2019 version 1.1.28

myApiKeys(XBTUSD) {
    managed(side=buy, amount=1000, entry=aggressive, stopLoss=1%, takeProfit=3%);

20th Nov 2019 version 1.1.27

  • Added a new command: exchangeSettings(). This allows exchange specific settings to be adjusted. At the moment there is only a single setting to change on BitMEX only, which is the ability to try and change the leverage setting to some target value, or to enable Cross Margin. Learn more here

18th Nov 2019 version 1.1.26

  • Fixed an issue that meant BitMEX always used the current price for offsets, even when requesting to use the average entry price.

17th Nov 2019 version 1.1.25

  • Resolved a race condition on starting up the Deribit connection, when multiple separate alerts, all wanting to execute commands on the same Deribit API keys, arrive at Alertatron simultaneously. Whoever gets in there first starts up the connection, with the other attempts waiting for the connection to be stable before proceeding.

17th Nov 2019 version 1.1.24

  • Added support for offsets relative to average entry price on Deribit and BitMEX (see below).
  • Updated the back-off strategy used on BitMEX during 'system overload'. This should enable the bot to make more attempts to push orders through, as well as making more over-all attempts before failing. Other exchanges are not affected by this issue.
  • Updated the managed() order. Previously, if using position=xxx for your entry, and your position size was already at the target level, the command would correctly determine that the entry order was of zero size. It would then abort the entire order. This update ensures that the order will keep running, even though no entry order was placed, to close the current position using a stop loss or take profit if they were defined.

Average Entry

Prior to this release you can specify various prices (such as limit order prices) relative to the current price, using an absolute offset, a percentage offset, or it was also possible to specific the exact price to use. These options were expressed like this...

Example Meaning (assuming asset priced in USD)
offset=50 offset $50 from the current price.
offset=1% offset is calculated as a percentage of the current price. If the price is $10,000, and offset is 1%, then 1% of 10,000 is 100. An offset of $100 will be used.
offset=@950 The @ at the start of the value indicates this should be treated as an absolute price of $950, regardless of what the current price is.

With the addition of support for Average Entry offsets, it is now also possible to specify your offsets relative to your open positions average entry price, instead of the being limited to the current price.

This is done by prefixing the offset value with an e (for entry).

So, in addition to all the options in the table above, you can now also use the following values...

Example Meaning (assuming asset priced in USD)
offset=e50 With an open position, offset will be $50 from your average entry. With no open position, offset will be $50 from the current price, as above.
offset=e1% With an open position, offset will be 1% away from your average entry price. With no open position, offset will be relative to current price, as above.

For spot exchanges that don't have a concept of an open position or average entry price, these new options will give results relative to the current price. This will also happen on BitMEX and Deribit in cases where you don't have an open position.

13th Nov 2019 version 1.1.23

  • Update to cancel() on BitMEX so it does not attempt to cancel orders that were already filled. This was harmless, but produces error messages in the logging terminal that were confusing.
  • The BitMEX API handler will now wait longer after submitting an order for BitMEX to update the accounts position size. This is only an issue during 'system overload' events and the longer wait should increase stability when using that exchange under those conditions. Other exchanges were not affected by this issue.

12th Nov 2019 version 1.1.22

  • MarketMaker() order is now a little stricter when reading some of its settings. The default values are also more useful.

Some images from Unsplash


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.


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.