How to built a trading robot in 45 minutes?
Debut is a JavaScript trading robot builder with backtesting and plugins.
It allows you to automate trading in the stocks or cryptocurrency market. It is really possible to create and launch your own trading strategy in 45 minutes. This became possible due to the system of extensions (plugins), which includes ready-made components for solving the most popular tasks arising in the development of trading robots. Such as: Search for entry points, take / stops, trailing, safety trades, search for support and resistance levels and much more. The community is engaged in the support and development of the components, we already have more than 100 people. You can also create your own component which will be useful to other Debut developers.
Environment Components
Core
Provides an interface for creating a strategy and takes on the role of an intermediary in interactions with the rest of the system components. The core task is to make the process of creating and using a trading robot as simple and straightforward as possible.
Transport
Transport is responsible for all network interactions, ensures stable operation and execution of transactions on the side of the broker / exchange. Helps to standardize work with various client APIs, to receive information about an asset in an internal standard format, for example, it forms some characteristics of an asset, such as: the minimum lot or pip size in the current instrument. The developer does not interact with the transport directly, the kernel does it all.
Backtester
Allows you to receive historical data and simulate the passage of the strategy on them. Everything is classic, but with one twist, there are 3 emulation modes:
OHLC — emulation with the addition of ticks for 4 candle states.
M1 Ticks — use of 1 minute price data when simulating ticks.
Virtual simulation — virtual generation of ticks within one minute to create a full reality effect during testing. With this emulation, price changes reach no more than 0.75% per tick, which is extremely important for cryptocurrencies due to their volatility.
Optimizer based on genetical algorithms
The optimizer allows you to achieve maximum trading efficiency by setting the parameters of a trading strategy in detail. You can specify the values that this or that parameter takes, the range and the type. Genetic algorithms will select the most efficient values.
Quick start guide
Finding a trading strategy
Using Google it is not difficult to do this. For example, an interesting strategy on the MACD and Stochastic indicators on the investopedia website. Let’s implement it step by step in the Debut ecosystem. In short, the whole essence of the strategy is in the intersections of the indicator signal lines. Read the details of the strategy here, but the most important thing I will write here is the entry conditions
Clear entry conditions
Buy:
- MACD histogram changed sign, or MACD line crossed signal line from bottom to top
- Stochastic line K crosses line D, from bottom to top
Sell:
- MACD histogram has changed sign, or the MACD line crossed the signal line from top to bottom
- Stochastic line K crosses line D, from top to bottom
Below is a screenshot of the resulting entry points at a good time to predict price movements with oscillators.
Installing and configuring the environment
To work, we need NodeJS version 14.x and higher. You can download it on the official website.
Next, you need to configure the Debut environment, for this you need to clone the repository with the pre-configured environment for work.
git pull https://github.com/debut-js/Strategies.git
Timed 45 minutes and watch the video.
Documentation: https://debutjs.io
Source Code: https://github.com/debut-js/Strategies/