• Overview
  • Reviews (2)
  • Comments (5)
  • What's new

Martingale EnvBBrsi

The Martingale EnvBBrsi Expert Advisor trades using the signals of the following indicators: EnvelopesBollinger Bands (BB) and Relative Strength Index (RSI ).

It enters the market on receiving signals from Env, BB and RSI indicators. The orders are closed either by RSI signal and the Profit_Percent_Risk parameter in case of a profit, or by the Close_position_Reverse signal in case of a loss, or by a stop loss in case of a loss. The Stop Loss level for the first and next orders is set either by the SL_Daily_0_to_30 parameter, or by the SL_Points parameter or by the Env and BB indicators (SL_Daily_0_to_30=0  and SL_Points=0).

The trading volume used for opening positions depends on the following parameters: Max_order_1_to_5Risk_Money_SL and Risk_Percent_Balans_SL. Martingale system, which proportionally increases the trade volume according to set parameters, is applied when you open a trade.

The EA is optimized for EURUSD M30 0_00001. You should attach the EA to a chart and allow automated trading to let the Expert Advisor work. With proper settings, it is also appropriate for any timeframes and any instruments.


  • Magic index - magic number assigned to the first trade; Magic_index+n is assigned to next trades, where n is a number of opened positions.
Note: Regardless of the amount of opened positions set in the Max_order 1 to 5 parameter, the EA reserves 5 magic numbers. If the magic number is equal to 1, do not use the next 5 numbers with this symbol. Instead, start from 6, etc.;
  • Max order 1 to 5 - maximum amount of opened positions but not greater than 5. Martingale is used;
  • Risk Money SL - amount of money which can be lost if Stop Loss triggers;
  • Risk Percent Balans SL - risk percentage of the deposit balance. The risk is calculated as a maximum value between Risk_money_SL and Risk_Percent_Balans_SL and used to calculate an autolot; 
  • Profit Percent Risk - percentage of targeted profit from Risk_money_SL or Risk_Percent_Balans_SL  when closing positions;
  • Period EnvBB - period of the Bollinger Bands and Envelopes indicators;
  • Filter Deviat BB - Bollinger Bands indicator deviation (0 - filter disabled);
  • Filter Deviat Env - Envelopes indicator deviation (0 - filter disabled);
  • Period RSI - RSI period;
  • RSI noise 0 to 50 - RSI noise levels change from 0 to 50: upper _level=100-RSI_noise_0_to_50, lower _level=0+RSI_noise_0_to_50;
  • SL Daily 0 to 30 - stop loss by daily High and Low levels changes from 0 to 30 and is calculated as a maximum value between SL_Daily_0_to_30  and SL_Points (if SL_Daily_0_to_30=0  and SL_Points=0, a stop loss is set by BB or Env indicator parameters);
  • SL Points - stop loss in points is calculated as a maximum value between SL_Daily_0_to_30  and SL_Points (if SL_Daily_0_to_30=0  and SL_Points=0, a stop loss is set by the BB or Env indicator parameters);
  • Trailing Stop Points - trailing stop, in points; 
  • Break Even Points - move an order to breakeven, in points;
  • Close position Reverse - close positions regardless of the profit when a trend reversal signal appears.

Attention: The default settings are not universal ones. You should define an asset, a timeframe and the parameters to ensure the EA correct operation!

Eleni Anna Branou
2017.03.17 17:56 

Interesting but risky.

Ovidiu Caslariu
2016.05.07 21:45 

User didn't leave any comment to the rating

Version 1.8 - 2015.08.28
- Added new parameter Money_Minimum_Profit_Reverse, which closes an open position upon a reversal signal if the position profit exceeds the value specified in the parameter.
- Added new parameter Martingale_Trading_Signals, which activates martingale order trading based on RSI signals.
- Added a function of trading with all indicator signals disabled;
- Improved Martingale based position placing algorithm.
- Minor renaming of some parameters for better clarity.
Version 1.7 - 2015.08.17
1) Added trading signal function "Breakdown OR Rebound " if:
-EnvBB_Strategy_Breakdown = true;
-EnvBB_Strategy_Rebound = true.
Version 1.6 - 2015.08.12
-Added a new parameter: "Control_profit_martingale". Control over profitable positions placed by Martingale.
-Added parameters for selecting a trading strategy by Envelopes, Bollinger Bands and RSI;
-Removed the SL Daily 0 to 30 parameter;
-The TS_Percent_maxSL parameter is replaced by TS_Points, trailing stop in points;
-The BE_Percent_maxSL parameter is replaced by BE_Points, modifies stop loss into breakeven, points;
-Added a new function: if SL_Points=0, stop loss is placed by parameters of EnvBB indicators;
-Added a new function: if RSI_Period greater than Period_EnvBB, the EnvBB period is set by parameters of RSI_Period;
Version 1.5 - 2015.06.29
-Improved the filter of the first position entry for the bar Shift Back=1 by High and Low;
-The Trailing_Stop_Points parameter is replaced by the TS_Percent_maxSL parameter, which modifies stop loss as percentage of the stop loss parameter;
-The Break_Eve_Points parameter is replaced by the BE_Percent_maxSL parameter, which modifies stop loss into breakeven as percentage of the stop loss parameter;
-Deleted the function of placing stop loss by Env and BB (when SL_Daily_0_to_30=0 and SL_Points=0);
-Added the Spread_Max function which allows the EA to trade if the current spread is less than Spred_Max.
-Optimized for M30 EURUSD 0.00001 2010-2015 by open prices (recommended to re-optimize for your broker and timeframe).
Version 1.4 - 2015.06.19
- Added new Independent_Trade function which activates a mode of simultaneous independent trading for Buy and Sell.
- The Magic_index is changed to the Magic_uses_10 parameter. It reserves 10 magic numbers. If magic number is 1, do not use next 9 numerals for this pair in the terminal but start from 10 etc.
Version 1.3 - 2015.06.17
Added the new Trade_Opening_Prices function that enables trading by Open prices. Otherwise, trading is performed at every tick.
Version 1.2 - 2015.06.15
Improved algorithm of placing orders by Martingale, control by profit is implemented instead of control by points.
Version 1.1 - 2015.06.09
Revised the lot calculation algorithm when SL_Daily_0_to_30=0. In order to set a fixed lot for the first position, select the Risk_Money_SL and SL_Points parameters, while setting SL_Daily_0_to_30=0 and Risk_Percent_Balans_SL=0.