BolliToucher - Need EA - page 2

 

IMPORTANT THING: In the wffafdw EA we have to multiply all the pips settings per 10 to work with 5-digit brokers.... so, 50 pip Stop Loss we set 500.

 

Problem is in this line

if(losses>=1) lot=NormalizeDouble(lot*losses*2,1);

It is generating the wrong lot sizes

The sequence of lots have to be 1 2 4 8 16 32 64 etc...

This way we get results as if we had won all... this is the essence of martingale.

Because of the exponential risk exposition, the initial lot size have to be very small.

 

wffafdw, can you code it with only one value to Stop Loss and Take Profit? This way it will be aways the same (fitting strategy) and the optimization will be easier.

Thank you again!

NO... THINKING BETTER, it can be very useful to have both to set... we can manage risk/gain better.

 

Sorry for my poor english.

It should work in your direction if you change this line

lot=NormalizeDouble(lot*losses*2,1);

to

lot= (BaseLotSize * MathPow(LotMulti,losses=2));

you have to declare BaseLotSize as an extern var by using this:

extern double BaseLotSize= 1;

extern double LotMulti=2; (this is the factor you want to multiply with)

the problem is if you do this you can only us 1 lot as BaseLotSize. I haven`t found the solution to start with 0.1 maybe one of you can find the solution

regrads

 

Hi friends!

I made some changes based in McPiscator sugestions (thank you!!)

Now the EA works with microlots and make the correct double lots but we still have one question:

The concept is that the trades be executed AT THE MOMENT the Bollinger Bands is touched... The last version (attached) olny gets the trades when the prices closes OVER (down or high) the Band.

It would be a good feature we can choose between the two sittuations (touch bollinger band and close beyond it).

The indicator BOLITOUCHER (first post) shows exactly this... The number of trades will increase dramatically.

Thank you all and BACKTEST the robot!! The next steps after programmed will be to find the balanced settings.

Files:
 

2 types, with MM & without MM,

can u post some tester results ?

 

The Martingale function is not ok... let's work in the file sent in the previous post... Now we only need to "teach" the robot to enter when the price touches the bollinger band... I think the better way is to inform the previous candle Bands price and get the trade on it.

 

version 4 bb touches on shift bar

if(High[Shift] > BBup)

if(Low[Shift] < BBlo)

version 4 touch on curent bar, when shift must be 0

if(Ask > BBup)

if(Bid < BBlo)

version 4 close upper or lower shift bar

if(Close[Shift] > BBup)

if(Close[Shift] < BBlo)

sorry 4 my poor english

 

What is "shift bar"? i don't understand... what's your language? (poor english too )

The wanted situation is 'when a new bar is opened, the EA knows the levels of BB of previous candle and will get the trade in those prices'.

Obviously, if one trade already is running, there will not be a new one (VERY RISKY!!!).

We also can think in get the trade at the end of a bar that touched the BB... in close price. Sometimes the same bar was the TP or SL from a previous trade and will also be the entry for a new one.

 

if shift =0 touch its on curent bar, shift =1 its on last bar

hope now will be ok

Files:
Reason: