Requests & Ideas (MQL5 only!) - page 13

 
Vladimir Karputov:

To avoid too close deals, take the parameter "Minimum distance":



Fractals minimum distance (final version).

In the input parameters there are two parameters that make it easy to configure:
  • Distance (in pips)
  • and Signal bar

Example of the test for USDJPY, H1 from 2014.01.01 to 2017.05.14:

Fractals minimum distance USDJPY

 
Vladimir Karputov:

Bollinger Bands N positions version 1.001:

Now restriction for quantity of positions works.


I haven't decided yet how to close positions...


for closing positions : 

you can consider the middle band as the TP, or TP could be the lower time frame middle band , for example if ea opened a position in H1, then the TP would be the middle band touch of 15 min timefram, 

 
Vladimir Karputov:

Bollinger Bands N positions version 1.002 (final version):

  • We work on a new bar
  • There are no restrictions on the number of positions
  • If we get BUY signal - then we close all positions of SELL
  • If we get the signal SELL - then close all BUY positions
  • Before each opening, we check the equity with a double lot


this EA opens positions on the bar that is opened outside of the Bollinger Bands, but i guess can get better result if change the code in a way which it opens positions when the bar just touch the Bollinger Bands Upper and Lower band, and also change the parameters to period 26 and deviation of 3

thank you  

 
Fafar.forex:


this EA opens positions on the bar that is opened outside of the Bollinger Bands...


That's right, since we are looking for the moments when the price breaks the indicator:

   double UPPER=iBandsGet(UPPER_BAND,0);
   double LOWER=iBandsGet(LOWER_BAND ,0);

   if(!RefreshRates())
     {
      dtPrevBars=iTime(1);
      return;
     }

   if(m_symbol.Bid()>UPPER)
     {
      ClosePositions(POSITION_TYPE_BUY);
      OpenSell();
      return;
     }
   if(m_symbol.Ask()<LOWER)
     {
      ClosePositions(POSITION_TYPE_SELL);
      OpenBuy();
      return;
     }
 
Vladimir Karputov:


That's right, since we are looking for the moments when the price breaks the indicator:


this is the exact code you used in the final ea right ? 

can you change the code somehow that when price touches the band then it opens position ? 

 
Fafar.forex :


this is the exact code you used in the final ea right ? 

can you change the code somehow that when price touches the band then it opens position ? 


What do you mean "touches"? Describe it. Show the picture.
 
Vladimir Karputov:


That's right, since we are looking for the moments when the price breaks the indicator:


and could you please add an int that we can change the maximum number of open position at the same time manually ?

this is only for handling the drawdown

thnx 

 
Fafar.forex :


and could you please add an int that we can change the maximum number of open position at the same time manually ?

this is only for handling the drawdown

thnx 


Drawdown on funds is controlled not by the number of positions. We need to manage money. For example: 

Money Management classes

 
Vladimir Karputov:

What do you mean "touches"? Describe it. Show the picture.

and all the similar points as in picture, when price reaches as the same number of bollinger band upper and lower 
Files:
1.PNG  30 kb
 
Vladimir Karputov:

Drawdown on funds is controlled not by the number of positions. We need to manage money. For example: 

Money Management classes


that's even better, CMoneyFixedLot i think this is what i want to be added ! 
Reason: