Bollonger bands based EA

 

Hi there!

Let me introduce the my EA based on Bollinger's bands (BB). The main idea is to buy when main BB is crossed by price bottom-up and vice-versa, - to sell when price crosses BB's main line top-down.

We have here some stops and limiters: there are addition levels that should prevent us to open position when price crossed BB main line by accident (levels 0.05/-0.05, 0.05 means 5 % of difference between BB's high and main lines), levels called h2 (0.4/-0.4) are StopLoss levels, h3 is TakeProfit: if you bought, the level -0.4 would be a StopLoss, and TakeProfit would be placed on level h3 (may be more or less than h2).

Also there is a limiter by market's volatility: the difference between level h3 and BB's main line is called delta, I set up high and low values (delta_h and delta correspondingly). EA cannot open new position if current “delta_h” is more or “delta” is less than predefiend values.

There is also trailing module that should control open position. If you opened posiion (buy for example), the stoploss would be set to the -h2 and takeprofit to the h3. SL level would be set to the “sl_dist1” level later on, if profit reached “sl_level1”, the “sl_dist2” level would be applied, and so on. No changes should be applied to the TakeProfit.

Again, I set here money management module, that calculates last consecutive loss/profits and has separate value for each progression. For example, if we have a progression that consists of last 5 wins/losses, the “prk5” will be used as the volume of new position. All “prk” are set to the 0.01 lots by default.

The main difficulty I've been facing during the optimization process is the not so good results when was tested on the data that were out of recall.

Please post your ideas/suggestions to this thread or PM me

Files:
 

trade's screen

Please see this screen shot that may help you to get how it works.

Thank you.

Files:
gbpusdm60.gif  41 kb
 

Pls disregard one

Files:
gbpusdm60.gif  41 kb
 

hi dealstone, thanks for sharing your EA.

can you please post the setting file of the sample Images in the first post?

and also the "StrategyTester.htm" please.

 

It's very good,thank you.

Does your ea have time limited?

thanks

 

Hi guys!

Please see StrategyTester.htm, image and .set file attached, it was being optimized during Oct 2007 - May 2008 with the settings that you can find out in .set file, there was enabled "Long & short positions" option.

In regards to the used timeframe - I prefer the H1, however I think that more timeframes may and should be tested, at least M30, H4.

Thank you.

Best,

Dealstone.

 

There are a couple raw ideas that can be implemented:

- to divorce long and short positions, to use different settings buying and selling;

- to calculate approx profit positions' lifetime and close them by the time.

Any ideas/comments ?

 

Hi Dealstone,

The EA is crushing my MT platform. What could be the reason? Thanks.

 

Thanks for sharing, i've never think of breakout BB strategi before...hmmm when i see your rules strategy, its open my eyes clear now... thanks again

correct me if i'm wrong, your strategy based on breakout center line of BB, right?

 

Hi again!

Thanks to everyone who is interested in improvement of this EA !

Roger_Taum, I did not get clearly what had happened, code page does not have any command/include that could break your trading platform. Please specify the issue you experienced, maybe screenshot will be needed.

MANSTIR, you are right, it will open position once the central (main) line is broken. The trade will start, if iHIGH values of 2 last bars iHigh(1) && iHigh(2) are less than first level (usual, first levels are +-10% of BB_HIGH-BB_MAIN, i.e. of half a Bollinger bands' channel) - for buying; sure, it should check iLow of last 2 bars and (-10%) control line for selling.

Regards,

Dealstone.

 
dealstone:
Hi again!

Thanks to everyone who is interested in improvement of this EA !

Roger_Taum, I did not get clearly what had happened, code page does not have any command/include that could break your trading platform. Please specify the issue you experienced, maybe screenshot will be needed.

MANSTIR, you are right, it will open position once the central (main) line is broken. The trade will start, if iHIGH values of 2 last bars iHigh(1) && iHigh(2) are less than first level (usual, first levels are +-10% of BB_HIGH-BB_MAIN, i.e. of half a Bollinger bands' channel) - for buying; sure, it should check iLow of last 2 bars and (-10%) control line for selling.

Regards,

Dealstone.

GREAT! i think it wont work on M30...i'll try with H1 today...

hmmm i should suggest this ea can check M1 data too for precaution...

hope it help....

Reason: