Experts: Bands 2

 

Bands 2:

A trading system based on indicator iBands (Bollinger Bands, BB). Placing pending Buy Stop and Sell Stop within a specified time interval (from XX o'clock to YY o'clock).

Author: Vladimir Karputov

 

hello @Vladimir Karputov

good work, thanks, but is there a typo in the code i guess?


if i select stop loss type moving average it will use bollinger bands instead, pls fix it thx


wrong:


case sl_ma:
sl_buy_stop = bands_lower+i*ExtStep;
sl_sell_stop= bands_upper-i*ExtStep;
break;
case sl_bands:
sl_buy_stop = ma+i*ExtStep;
sl_sell_stop= ma-i*ExtStep;


the case statements should be swapped!

correct i guess is if you swap the case statements, right?!


can you maybe please fix this? thanks and btw a breakeven option would be cool to have, if you can add this and have time for it we would appreciate it!

 
someone :

hello @Vladimir Karputov

good work, thanks, but is there a typo in the code i guess?


if i select stop loss type moving average it will use bollinger bands instead, pls fix it thx


wrong:


case sl_ma:
sl_buy_stop = bands_lower+i*ExtStep;
sl_sell_stop= bands_upper-i*ExtStep;
break;
case sl_bands:
sl_buy_stop = ma+i*ExtStep;
sl_sell_stop= ma-i*ExtStep;


the case statements should be swapped!

correct i guess is if you swap the case statements, right?!


can you maybe please fix this? thanks and btw a breakeven option would be cool to have, if you can add this and have time for it we would appreciate it!

Sorry, you can change the code yourself. This project is outdated and closed.

 

hello, the code has a bug, please fix it.if i select sl type bb it uses sl type ma instead.


@Vladimir Karputov

wrong: case sl_ma:
sl_buy_stop = bands_lower+i*ExtStep;
sl_sell_stop= bands_upper-i*ExtStep;
break;
case sl_bands:
sl_buy_stop = ma+i*ExtStep;
sl_sell_stop= ma-i*ExtStep;
05:14
correct i guess is if you swap the case statements, right?!
 
someone:

hello, the code has a bug, please fix it.if i select sl type bb it uses sl type ma instead.


@Vladimir Karputov

wrong: case sl_ma:
sl_buy_stop = bands_lower+i*ExtStep;
sl_sell_stop= bands_upper-i*ExtStep;
break;
case sl_bands:
sl_buy_stop = ma+i*ExtStep;
sl_sell_stop= ma-i*ExtStep;
05:14
correct i guess is if you swap the case statements, right?!

Forum über Handel, automatische Handelssysteme und Strategietests

Expert Advisors: Bands 2

Vladimir Karputov, 2020.05.24 16:52

Entschuldigung, Sie können den Code selbst ändern. Dieses Projekt ist veraltet und abgeschlossen.


 
Vladimir Karputov:

hi,


sorry i am focusing on other projects and im not experienced with mql programming, maybe someone else can help us or if you have time again you can do it, thx!

 
An optimal code for learning commands and improving the performance of personal strategies.