Now, to create a trading robot, you do not need to know how to program or hire a programmer. You can create a robot yourself. Log in to the opexflow.com website via Telegram. Then go to the robot creation page. You can get to the robot creation page by the following path: (1) Signals -> (2) Management -> (3) Create. Or open the link . On this page, you can create a full-fledged robot that will automate the creation and rebalancing of a portfolio. Let’s look at the functionality of creating a robot point by point.
Robot setup
1. Trade entry . If you want the robot to open buy orders upon entry signal, select Long. If the robot should short (sell) upon entry signal, select Short. 2. Timeframe . This item is needed for backtesting the robot (checking on historical data). This field does not affect trading via OpexBot. You do not need to change anything here. 3. Balance . This item is needed for backtesting the robot (checking on historical data). This field does not affect trading via OpexBot. Here you can set the starting deposit size with which backtesting will be carried out. 4. Limitation of the volume of one instrument in the portfolio . Here you limit the volume of one instrument in the portfolio. For example, if your balance is 100,000 rubles, and the limit is set to 20%, the robot will not buy one instrument for more than 20,000 rubles. Which will allow you to balance your portfolio with at least 5 shares at 20% of the deposit, i.e. up to 20 thousand rubles. 5. Transaction size (as a percentage of the deposit) . Here you limit the robot in the volume for one transaction. If you want to distribute the deposit gradually, then set a limit of 10%, then the robot will buy shares for the entire deposit in 10 steps. If you set 100%, then the robot can distribute the entire deposit in one step. 6. Tariffs and commissions, Commission (as a percentage), Brokerage service per month . These are reserved fields for competitions and backtesting, so that everyone competes in real and equal conditions with the same commission from transactions. You can choose only one of the banks with a certain commission. This choice does not affect the use of the robot in OpexBot. 7. Use leverage (margin trading) . Choose leverage for trading, it affects both backtesting and the robot in OpexBot. If you do not know what it is, do not change this field. 8. How to close a deal . Depending on the choice of this parameter, the robot settings fields change, you can close a deal either by StopLoss and TakeProfit, or by a signal. Or both scenarios. If you choose to close a deal by TakeProfit and StopLoss, the following fields will be available: TakeProfit and StopLoss are specified as a percentage, upon reaching which the event selected below will be executed. For example, upon reaching the threshold value, an open position can be either completely closed or partially. Or averaged (instead of closing the position, it will be increased). From this, you can simulate various strategies. For example: StopLoss: -5% Upon reaching this threshold: average. You bought a share for 10,000 rubles. If the share falls by 5%, the robot will offer you to average it (buy an additional 50% of the shares). This is how easy it is to simulate a strategyMartingale . All fields with robot settings are filled, we proceed to the stage of creating an entry signal. To do this, click on the “Next” button.
Setting up signals
By default, the input signal is always configured at this stage. But if you have selected the output by signal, you will be additionally offered an output signal. Below we will consider the input signal configuration, the output signal is formed similarly. The signals consist of the following parameters.
- Selecting Tickers
- Filter by technical data
- Filter by statistic forecast
- Price change filter
- Volume ratio filter
1. Ticker selection . You can select the tickers you are interested in separately or by industry. If you have not selected any, it is considered that you have selected all tickers.
2. Technical data filter . Specify the technical data you are interested in. Currently, RSI and MACD are available for the daily timeframe. If you need additional technical analysis indicators, write about it on the forum. If you do not fill in anything in this section, the signal will not use technical analysis indicators.
3. Statistical forecast filter . This parameter uses data from the statistical forecast, which are specified on the website in the technical analysis section. If you do not fill in the field, the statistic forecast is not used.
4. Price change filter . In this section, you can specify parameters that will send a signal only for those stocks that have changed by the percentage you specify. If you specify a negative percentage, there will be a signal for falling stocks.
5. Volume ratio filter . This filter is used only in OpexBot and is not involved in backtesting. In this field, you can specify the ratio of impersonal volumes of buy and sell transactions for different time intervals.
After filling in at least one entry signal parameter, the start and save robot buttons will appear.
The “Start” button will launch backtesting (we will consider it below) with the ability to further add the robot to the profitability competition table. The save button, accordingly, will save the robot on your page and it can be used for trading. Click the Save button. Fill in the name and description and save the robot. After that, we can go to the profile on the robots page and see it there. In addition, this robot will appear on the OpexBot platform, you can launch it and see the signal for portfolio management that the robot is giving at the moment. The use of the assistant robot and signals in OpexBot will be discussed in a separate article. In the meantime, let’s move on to backtesting the robot.
Backtesting the robot
If you click Start instead of saving when creating a robot, you will go to the robot backtesting mode on historical data. If you have selected all the shares, a lot of entry or exit signals, you will encounter a limitation. To get around it, you need to either reduce the number of traded shares or make more accurate entry signals. If there are less than five thousand signals, then a simulation of the profitability of the robot you created will open. It will consider all entry and exit signals on daily timeframes, and also calculate the profitability taking into account all the settings. Example . If the robot has a positive profitability, you can save it and get into the competition table and profitability rating of trading robots. If you have any questions or want the robot to be made for you, write about it on the forum .