• Overview
  • Reviews (1)
  • Comments (17)
  • What's new

Break Bollinger Bands Martingale

The Break Bollinger Bands Martingale Expert Advisor is a part of the series "Simple trade strategies based on moving averages". Here you can find a short description of it. For more information on how to use this Expert Advisor please visit my blog TRADING WAY.

The standard Bollinger Bands indicator is used for generating signals. All operations are performed according to formed bars on the current timeframe.

This EA version includes an option for moving the protective Stop Loss to the breakeven level. You an also enable the Martingale type position volume control position, i.e. if a trade is losing, the next one is opened with the volume of the loss trade multiplied by the factor specified in external parameters.

The EA can be used for semiautomatic trading. You can open a position manually and let the EA maintain it. Since martingale based trading can be dangerous, you can close the position manually when the current profit is more than past losses.


The list of Expert Advisor parameters:

  • Indicator Period – period of the Bollinger Bands indicator.
  • Deviation – this parameter sets up a deviation of the channel borders of the Bollinger Bands indicator.
  • Mode Break – breakthrough mode. You can set up a breakthrough inside the channel (BREAK IN) and out of the channel (BREAK OUT).
  • Take Profit – distance in points from an entry point to the level of fixing a profit. If you set a zero value, the level of fixing a profit will not be set.
  • Stop Loss – distance in points from an entry point to the protection level. If you set a zero value, the protection level will not be set.
  • Trailing Stop – step in points used for modification of the protection level in the profitable direction. The level is calculated using maximums (High) for Sell positions and minimums (Low) for Buy positions. If you set a zero value, modification of the protection level will not be performed.
  • Reverse – in this parameter, one can specify if positions will be reversed in case an opposite signal appears.
  • Break Even Stop Loss - distance in points that a price should pass to set the Stop Loss to breakeven. A value of zero disables this feature.
  • Break Even Offset - a distance in points at which Stop Loss will be placed in the breakeven level relative to the current position price.
  • Lot – position volume.
  • Martingale Coefficient - if a position is losing, the next one will be opened with a volume multiplied by this coefficient. If the value is less than or equal to 1, then the position volume is equal to that specified in the Lot parameter.
  • Initial Deposit - in this parameter, one should specify a value of the deposit starting from which the volume for positions will be calculated dynamically. This allows the EA increasing the profit faster. Zero value disabled the dynamic lot.
  • Maximum Lot Size - here one should specify the maximum value for positions opened. Probably, once you reach a certain size of the deposit it is better stop calculating the lot proportionally. Some traders use this tactics for aggressive increasing of deposit starting with a small amount of money, but then switching to a more conservative trading keeping the risk a low level.


Conditions:

A signal to open a position is true if the following conditions are fulfilled (the example if for a breakthrough inside the channel):

For a BUY position:

  • Crossing the upper border of the channel upward.

For a SELL position:

  • Crossing the lower border of the channel downward.

In this mode (BREAK OUT) we exit from a SELL position if the price crosses the middle of the channel upward or in case Stop Loss/Take Profit triggers.

In this mode (BREAK OUT) we exit from a BUY position if the price crosses the middle of the channel downward or in case Stop Loss/Take Profit triggers.


Additional parameters and features:

The Expert Advisor has two additional parameters:

  • On/Off Info Panel – enables/disables the informational and trading panel on the chart.
  • Setting "On The Fly" – enables/disables the possibility to adjust parameters using the informational and trading panel.

Several Expert Advisors from this series can be attached to different charts (symbols) without causing any conflicts in their operation.

Find below one of the Break Bollinger Bands Martingale testing results. You can also use a custom optimization criterion (Custom Max). I will not disclose its formula here.

You can have the same result on the H4 timeframe, EURUSD with the default settings.
Matteo Pedroni
210
2014.10.01 16:51 
 

I am using this ea on live account from the last week of September. It has already paid for itself. I have not found any relevant bug.

So far so good? Why not 5 stars?

The Information panel has a visualization issue: does not properly display the 2 decimals of the deviations.

The EA calculate the lot size, when martingale is applied, looking at past account history. If your account is not clean the first lot could be larger than expected. There is not an option to ask ea to reset and ignore the previous history.

Messages from the EA (in the Expert Panel) as the Developer blog are in Russian language only.

There are other function that could be added to improve the EA effectiveness, but for the price maybe is asking too much.

Version 3.0 - 2014.10.27
Added the Tick Mode external parameter, using which you can select the most accurate mode for trailing stop and moving stop loss to breakeven.

By default the Tick Mode is disabled (set to false), and the trailing stop is calculated based on the High/Low of a complete bar, while conditions for moving SL to breakeven are checked with every new formed bar. If the Tick Mode is on (true), conditions for trailing stop and breakeven are checked with every tick.
Version 2.0 - 2014.06.20
Added two input parameters to extend the money management capabilities:

- Initial Deposit - in this parameter, one should specify a value of the deposit starting from which the volume for positions will be calculated dynamically. This allows the EA increasing the profit faster. Zero value disabled the dynamic lot.
- Maximum Lot Size - here one should specify the maximum value for positions opened. Probably, once you reach a certain size of the deposit it is better stop calculating the lot proportionally. Some traders use this tactics for aggressive increasing of deposit starting with a small amount of money, but then switching to a more conservative trading keeping the risk a low level.