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.
https://www.mql5.com/en/blogs/post/-
The blog is a nothing but promotional article. It useless and explains zero.
Messages Editor
The blog is a nothing but promotional article. It useless and explains zero.
Please use the link button See the difference? https://www.mql5.com/en/blogs/post/704853
Messages Editor
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.
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.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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.