Welcome to the world of automated trading! The fact that you are reading this book
suggests that you want to probably build your own bot, which hopefully can make you
some money while you are busy with your day job or, like me, want to experiment with
the technology that goes into building such a bot using Java.
Automated trading has been around for a while, although it has largely been a
preserve of big players such as banks and hedge funds.
This has changed in the last few years, however. Many retail investors are now able
to trade on various platforms and exchanges directly, instead of using the services of a
traditional broker on the phone, which means the demand has been growing to automate
the task of placing orders while these investors get on with their day jobs. As a first step in
automating this process, many platforms such as OANDA, LMAX, etc., provide APIs for
various programming languages such as Java, Python, C#, and PHP so that the mundane
tasks of watching the market, looking at charts, and doing analysis can be automated.
On this journey, we will focus not only on the concepts of automated trading, but
also on writing clean, test-driven Java programs.
Toward the end, we will not only have a working trading bot that is ready to
trade with any strategy, but from a technical perspective, we will have also gained an
appreciation of the event-driven, multithreaded world of Java programming.