Problem with Bollinger bands on real data

To add comments, please log in or register
indigo79
294
indigo79  

Hi there,

I created my first expert advisor ( I'm an experienced programmer but new to mql5 ) and it performs very well on the strategy tester making lots of profit. However, when I use it on my demo account it quickly makes a loss and never even looks like making a profit. I'm using the Bollinger bands indicator in my code. I'm just wondering if anyone could give me an idea why it would do poorly on real data? The code I wrote buys when the Ask is below the bottom bollinger band and sells when the Bid is above the top bollinger. It closes all buys when the Bid is above the middle band and all sells when the Ask is below the middle. I can post the code if necessary.

Thankyou,

Michael.

Enrique Dangeroux
567
Enrique Dangeroux  

The problem is not with the bollinger bands. 

You need to study the working of the strategy tester and the different test modes (Open prices/1M OHLC/Real ticks), all will show different results.

Also you code logic needs to be compatible with the mode you use for testing, for it to bear any resembling to reality. For example, if your code logic runs on each tick, testing on Open prices or 1M OHLC is useless.

Enrique Dangeroux
567
Enrique Dangeroux  
adadad:
https://www.mql5.com/en/blogs/post/-

Read this

The blog is a nothing but promotional article. It useless and explains zero. 

William Roeder
19852
William Roeder  
adadad: https://www.mql5.com/en/blogs/post/704853
Please use the link button Use the link button See the difference? https://www.mql5.com/en/blogs/post/704853
          Messages Editor
ARTAWIDI
39
ARTAWIDI  
Enrique Dangeroux:

The blog is a nothing but promotional article. It useless and explains zero. 

For newbie as myself, its explain a lot
ARTAWIDI
39
ARTAWIDI  
whroeder1:
Please use the link button See the difference? https://www.mql5.com/en/blogs/post/704853
          Messages Editor
Sorry use mobile phone for reply, there is no option like that in mobile version
Anthony Garot
3625
Anthony Garot  
indigo79:

I'm just wondering if anyone could give me an idea why it would do poorly on real data?

Past data doesn't predict the future.

Look up the terms:  

  • Look-ahead bias
  • Survivorship bias
  • Data-snooping bias

Any, or all, of these may be the problem.

indigo79
294
indigo79  
Thankyou for your replies. Indeed the issue is with the different test modes and when I use real tick data the EA performs differently, and poorly, as do all of my EAs. I'm now wondering if I can make any EA successful. I've tried many indicators and none of them do any better than a few hundred pounds a month. Thankyou again.
Enrique Dangeroux
567
Enrique Dangeroux  

Well don't give up. Get to understand the why and how, and you will understand the tools and knowledge about how to use them.

Focus on not losing vs chasing the profits from tester. One can not withdraw tester dollars nor demo dollars. It is not real.

Also try to avoid indicators. Use price. Most if not all Indicators calculate on certain time frame it will only distort time/price. It is price you are trading, not indicators.

indigo79
294
indigo79  
Thankyou Enrique :)
To add comments, please log in or register