A good scalping strategy on Bollinger Bands and RSI

We will automate and test an interesting scalping strategy based on the traditional indicators of any trading platform in issue 72 of ForTrader.org. You can find the full author's rules of the strategy at our website pageHere we will briefly tell you about the rules and the results.

Author's trading strategy rules

So, to work we will need the following indicators:

Bollinger Bands with a period of 50 and a deviation of 2 (color yellow);
Bollinger Bands with a period of 50 and a deviation of 3 (color blue);
Bollinger Bands with a period of 50 and a deviation of 4 (color red);
RSI indicator (8) with levels 30 and 70;
Stochastic (14, 3, 3) with levels 20 and 80;
MA (50) - central red line.

Since we have a scalping strategy, the timeframes used will naturally be the lowest: M1 and M5.

A buy signal occursWhen the price breaks through the yellow channel downwards and goes at least halfway to the lower blue Bollinger band. Price presumably rolls back to the red MA line (50), where we take profits. An additional signal is when the RSI indicator reaches the level of 30 and below, with the Stochastic being less than 20.

Fig. 1. Signal to buy.
Fig. 1. Signal to buy.

Sell signal is formed under opposite conditions: the price breaks through the yellow channel and passes at least half of the distance to the upper blue Bollinger Band. Profits are taken when the moving average is reached. An additional signal is when the RSI indicator reaches the level of 70 or higher, with Stochastic above 80.

Fig. 2. Signal to sell.
Fig. 2. Signal to sell.

The process of closing a deal on the strategy is left to the trader, he can use their own experience in this matter.

Automating a trading strategy

In the process of automating the trading strategy, the ForTrader.org programmers slightly expanded the principles of opening and closing positions. Including in the Expert Advisor you can find the parameter enter (market entry)which has five meanings:

0 - The trade opens between the yellow and blue BB line;
1 - between blue and red;
2 - entry at the touch of the yellow line;
3 - entry at the touch of the blue line;
4 - entry at the touch of the red line.

And indeed, the instruments differ so much in the nature of quotations, that such a supplement will be very useful in the work.

In addition, we have fully defined the rules for exiting a deal, offering 6 options (parameter close_type ):

0 - closing on the midline;
1 - closing the trade between the yellow and blue lines of the reverse side of the channels;
2 - closing the deal between the blue and red lines;
3 - closing at the touch of the yellow line;
4 - closing at the touch of the blue line;
—  5 - closing when the red line is touched.

Now there is an opportunity not to lose profits in more volatile instruments.

Remaining parameters of the expert

bolinger_per - period of the Bollinger indicator lines: from 10 to 200 or more.
bolinger_deviation_yellow - the deviation parameter for the yellow Bollinger lines, the others are calculated automatically. The value is from 1 to 4.

RSIFilter — включение и отключение фильтра по RSI: 0 – выключен, 1 – включен.
rsi_period - RSI indicator period.
rsi_ur - the upper level of RSI, the lower level is calculated automatically: from 95 to 55.

StohasticFilter —  включение и отключение фильтра по Стохастику: 0 – выключен, 1 – включен.
stohastic_period - stochastic period.
stohastic_ur - the upper level of the stochastic, the lower level is calculated automatically: from 95 to 55.

InpTakeProfit - TakeProfit, 0 - not used.
InpStopLoss - stoploss, 0 - not used.

Testing a trading strategy

Testing the trading strategy with the author's settings did not bring any special results. The deposit was lost rather quickly and successfully, even without any hope of profit (see Fig. 3).

Figure 3. Testing of the Expert Advisor by the author's rules: EURUSD, M1.
Figure 3. Testing of the Expert Advisor by the author's rules: EURUSD, M1.
Figure 4. Testing of the Expert Advisor by the author's rules: EURUSD, M5.
Figure 4. Testing of the Expert Advisor by the author's rules: EURUSD, M5.

Nevertheless, the optimization of the parameters of the Expert Advisor was quite successful. For the 5-minute timeframe the results were obtained by EURUSD and USDJPY, which is surprising, given the different nature of these instruments.

Fig. 5. Testing of the Expert Advisor after optimization: EURUSD, M5.
Fig. 5. Testing of the Expert Advisor after optimization: EURUSD, M5.

In the period from August 31 to February 26 a profit of 1573.60$ from a deposit of 300$ was obtained. At that, the maximum drawdown was 20.41%, and the average profitable trade (91.17$) exceeded the average losing trade (-70.56$). The back-tests also gave excellent results.

Fig. 6. Testing of the Expert Advisor after optimization: USDJPY, M5.
Fig. 6. Testing of the Expert Advisor after optimization: USDJPY, M5.

In the period from September 7 to February 26 a profit of 1801.49$ from a deposit of 300$ was obtained. The maximum drawdown was 13.28%% and the average profit trade (61.46$) exceeded the average loss trade (-41.10$). The back-tests also gave excellent results.

Download Expert | Author's Rules Test Results | Test results after optimization | Couple's set EURUSD | Couple's set USDJPY

Update from March 28, 2013
Corrected version of the strategy advisor:

  1. Fixed small bugs in the strategy algorithm
  2. Added a time limit.
  3. Added two parameters buy and sell for separate optimization of buy and sell: 1-on, 0-off.

DownloadingFT_3BB_RSI_Stohastic_MA_2

Monitoring the trading advisor

We offer you to get acquainted with the testing of the Expert Advisor on a demo and a real account for the currency pair dollar/yen. The Expert Advisor was placed on a demo account immediately after the publication of ForTrader.org magazine in order to test its behavior in real trading conditions.

The company: Gamma Markets LTD
Terminal: MetaTrader 4
Deposit: 300$
Account type: demonstration
Currency pair: USDJPY
Timeframe: М5
Expert's office hours24/7
Start of testing: 26.02.2013
End date of testing: 25.05.2013

After a month of successful testing on the demo account, during which the deposit was almost doubled, we decided to place it on a real deposit, while keeping the demo account open, in order to compare the performance of the company on different types of accounts.

The company: Gamma Markets LTD
Terminal: MetaTrader 4
Deposit: 1000$
Account type: demo, ECN
Currency pair: EURUSD
Timeframe: М5
Expert's office hours24/7
Backtest: demo account operation
Start of testing: 28.03.2013
End date of testing: 27.06.2013

Мониторинг советника — демо-счет
Мониторинг советника — реальный счет
Discussing Advisor

Leave a Reply

Back to top button