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

Break Bollinger Bands Martingale

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

The Expert Advisor can be used for semi-automated trading. Positions can be closed manually but trailed by the EA. Since the martingale method can be dangerous, you can close the position manually when the current profit becomes greater than previous losses.

Description and recommendations

  • The algorithm works on Hedge and Netting accounts. It is recommended to select parameters for each account type separately.
  • It is possible to trade and optimize the parameters in the tester on multiple symbols simultaneously.
  • The EA features a control panel for emergency closure of all open positions or only for the specified symbols.
  • In the control panel, it is possible to specify the direction to open trades for all symbols at once or for the selected symbols only.
  • The EA's graphic interface contains a table with the statistic values of last testing results and parameters used during that testing, as well as a table with the current account statistics.

Parameters of the Expert Advisor

  • Symbols - comma-separated list of symbols to be traded. If empty, only the current chart symbol will be used.
  • Start hour - hour to start trading.
  • End hour - hour to stop trading.
  • Trade weekdays - days of the week for trading.
  • Indicator period – period of the Bollinger Bands indicator.
  • Deviation – this parameter sets up a deviation of the channel borders of the Bollinger Bands indicator.
  • Tick mode - if set to true, the management of trailing stop and transfer of stop loss to breakeven will be performed and tracked by tick events.
  • Take profit – distance in points from an entry point to the level of fixing a profit.
  • Stop loss – distance in points from an entry point to the protection level.
  • 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.
  • 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.
  • Break even offset - a distance in points at which Stop Loss will be placed in the breakeven level relative to the current position price.
  • Delta – the amount of profit, after which the initial lot is increased by the specified step.
  • Start lot - initial lot.
  • Step lot - lot step.
  • Increase coefficient - averaging the position by the coefficient.
  • Martingale coefficient - if a position is losing, the volume of the next one will be multiplied by this coefficient.
  • Custom max - custom criterion for finding parameters during optimization.
  • Withdrawal - test the partial withdrawal after reaching the specified profit.
  • Stop optimization pass by DD - an optimization run is stopped if the specified drawdown is reached.

Perhaps you'll like the more advanced version of this algorithm: EDGE

NonciAzzecco 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 5.0 2018.09.16
1. The algorithm works on Hedging-accounts and Netting-accounts.
2. A lot of symbols for trading (multi-currency).
3. Time ranges for trading (start time, end time, days of the week).
4. Flexible money management system. Setting the step for increasing the volume of positions through said delta.
Version 4.0 2018.03.12
Now the algorithm works on accounts with any deal execution and order filling modes. Earlier, some of them were not taken into account.
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.