Create A Bollinger Band-based Strategy
In this how-to, we take you through the steps to create a Bollinger Band-based Strategy on the Algo Builder.
Creating the Bollinger Band Condition
1. Upon login in, click on the “Build a Strategy” button on the top right of your screen.
2. Click on the “Build new strategy” button.
3. At the “New Strategy” window, give your strategy a name, select the currency pair you want to trade in, and the candle period. In the example below, we have named our strategy “Bollinger Band Strategy Example”, chosen the GBP/USD currency pair and selected a 1 hour candle period.
4. Click “Create” when you are done.
5. You are now in the main strategy window.
6. Click on the “New Condition” button to start creating your algo conditions.
7. You are now in the “Algorithm Creator” window. You will be given a choice of 2 buttons, “Indicator” or “Number”. Click on the “Indicator” button.
8. You will see the statement line now saying “When GBP/USD” and a list of indicators shown.
9. Click on “Bollinger Bands”, and you will be sent into the window to input your Bollinger Band parameters.
10. The standard Bollinger Band parameters are a period of 20, a standard deviation of 2 and using the simple moving average calculation. So let’s use those for our example here. However, please do not find yourself constrained by defaults or “traditional” parameters.
11. You also need to choose “Upper”, “Middle” or “Lower” band of your Bollinger envelope. We choose “Upper” for this example.
12. Clicking on “Next” presents you with a selection of two buttons, “Comparison” or “Arithmetic”. Choose “Comparison” so that you can compare that “VALUE” you choose earlier with something.
13. You are now presented with nine choices of comparison operators. We select “Crosses from below to the above”.
14. You are then put back into a page where you can select either an “Indicator” or a “Number”. Select “Indicator” again, as you did in step 7 earlier.
15. In the indicators page, choose “Moving average” now.
16. The basic idea here is that the upper band would need to cross from below to the above of some other parameter, which we have chosen to be “Moving average” for this example. Enter a period of 35 candles of type SMA here.
18. Upon clicking next, you will be taken to the next page where you will be given three possible choices: “Arithmetic”, “Action” or “And/Or”. For now, choose “Action”.
19. You can now decide whether to do a “Buy” or a “Sell”. We choose “Buy”.
20. Click on the “Confirm” button to save the condition and return to the main strategy page.
And you have now created a Bollinger Band based strategy.
All our algorithm conditions start with a “When” statement. In other words, Our algorithms will have statements that say: When a condition is met, do this. In our context, we’re essentially saying, “When these set of conditions are met, BUY (or SELL) this currency pair”
Manage Money (Risk)
Now that you have created the condition for your strategy, you need to set the parameters for your risk. This is the money management section of your strategy.
There is a more detailed description of the fields on this page here, but for now, you can fill in the parameters as shown in the screenshot below:
Once the “Risk” parameters are filled, click on “Save” and you will be returned to the main strategy window again.
Backtesting The Strategy
With the money management a.k.a. “Risk” section done, you are now ready to test your algorithm.
1. Start by clicking on the “Back Test” button.
2. You will now be presented with the Backtest time period selection window.
3. Select the “Backtest over 10 years” checkbox and click “Confirm”.
4. After the backtest is completed, you will be presented with a summary of the results.
5. Clicking on the “Equity” tab will show you the equity chart, drawing a graph of your algorithm’s performance during the backtest.
6. The “History” tab will provide you with a list of results from the backtest, which you can also download by clicking on the “Download CSV” button – something that you might want to do if you want to further analyse the performance of your algorithm.
Running Your Strategy Live
Now that you have done the backtest, you may want to run a paper test, which is running your algo on live data but not actually executing the trades when the conditions are met.
Or, you can just bite the bullet and go live if you are already happy enough with your algo and its bactest results.
To do so, click on the “Live Trade” button on your main strategy page, and you are live!