Experts: RSI and Bollinger Bands

 

RSI and Bollinger Bands:

A trading strategy based on RSI and Bollinger Bands.

Author: Vladimir Karputov

 
Tral is not working. The logs are full of errors. Started with default parameters.
 
Alexey Kravchenko:
Tral is not working. The logs are full of errors. Started it with default parameters.

Thanks for the message.

Trailing has been fixed. However, please note:

  • the underscores have been removed from the file name.
  • Unnecessary parameter "TrailingStep" has been removed.
Wait for version 1.001 to be published.

 

Good afternoon!

This is a great idea.

Don't you have a version of your EA for MT4?


Regards,

Pavel Buglak

 
Pavel Buglak:

Good afternoon!

This is a great idea.

Don't you have a version of your EA for MT4?


Regards,

Pavel Buglak


For more than five years I do not support and do not support those who sit on the old terminal and are too lazy to switch to MetaTrader 5.

It is high time to wake up - the old terminal is a way to nowhere.

 
Vladimir Karputov:

For more than five years, I do not support and do not support those who sit on the old terminal and are too lazy to switch to MetaTrader 5.

It is high time to wake up - the old terminal is the way to nowhere.

No problem!

I'm switching to MT5.


What is this variable "indenting" you have?


Regards,


Pavel Buglak

 
Pavel Buglak:

No problem!

I'm switching to MT5.


What is this variable "indenting" you have?


Regards,


Pavel Buglak


This variable means indenting. More specifically - later, as I am not on Windows and can't see the code.

 
Pavel Buglak:

***

What is this variable "indenting"?

***


"indenting" is the value of indentation from the fractal. It is used to calculate Stop Loss levels.

 

Good afternoon!

For the last few days my computer has been testing and optimising your EA around the clock.

I used the following parameters/conditions:

Parameters for optimisation: take profit, stop loss and trailing stop.

Currency pair: EURUSD

Charts: 30 minutes, 1 hour, 4 hours

Initial time interval: 1 year.

The obtained parameters were not confirmed for the period of 5 years.


Then I took a period of 30 minutes and a short period of 1 month for 20 currency pairs (the idea is to update the optimisation every week and introduce new updated parameters).

I put them to trade on a demo account.

At the moment they are trading at a loss.


CONCLUSION: In my opinion, the idea of the Expert Advisor is very good, but it needs one final tweak to make it an autonomous stock trading robot.

The problem is that the market changes. Some time a currency pair is trending up, some time it is trending down, but the EA trades the same way and does not change its trading style.

This can be seen on the charts. Steady growth is replaced by an equally steady decline, and then vice versa. As a result, EURUSD has been in a small plus for 5 years.

That is, the Expert Advisor is very profitable for some trading conditions, but unprofitable for other trading conditions.


PROPOSAL:

1) It is necessary to introduce the concept of trend in this Expert Advisor and open trades only in the direction of the trend. The trend can be defined by Parabolic with the time interval for Parabolic changed in the settings.

For example, for trading on a 4 hour chart, the trend direction can be taken from Parabolic (1 day), for trading on a 1 hour chart, it may be better to check the trend of Parabolic on a 4 hour chart, etc.

The exact answer to the question of which Parabolic chart the Expert Advisor should check with when trading on each time frame can only be given by optimisation.

2) It is necessary to introduce the possibility of selecting the trading direction manually (Only Long / Only Short / Long and Short for automatic trading).


QUESTION:

Could you put this idea into practice?

 
Pavel Buglak:

***

The problem is that the market is changing. Some time a currency pair is trending up, some time it is trending down, but the Expert Advisor trades the same way and does not change its trading style.

This can be seen on the charts. Steady growth is replaced by an equally steady decline, and then vice versa. As a result, EURUSD has been in a small plus for 5 years.

I.e. the Expert Advisor is very profitable for some trading conditions, but unprofitable for other trading conditions.

***


That's exactly right. The market changes. Something like seasons: winter, spring, summer and autumn.


Pavel Buglak:

***

PROPOSAL:

1) It is necessary to introduce the concept of trend in this EA and open trades only in the direction of the trend. The trend can be defined by Parabolic with the time interval for Parabolic changed in the settings.

For example, for trading on a 4 hour chart, the trend direction can be taken from Parabolic (1 day), for trading on a 1 hour chart, it may be better to check the trend of Parabolic on a 4 hour chart, etc.

The exact answer to the question of which Parabolic chart the Expert Advisor should check with when trading on each time frame can only be given by optimisation.

2) It is necessary to introduce the possibility of selecting the trading direction manually (Only Long / Only Short / Long and Short for automatic trading).

***


The devil lies in the details :) . " ... trend direction can be taken from Parabolic..." - what does it mean to take? Comparing the indicator on bar#0 to the weaving price? Comparing the indicator on bar#0 with the indicator on bar#1?

And so on and so forth.



Pavel Buglak:

***

QUESTION:

Could you put this idea into practice?


I think it can be done. But not this time and not with this code. I consider this code already completed and not subject to modifications.

 

Thanks for the answer.

It's a shame you don't want to finish it.

So far I have figured out how to use this code.


1) I took and commented out the fragment in your code responsible for opening trades upwards and called it "...._short", i.e. opening trades downwards only.

I did the same for up trades and saved it to another file called "....._long".

2) Next, I opened a 30 minute time chart for 20 currency pairs.

3) The trend direction of each currency pair at the moment I look at the weekly Parabolic chart for that currency pair.

4) I put the Expert Advisor "...._short" or "....._long" into the strategy tester, depending on the trend of the currency pair at the moment.

5) On the weekly chart, I choose the period when the rate of this currency pair was rising or falling (the longer the period, the better).

6) I run optimisation for this particular period of falling or rising of the currency pair.

7) I enter the obtained data into the parameters of your EA ("...._short" or "....._long") and start trading this currency pair on a demo account.


At the moment I have already modified about 14 currency pairs in this way (out of 20 currency pairs).


Several positions have already been opened and now all of them are TRADING IN PLUS!!!!

I'll trade for a week or two, I'll see...

And if everything goes well, then maybe I can earn a little :)


So think about it, maybe you can still modernise your excellent Expert Advisor....