Experts: Bollinger Bands

 

Bollinger Bands:

The Expert Advisor opens trades based on the Bollinger Bands indicator.

Author: Vladimir Karputov

 
What should be corrected in the robot code so that when it should buy it sells.
 
Vasily48:
What should be corrected in the robot code so that when it should buy it sells.

The main decision-making block is here:

   double bup=iBandsGet(UPPER_BAND,0);
   double bdn=iBandsGet(LOWER_BAND,0);
//
   if(iClose(0)>bup+(ExtBDistance*Point()))
      SELLme=true;
   if(iClose(0)<bdn-(ExtBDistance*Point()))
      BUYme=true;

And then you have to look at the errors.

 
Vladimir Karputov:

The main decision-making unit is here:

   double bup=iBandsGet(UPPER_BAND,0);
   double bdn=iBandsGet(LOWER_BAND,0);
//
   if(iClose(0)>bup+(ExtBDistance*Point()))
      SELLme=true;
   if(iClose(0)<bdn-(ExtBDistance*Point()))
      BUYme=true;

And then you have to look at the mistakes.

And why to change and it is pulling quite well.... thanks to Barabashkin....Yet favourite Martin wouldn't hurt, drawdowns are rare, but marks... Martin would make up for it...

EURUSD chart, H4, 2016.11.23:24 UTC, MetaQuotes Software Corp., MetaTrader 5, Demo

 
Сергей Криушин:

Why change it and it's pulling quite well.... thanks to Barabashkin....Yet the favourite Martin would still not prevent drawdowns are rare, but the marks... Martin would make up for it...

What programme do you use to reverse the chart? ) I have it the other way round
 
Maxim Dmitrievsky:
What programme do you reverse the chart in? ) I have it the other way round
in the same program - optimise and you will be happy... there are several options
 
Greatest, consistently profitable tests, provided testing OHLC M1, but if you choose the mode of testing on all ticks, then the Expert Advisor is sure to drain.... Tell me how to solve it in the end