Breakthrough

25 May 2017, 09:35
Konstantin Kulikov
13
5 880

MT4 version:  https://www.mql5.com/en/market/product/23001

MT5 version:  https://www.mql5.com/en/market/product/52858


Description  of parameters for EA

  • ==== GMT and DST ====
  • GMT_Offset_Manual - the value of the difference between your broker's server time and GM(during testing establish value for the winter period);
  • GMT_Offset_AUTO - enable/disable automatic detection GMT Offset, based on the local computer time (in the Strategy Tester does not define);
  • Adjust_DST_select - enable/disable Daylight Saving Time correction (for the Strategy Tester);
  • ==== Lot and MM ====
  • Use_Fix_Lots - enable/disable a fixed trading lot;
  • Value_fixed_Lot - the value of the fixed lot;
  • Use_MM_1 - enable/disable the lot value based on balance;
  • Funds_for_001_Lot - amount of funds for 0.01 lot;
  • Use_MM_2 - enable/disable the lot value as a percent of deposit based on StopLoss;
  • Risk_Percentage - percent of deposit for lot value calculation;
  • Use_MM_Reg_1 - enable/disable recovery money management 1 (trading lot will not decrease in case of drawdowns);
  • Funds_for_001_Lot_Reg - amount of funds for 0.01 lot;
  • Use_MM_Reg_2 - enable/disable recovery money management 2 (trading lot will not decrease in case of drawdowns);
  • Risk_Percentage_Reg - percent of deposit for lot value calculation;
  • On/Off_Lot_Min_for_MM_Reg - enable/disable setting the minimum trading lot for the recovery MM_1 or MM_2;
  • Value_Lot_Min_for_MM_Reg - minimum trading lot for the recovery MM_1 or MM_2;
  • Lot_calculation_based_on - lot calculation based on balance or equity;
  • Lot_calculation_with_rounding - use rounding when calculating a trading lot (more aggressive lot calculation, to accelerate the increase in balance);
  • ==== Grid and Martingale ====
  • Use_Grid_mode - on/off mode "Grid and Martingale";
  • Multiplier_of_trade_Lot - multiplier for a trading lot when opening a new position in the positions grid;
  • Signal_Only_for_First_Transaction - use opening logic only for the first position in the positions grid;
  • Min_minuts_pause_between_positions - minimum pause in minutes between opening of positions;
  • Multiplier_of_Min_minuts_pause - multiplier for Min_minuts_pause_between_positions when opening the next position;
  • Min_pips_between_positions - minimum difference of the prices of opening in points, necessary for opening of the new position;
  • Multiplier_of_Min_pips_between_positions - multiplier for Min_pips_between_positions when opening the next position;
  • Close_positions_at_percentage_of_loss - percentage of floating loss from the balance at which all positions are closing;  0 - disabled;
  • Total_open_transactions -  the maximum number of simultaneously open positions with magic numbers "magic_block" for a chart symbol;
  • ==== Days without Trade ====
  • Use_Holidays_Pass - not to trade in the period of holidays which is set by means of parameters: Month_start_Holidays, Day_start_Holidays, Month_end_Holidays, Day_end_Holidays;
  • use_Date_Holidays - not to trade in days of holidays which are set in line Date_Holidays;
  • Number_Start_Month - not to trade the number of days at the beginning of a month;
  • Number_End_Month - not to trade the number of days at the end of the month;
  • ==== Record of deals in the file ====
  • Record_Deals - enable/disable recording of Expert Advisor operation details to a file;
  • Name_File - file name for record;
  • ==== News Filter ====
  • Use_NewsFilter - to use the filter of news;
  • Pass_of_News_else_Trade_at_News - if "true" then not to open the transaction in the set time intervals with news; if "false" then to open transactions only in the set time intervals with news;  
  • News_All_countries - take into account the news of all countries;
  • News_USA - take into account the news of the USA;
  • News_Europe - take into account the news of the Eurozone and the UK;
  • News_currency_pairs - take into account the news for the current charts currency pair;
  • News_currency_string - take into account the news for the currencies which are registered in a line News_currency_str;
  • IncludeHigh - consider news of high importance;
  • MinsBeforeHigh - the number of minutes before the release of high-priority news to disable opening of transactions; 
  • MinsAfterHigh - the number of minutes after the release of high-priority news to disable opening of transactions;
  • IncludeMedium - consider news of moderate importance; 
  • MinsBeforeMedium - the number of minutes before the release of medium-priority news to disable opening of transactions; 
  • MinsAfterMedium - the number of minutes after the release of medium-priority news to disable opening of transactions;
  • IncludeLow - consider news of low importance; 
  • MinsBeforeLow - the number of minutes before the release of low-priority news to disable opening of transactions; 
  • MinsAfterLow - the number of minutes after the release of low-priority news to disable opening of transactions;
  • IncludeSpeaks - take into account news-speeches;
  • SpeaksHigh - take into account news-speeches of high importance;
  • SpeaksMedium - take into account news-speeches of medium importance;
  • SpeaksLow - take into account news-speeches of low importance;
  • MinsBeforeSpeaks - the number of minutes before the release of news speeches of any importance, to disable opening of transactions;
  • MinsAfterSpeaks - the number of minutes after the release of news speeches of any importance, to disable opening of transactions;
  • Skip_American_Holidays - if true, it will not open trades on American holidays;
  • ==== Basic Strategy choice ====
  • Breach_else_Channel - if "true", then is used the strategy of "Breach"; if "false", then is used the strategy of "Channel";
  • ==== block A and block B ====
  • Use_Block_A - enable/disable block A; 
  • comment_block_A - a comment to the EA's trades of block A;
  • magic_block_A - a unique magic number for the EA's trades of block A;
  • Parametr_A_1 - parametr A1 for optimization of the block B (range of values: from 1 to 25);
  • Parametr_A_2 - parametr A2 for optimization of the block B (range of values: from 1 to 25);
  • Use_Block_B - enable/disable block B;
  • comment_block_B - a comment to the EA's trades of block B;
  • magic_block_B - a unique magic number for the EA's trades of block B;  
  • Parametr_B_1 - parametr B1 for optimization of the block B (range of values: from 1 to 25);
  • Parametr_B_2 - parametr B2 for optimization of the block B (range of values: from 1 to 25);
  • ==== Common parameters ====
  • BUY_orders - to open a buy orders;
  • SELL_orders - to open a sell orders;
  • Slippage - allowable slippage in points (on Market Execution is not affected);
  • Max_Spread_Open_for_BUY - maximum spread when opening a buy trade in points;
  • Max_Spread_Open_for_SELL - maximum spread when opening a sell trade in points;
  • Max_Spread_Close_for_BUY - maximum spread for closing a buy trade in points;
  • Max_Spread_Close_for_SELL - maximum spread for closing a sell trade in points;
  • Close_for_Any_Spread_at_Pips_Profit - the number of points in the profit (taking into account the current spread), at which the order is closed (at the close signal) for any spread, is valid for a value greater than 0;
  • TakeProfit_Hide - virtual Take Profit hidden from a broker in points;
  • StopLoss_Hide - virtual Stop Loss hidden from a broker in points;
  • Duration_Pause_Minut_at_SL_Hide - pause duration in minutes when StopLoss_Hide is triggered;
  • Use_safety_SL_and_TP - enable/disable the use of safety Stop Loss and Take Profit in order to limit losses should the terminal be off for a long time;
  • TakeProfit_Safety - Safety (real) Take Profit in points (TakeProfit_Safety has to be more TakeProfit_Hide);
  • StopLoss_Safety - Safety (real) Stop Loss in points (StopLoss_Safety has to be more StopLoss_Hide);
  • Minimum_Duration_of_deal_in_seconds - minimum time of life of an open position in seconds, works at value more than 0;
  • Minimum_Pips_at_Profit - the minimum number of profit points for closing a positive transaction;
  • Minimum_Pips_at_Profit_2 - the minimum number of profit points for closing a positive transaction, which starts from "number_of_H1_bars_to_activate_MPP2" (0 - disabled);
  • number_of_H1_bars_to_activate_MPP2 - number of the hourly bar after opening a deal, from which "Minimum_Pips_at_Profit_2" starts to operate (0 - disabled);
  • Close_Loss_only_by_SL - closing of negative trades only by StopLoss (virtual or real);
  • Total_deals_of_line_magics_for_one_symbol - the maximum number of simultaneously open positions with magic numbers from "Line_Magics" by the chart symbol; valid for values greater than 0; this parameter limits the opening of the first position and does not limit the opening of averaging positions.
  • Total_deals_of_line_magics_for_all_symbols - the maximum number of simultaneously open positions with magic numbers from "Line_Magics" for all symbols; valid for values greater than 0; this parameter limits the opening of the first position and does not limit the opening of averaging positions.
  • Total_deals_for_one_symbol_so_as_not_to_open_new_symbol - the maximum number of simultaneously open positions with magic numbers from "Line_Magics" for any one symbol, at which the first positions will not be opened for other symbols; valid for values greater than 1. 
  • Total_deals_with_one_currency - the maximum number of simultaneously open positions with the same currency (not a pair, but a currency); positions with magic numbers from "Line_Magics" are taken into account; valid for values greater than 0; this parameter limits the opening of the first position and does not limit the opening of averaging positions.
  • One_currency_for_one_direction_only - if "true", then "Total_deals_with_one_currency" considers only the same trading direction for each currency.
  • Line_Magics - line of magic numbers of positions; if empty, then the number of open positions is calculated for all (any) magic numbers.
  • Number_Minutes_and_Closing_Max_Bar - the number of minutes from the opening of trading on Monday, after which the position will be closed if the price is maximum (0 - disabled);
  • Number_Minutes_and_Closing_Medium_Bar - the number of minutes from the opening of trading on Monday, after which the position will be closed if the price is not lower than the average value (0 - disabled);
  • ==== TIMING ====
  • GMT_Open_Trade_Hour - hour to start opening of transactions, GMT;
  • GMT_Open_Trade_Minute - minute to start opening of transactions, GMT;
  • Period_Open_in_minute - time duration for opening of transactions in minutes;
  • GMT_Open_Pause_Hour - hour to start a pause in opening of transactions, GMT;
  • GMT_Open_Pause_Minute - minute to start a pause in opening of transactions, GMT;
  • Period_Pause_in_minute - pause duration in minutes
  • Sunday_Trade - to allow trade on Sunday;
  • Monday_Trade - to allow trade on Monday;
  • Tuesday_Trade - to allow trade on Tuesday;
  • Wednesday_Trade - to allow trade on Wednesday;
  • Thursday_Trade - to allow trade on Thursday;
  • Friday_Trade - to allow trade on Friday;
  • Saturday_Trade - to allow trade on Saturday;
  • Use_Not_Closing_Time - activate position closing time only for real SL and real TP (without other EA closings);
  • Not_Closing_Hour_GMT - start hour for "Use_Not_Closing_Time", GMT;
  • Not_Closing_Minute_GMT - start minute for "Use_Not_Closing_Time", GMT;
  • Period_Not_Closing_in_minute - duration in minutes for "Use_Not_Closing_Time";
  • Only_for_negative_positions - apply "Use_Not_Closing_Time" only to positions in the negative zone;
  • Reconfiguration_Time - to shift "GMT_Open_Trade_Hour" and "GMT_Open_Pause_Hour" on a number of hours ("Offset_Hours") in the period of time determined by parameters ("Month_start_RCT", "Day_start_RCT", "Month_end_RCT", "Day_end_RCT");
  • Offset_Hours - time shift of work of the expert in hours;
  • Month_start_RCT - month of the beginning of shift of work of the expert;
  • Day_start_RCT - day of the beginning of shift of work of the expert;
  • Month_end_RCT - month of the end of shift of work of the expert;
  • Day_end_RCT - day of the end of shift of work of the expert;
For ease standard points are always indicated in the parameters (by the 4th digit). On five-digit brokers points are recalculated automatically.


Highlights to pay attention to

1. During live operation of the expert the GMT offset parameter is determined automatically based on local time of the computer (GMT_Offset_AUTO=true).

This parameter provides synchronization of the expert settings with the MetaTrader server time.

To ensure the correctness of settings it is necessary:

  • compare the GMT time in the expert info area on the chart of currency pair, to which the expert is attached, with http://time.is/GMT (or other reliable source).
  • If the values do not match, then set GMT_Offset_AUTO=false and set a value of GMT_Offset_Manual according to the instructions in https://www.mql5.com/en/blogs/post/682539

2 . In order to activate the News filter function, enable "Allow WebRequest" and add https://ec.forexprostools.com/ to the URL list for WebRequest.

To do this, open Tools > Options > Expert Advisors. Check the option "Allow WebRequests for listed URL:". Add https://ec.forexprostools.com/ and click OK.

3. By default, in the expert settings, the trading lot size is set to 0.01 for every 100 units of balance.

After testing on real accounts this parameter can be changed depending on your preferences. I recommend using a fixed lot (Use_Fix_Lots) or a recovery money management (Use_MM_Reg_1 or Use_MM_Reg_2).

4.  The expert works the same on any timeframe, as it automatically takes the necessary data from several timeframes.

Because the EA uses several timeframes for analysis, then for backtesting it is necessary that quotes of all timeframes (M1, M15, M30, H1, H4) be downloaded to the terminal. At the same time, the backtest itself is produced on the M1 timeframe.

5. The EA logs information on spread, slippage and other useful information when performing trades, and also when it is possible to make trades.

To write this information, set the parameter Record_Deals = true;

To view this information:

  • go to MQL4/Files in the terminal folder and open the corresponding file (this action can be made in time which is not coinciding with time of opening of transactions by the expert and when there is no open transactions of the expert);
  • after viewing, close the file (so that the expert could write down information further).

6. If you use an expert on different currency pairs, then there is no need to change the magic numbers ("magics"), since the expert identifies the transactions simultaneously by magic number and by currency pair.


frequently asked question

  • What has caused distinction of transactions on accounts of different brokers? First, different brokers have a different behavior of change of spread value. I.e. spread values at different brokers change in different timepoints and on the different number of points. Secondly, different brokers have different suppliers of quotations. I.e. quotations at different brokers can differ a little. Closing times on Friday and opening trades on Monday may differ by several minutes with different brokers. 

Settings for EA, as in a signal, and instructions can be downloaded here:   https://www.mql5.com/en/blogs/post/747929


Share it with friends: