Martingale SMA noise
Martingale SMA Noise EA trades by signals of high SMA and low SMA indicators. DB_Factor_1_to_n multiplied by "high SMA - low SMA" is applied for filtration of signals. Thus deadband zone is defined..
It enters the market by signals of high SMA and low SMA indicators. Orders are closed with profit by a signal of high SMA and low SMA indicators and the Profit_Percent_Risk parameter, or with loss by a signal of Close_position_Reverse or by stop loss. Stop loss level for the first and next orders is placed by the SL_Daily_0_to_30 (SL_Points=0) parameter or by the SL_Points (SL_Daily_0_to_30=0) parameter.
The trading volume used for opening positions depends on the following parameters: Max_order_1_to_5, Risk_Money_SL, SL_Daily_0_to_30, SL_Points and Risk_Percent_Balans_SL. Martingale system, which proportionally increases the trade volume according to set parameters, is applied when you open a trade. To set a fixed lot for the first position, you need to adjust Risk_Money_SL and SL_Points parameters and set SL_Daily_0_to_30=0 and Risk_Percent_Balans_SL=0.
The EA is optimized for EURUSD 0_00001, M30. Attach it to a chart and allow automated trading. But with proper settings it is also appropriate for any time frame and any instrument.
- Magic Uses 10 - magic number is assigned to the first trade, further trades will have Magic_index+n, where n is a number of open positions.
- Max order 1 to 5 - maximum number of open positions but not greater than 5. Martingale is applied;
- Spred Max - maximum spread if the current spread is lower than Spred Max, trading is performed;
- Risk Money SL - amount of money you can lose if stop loss triggers. The risk is calculated as a maximum value between Risk_money_SL and Risk_Percent_Balans_SL;
- Risk Percent Balans SL - percentage of risk of the deposit balance. The risk is calculated as a maximum value between Risk_money_SL and Risk_Percent_Balans_SL and used for calculating an autolot. If Risk_Percent_Balans_SL=0, the autolot is disabled;
- Profit Percent Risk - percentage of desired profit of Risk_money_SL or Risk_Percent_Balans_SL when closing a position;
- Period SMA Fast - period of high SMA and low SMA indicators (fast);
- Period SMA Slow - period of high SMA and low SMA indicators (slow);
- DB Factor 1 to n - DeadBand zone defined by the coefficient multiplied by "high SMA - low SMA";
- SL Points - stop loss in points calculated as a maximum value between SL_Daily_0_to_30 and SL_Points, if SL_Points=0, stop loss is placed by SL_Daily_0_to_30;
- SL Daily 0 to 30 - stop loss of daily High and Low levels is changed from 0 to 30, calculated as a maximum value between SL_Daily_0_to_30 and SL_Points, if SL_Daily_0_to_30=0, stop loss is placed by SL_Points;
- TS Percent maxSL - modifies stop loss in percent of the stop loss parameter;
- BE Percent maxSL - modifies stop loss into breakeven in percent of the stop loss parameter;
- Close Position Reverse - closes positions regardless the profit when a signal about trend change appears;
- Trade Opening Prices - enables/disables trading by open prices. If set to false, trading is performed on every tick;
- Independent_Trade - enables/disables the mode of simultaneous independent trading for Buy and Sell. If set to true, independent Buy and Sell trading is performed.
Be careful: Default settings are not universal. To assure correct operation of the EA you need to determine a trading product, time frame and parameters yourself!
- The Period_SMA_Fast parameter is removed. Historic_Low and Historic_High filter with Shift Back =1 is used insead.
-The Period_SMA_factor parameter is replaced by Period_SMA_Slow
-The DB_Factor parameter is replaced by DB_Factor_1 to n
-The Magic_index parameter is replaced by Magic_uses_10, it reserves 10 magic numbers. If the magic number is 1, do not use following 9 numerals for this pair in the terminal, but start with 11 etc.
-The SL_factor parameter is replaced by SL Points, which places stop loss in points calculated as a maximum value between SL_Daily_0_to_30 and SL_Points
-Added new SL Daily 0 to 30 parameter, which places stop loss of daily High and Low levels and changes from 0 to 30, calculated as a maximum value between SL_Daily_0_to_30 and SL_Points
-Added new TS_Percent_maxSL parameter, which modifies stop loss as percentage of the stop loss parameter;
-Added new BE_Percent_maxSL parameter, which modifies stop loss into breakeven as percentage of the stop loss parameter;
-Added the Spread_Max function, which allows the EA to trade if the current spread is lower than Spred_Max.
-Added the Close position Reverse function, which closes positions regardless the profit when a signal about trend change appears.
-Added the Trade_Opening_Prices function, which enables trading by open prices. Otherwise, trading is performed on every tick.
-Added new Independent_Trade function, which enables the mode of simultaneous independent trading for Buy and Sell.
-Optimized for M30 EURUSD 0.00001 2010-2015 by open prices (recommended to re-optimize for your broker and timeframe).
It defines the period of the average high SMA and low SMA factors. Previously, this parameter was bound to Period_SMA.
- Contract size is now calculated automatically for any symbol;
- Lot rounding is performed automatically during calculations;
- Fixed risk calculation for various symbols;
- Changed the default optimization parameters:
For EURUSD M30
Magic_index = 1;
Risk_money_SL = 500;
Prof_percent_SL = 10;
Max_order = 4;
Period_SMA = 72;
DB_factor = 10;
SL_factor = 10.
- Improved position step and volume setting algorithm
2) Combined Risk_money parameter (equal to Risk_money_SL for both Sell and Buy)
3) Changed Prof_money_min parameter to Prof_percent_SL (target profit in percentage of Risk_money_SL)
4) Combined Max_order parameter (equal to Max_order for Sell and Buy)
EURUSD H1 optimization parameters:
Magic_index = 1;
Digits_round_lots = 2;
Value_of_one_lot = 100000;
Risk_money_SL = 250;
Prof_percent_SL = 10;
Max_order = 3;
Period_SMA = 15;
DB_factor = 3.9;
SL_factor = 4.2.