Description of the interface and parameters for EA Classic Lock

7 July 2022, 20:13
Oleksandr Vlasenko
4
674
Interface on the chart (only for real work)

If you trade a lot of intraday trades and combine automatic trading with your analysis, then it will be convenient for you to adjust the direction of the first position in a series of positions with the following buttons:
Fist BUY - only BUY for the first position in the series is allowed, SELL signals of the trading logic are ignored.
Fist ANY - BUY or SELL for the first position in the series, depending on the signal of the given trading logic.
Fist SELL - only SELL for the first position in the series is allowed, BUY signals of the trading logic are ignored.
Stop Any 1st - all signals to open the first position in the series are ignored (pause for opening new series of positions).

* These buttons are similar to the First_BUY and First_SELL EA options.
** When the Expert Advisor is reinitialized, the direction for the first position in the series is set according to the First_BUY and First_SELL parameters of the Expert Advisor (previous button presses are not taken into account).
In MT5, reinitialization occurs if you click on the expert icon on the chart and change some parameter, and in MT4 if you even just click on the expert icon on the chart without changing the parameters.
*** To be sure of the current direction for the first position in the series, take a look at the first line on the chart below the buttons:

pic1

If you do not want to wait for the opening of the first position in a series according to the specified trading logic in EA, then just use the quick open buttons:
Fast 1st BUY - instant opening of the first BUY position in the series.
Fast 1st SELL - instant opening of the first SELL position in a series.

**** The font size on the buttons can be adjusted with the TextSize_for_all_buttons parameter (if the buttons are empty, decrease this parameter).


Description of parameters

"==== Calculations by Ticks or open M1 ===="
Ticks_or_open_M1 - perform all calculations by ticks (true), or by M1 open prices (false). // For a quick initial selection of sets in the strategy tester, use Ticks_or_open_M1=false and specify the timeframe in the strategy tester as M1 (for the EA strategy, the timeframe is specified in the parameter below).

"==== Entry Signal ===="
Select_Enter_Signal - selection of trading logic for opening the first position in a series of positions.
TimeFrame_for_Strategy - timeframe for trading logic.

"==== Parameters_for_Lock ===="
Total_open_positions - the maximum number of simultaneously open positions.
Points_between_positions_and_TP - distance in standard points (1 point = 10 pips) to open a hedging position. Also, the initial hidden TakeProfit is equal to this value.
Multiplier_of_TP_for_Lock - multiplier to change the initial hidden TP with each new open position.
//With several open positions, simultaneous closing occurs when the floating profit reaches a value equal to the profit of the first position from the TP.//

"==== Lot and MM ====";
Funds_for_0,01_of_Lot - amount of funds for 0.01 trading lot for the first position in a series of positions.
Lot_calculation_with_rounding - use rounding when calculating a trading lot (more aggressive lot calculation, to accelerate the increase in balance).
Lot_calculation_based_on - lot calculation based on balance or equity.
Use_Fixed_Lots - use a fixed lot.
Value_Fixed_Lots - fixed lot size.
Multiplier_of_trade_Lot_for_Lock - multiplier for the total lot of hedging positions.

"==== Fixing losses ====" // Fixing losses, separately for each pair. //
Close_orders_at_percentage_of_loss - percentage of floating loss from the balance at which all positions are closing;  0 - disabled.

==== Common parameters (standard points) ==== // In all parameters where the values are specified in points, you need to write standard points (by the 4th digit). //
Magic_number - a unique magic number for the EA's trades.
Comment_orders - a comment to the EA's trades.
First BUY - allow opening the first BUY position in a series of positions.
First SELL - allow the opening of the first SELL position in a series of positions.
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.
Duration_Pause_Minut_at_any_close - pause in minutes after closing positions.

"==== GMT and DST ====" //  Synchronization of the time of the news site with the time of the terminal occurs automatically. Time Synchronization Check: https://www.mql5.com/en/blogs/post/748027 . //
GMT_Offset_AUTO - enable/disable automatic detection GMT Offset;
GMT_Offset_Manual - the value of the difference between your broker's server time and GMT;

"==== TIMING ====" // Set the allowed time for opening the first position in the series. //
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.
Reconfiguration_Time - move "GMT_Open_Trade_Hour" and "GMT_Open_Pause_Hour" forward by 1 hour during winter time.

"==== Days without Trade ====" // Prohibition to open the first position in the series for some days. //
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.

==== consider other positions ==== // Parameters from this block are intended for joint work with other Expert Advisors (taking into account open positions with other magic numbers). If you use this Expert Advisor separately, then these parameters do not affect. //
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.
Line_Magics - line of magic numbers of positions; if empty, then the number of open positions is calculated for all (any) magic numbers.

"==== Button Interface ====" // If the labels are not displayed on the buttons, then reduce the parameter below. //
TextSize_for_all_buttons - font size on buttons.


Link to EA version for MT4: https://www.mql5.com/en/market/product/83102
Link to EA version for MT5: https://www.mql5.com/en/market/product/83103

Download last presets for trading EA Classic Lock:

Share it with friends: