The Martingale EnvBBrsi Expert Advisor trades using the signals of the following indicators: Envelopes, Bollinger 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_5, Risk_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.
- 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!
- 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.
-EnvBB_Strategy_Breakdown = true;
-EnvBB_Strategy_Rebound = true.
-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;
-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).
- 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.