Breakthrough

25 May 2017, 09:35
Konstantin Kulikov
13
6 132

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 GMT (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_arbitrary_SL_for_calc_Risk -  set an arbitrary StopLoss in the Arbitrary_SL_for_calc_Risk parameter for calculating the lot via Use_MM_2;
  • Arbitrary_SL_for_calc_Risk -  arbitrary StopLoss for calculating the size of a trading lot (it makes sense to use it in the Use_Grid_mode=true mode); 
  • Add_Recovery_for_Lots - enable/disable recovery money management (trading lot will not decrease in case of drawdowns); this setting applies to both MM_1 and 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_positions_for_one_Symbol - maximum number of simultaneously open positions for one symbol;
  • ==== Comment_and_Magic ====
  • Comment - a comment for EA positions;
  • Magic - a unique magic number for EA positions;
  • ==== Advanced position management ====
  • Advanced_position_management - apply advanced management of the number of simultaneously open positions; 
  • Position_management_for - select magic numbers to account for the number of simultaneously open positions;  
  • Line_Magics - a string for magic numbers of positions (valid for Position_management_for=Magics_from_string);
  • Total_deals_of_line_magics_for_one_symbol - the maximum number of simultaneously open positions with the specified magic numbers for one 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 the specified magic numbers 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 the specified magic numbers 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 the specified magic numbers 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.
  • ==== One or for each Symbol ====
  • Use_Symbols_from_Line - if true, trading on all symbols from the Symbols_Line line; if false, trading on the chart symbol;       
  • Symbols_Line - if Use_Symbols_from_Line=true, then trading on symbols from this line (write symbols without prefixes and suffixes);
  • Symbol_prefix - if terminal symbols have a prefix, then write it in this line;
  • Symbol_suffix - if terminal symbols have a suffix, then write it in this line;
  • ==== Trading Schemes ====
  • Trading_Scheme - setting the remaining parameters for trading (selecting a set of settings); if "Custom" is selected, the parameter values set below will be applied (they can be changed at your discretion); If any other scheme is selected (ready-made set of settings), then all the parameters below will be set automatically (based on the author's preferences).
  • ====  Basic Strategy choice  ====
  • Breach_else_Channel - if "true", then is used the strategy of "Breach"; if "false", then is used the strategy of "Channel";
  • Use_Block_A - enable/disable 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;
  • 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;
  • 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);
  • Duration_Pause_Minut_at_SL_Hide - pause duration in minutes when StopLoss_Hide is triggered;
  • Minimum_Duration_of_deal_in_seconds - minimum time of life of an open position in seconds, works at value more than 0;
  • Minimum_Duration_for_deals - selection of positions for which Minimum_Duration_of_deal_in_seconds will act;
  • 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);
  • Minimum_Pips_at_Loss - the minimum number of loss points for closing a negative transaction;
  • Close_Loss_only_by_SL - closing of negative trades only by StopLoss (virtual or real);
  • ==== 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;
  • ==== News Filter ====
  • Use_NewsFilter - to use the filter of news;  
  • Select_Site - selecting a news source;
  • 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;
  • ==== 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;
  • Every_year - apply use_Date_Holidays to all years;
  • 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;
For convenience, the standard points are always specified in the parameters (by the 4th digit). The points are recalculated automatically for five-digit values. For example, if you set 7.5 points in some parameter, then on the broker's five-digit quotes it will be 75.

‌‌


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:

  • to compare the GMT time in expert information 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.  MT5 has a built-in news calendar (Select_Site = MQL5), so no external links are required.

In order to activate the News filter function in the MT4, enable "Allow WebRequest" and add  https://nfs.faireconomy.media (for ForexFactory) or https://sslecal2.investing.com (for Investing) to the URL list for WebRequest. To do this, open Tools > Options > Expert Advisors. Check the option "Allow WebRequests for listed URL:" and add the appropriate links.

3.  Backtesting on all symbols at once (Use_Symbols_from_Line = true) is possible only in the MT5 tester. Perform backtesting on the M1 timeframe.


    frequently asked questions

    • The timeframe of the chart is any. The expert works the same on any timeframe, as it automatically takes the necessary data from multiple timeframes.
    • There are different magic numbers for different sets of settings.
    • 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. 

              

    The latest EA settings can be downloaded here:   https://www.mql5.com/en/blogs/post/747929