• 概要
  • レビュー (22)
  • コメント (72)
  • 最新情報

Universal EA

This is a universal constructor Expert Advisor for MetaTrader 5.

The Constructor EA is provided with a large set of functions.

This Expert Advisor is a demo version of The X for Mt5 Expert Advisor which can run on a demo account and on a real account on USDJPY with the minimum lot.

It is a versatile trading system with custom functions and more than 15 signals for opening positions and placing pending orders.

You can select one of 15 signals to open a position and 5 of 17 filters to sort out the signals of the standard indicators included in the MetaTrader package.

Besides, you can adjust the indicator parameters, select a timeframe and specify a signal bar for each signal.

The EA contains the following functions: counter-trend averaging, additional opening in the direction of a trend, trailing stop, breakeven, closing by total profit or loss, virtual stop losses, take profits and trailing stops, ability to use positions or pending/limit orders, martingale, trailing stop by Parabolic, drawdown limitation functions, trading by time and week days and many others.

Using our Expert Advisor, you have the ability to specify signals and filters, as well as enable the required functions.

You can download The X EA for the MetaTrader 5 terminal The X for MT5

You can also download The X EA for the MetaTrader 4 terminal The X for MT4

The complete manual and description of the EA settings (in Russian) can be found in our blog

Note It is a constructor of strategies with our set of functions, you should optimize the EA based on signals and enabled functions.


Available signals and filters

Note: The list of signals and indicators is constantly updated.

  1. Ma - Moving Average
  2. MACD - Moving Average Convergence/Divergence (MACD)
  3. STOCH - Stochastic Oscillator
  4. RSI - RSI
  5. CCI - Commodity Channel Index (CCI)
  6. WPR - Williams Percent Range (WPR)
  7. BB - Bollinger Bands
  8. Envelopes - Envelopes
  9. Alligator - Alligator
  10. OsMA - Moving Average of Oscillator (OsMA)
  11. AO - Awesome Oscillator (AO)
  12. Ichimoku
  13. Accelerator/Decelerator (AС)
  14. Bar
  15. ADX
  16. ZIGZAG


Most Relevant Parameters

Trading strategy

  • IndSigToTrade - selection of signal type;
  • TF_IndSigToTrade1 - selection of timeframe for the signal;
  • Signal_Reverse - reversing the main indicator signal;
  • ClosePositionifChangeOWNSignal - closing opposite positions when the main signal changes;
  • OWNSIGNAL_shift - bar a signal is taken from: 0 - from the current one, 1 - from the first closed one, 2 - from the second closed one.....;
  • FILTER_IndSigToTrade2 - FILTER_IndSigToTrade6 - selection of signal type for filtration (five filters can be used simultaneously);
  • FILTER_TF_IndSigToTrade2-FILTER_TF_IndSigToTrade6 - selection of timeframe for the filter;
  • Filter1_Reverse-Filter6_Reverse - reversing the filter signal;
  • FILTERSIGNAL1_shift - FILTERSIGNAL6_shift- bar a signal is taken from: 0 - from the current one, 1 - from the first closed one, 2 - from the second closed one.....;

SIGNAL FUNCTIONS

  • Show_alert_without_opening_positions - show alert about a new signal instead of opening a position;
  • OpenBarControlOnly - only open positions at bar opening (emulation of operation mode "Open bars only");
  • TypeTradeBUYSELL - selection of position types to be opened (BUYSELL, OnlyBuy, OnlySell);
  • MinuteToOpenNextPosition - the number of minutes after the last opening/closing to open a new position;
  • ReverseSignal - true - reverse a strategy signal;
  • OpenOppositePositionAfterStoploss - open an opposite position after closing the previous position by stop loss;
  • ONlyOnePosbySignal - opening only one position: either BUY and / or SELL;
  • OnePosPerDirection - allow having one position per direction (BUY SELL);
  • OnlyOnePositionPerMagic - opening only one position by magic number (on the entire account);
  • OnlyAlternateSignals - alternate position types: BUY SELL BUY SELL;
  • MAX_BUY_POSITION -MAX_SELL_POSITION - the maximum number of BUY SELL positions;
  • ClosePosifChange - close positions when an opposite signal emerges;
  • CloseChangeOnlyInProfit - close only profitable positions when an opposite signal emerges;
  • MaxSpreadToNotTrade - MinSpreadToNotTrade - min/max allowed spread for the EA operation;

MAIN TRADING FUNCTIONS

  • StopOrderUSE - Use pending orders or limit orders, false = open positions;
  • StopOrderDeltaifUSE - distance for pending orders;
  • StopOrderDayToExpiration - pending order expiration, days (1 - current day, 0 - беno expiration, xx - number of days);
  • StopOrderBarToExpiration - pending order expiration, bars (according to the current TF);
  • ReInstallStopOrdersNewSignalAppears - re-set a pending order when the signal changes;
  • TypeFilling - order filling type allowed by the broker. Auto - detect fill type automatically;
  • RoundingDigits - round prices of pending orders/opening/modification;
  • Sounds - sounds for position opening and modification;
  • Magic - magic number;
  • CommentToOrder - comment to positions opened by the EA;
  • Slippage - slippage in points;

STOP ORDER FUNCTIONS

  • VirtualStops - virtual stop loss/take profit/trailing stop instead of real ones;
  • ForcedModifySLTP - Forced modification of stop loss and take profit of open positions;
  • SetMinStops - auto conversion of placed orders (stop loss, take profit, trailing stop, distance, breakeven) to the minimum possible level on the server;
  • StopLoss - if 0 - not used;
  • TakeProfit - if 0 - not used;

AUTO LOT AND MARTINGALE SETTINGS

  • lot - fixed lot;
  • DynamicLot - dynamic lot;
  • LotBalancePcnt - risk % of deposit for the dynamic lot;
  • RiskRate - exchange rate of the deposit currency in relation to the US dollar for dynamic lot calculation;
  • MaxLot - maximum lot for calculation;
  • Martin - martingale ratio for a trade following a losing one, not used of set to 1;

AVERAGING

  • UseAverage - use averaging, opening additional orders against a trend;
  • OnlyModify - do not open averaging positions bu use stop loss/take profit modification;
  • TakeProfitALL - total take profit of all positions when opening averaging positions;
  • Distance - the distance between orders in the grid;
  • DistanceMartin - ratio for grid step;
  • LotsMartinAverager - lot increase of the grid of positions;
  • MaxOrders - the maximum number of orders in the grid, 0 - unlimited;


ADDING VOLUME IN TREND

  • AdditionalOpening - open additional orders in trend direction;
  • StopLossALL - total take profit of all positions when opening averaging positions;
  • DistanceAdditionalOpen - distance of opened grid positions for adding to positions in the direction of a trend;
  • LotsMartinAdditionalOpen - lot increase of the grid of positions;
  • MaxOrdersOpenAdditionalOpen - the maximum number of orders in the grid, 0 - unlimited;

TIME SETTINGS

  • TradeStartStopbyTime- = true, false. If set to true:
  • SeveralTimeWork - trading time in the following format: Trading Start Hour:Trading Start Minute - Trading End Hour:Trading End Minute ;
  • OpenHour OpenMinute - Opening hour and minute;
  • ClosePeriod_Minute - closure time as the number of minutes since OpenHour OpenMinute ;
  • CloseHour CloseMinute - Closing hour and minute;
  • CloseAllTradesByOutOfTime - close positions after the end of the trading time;
  • TradeByDays - Days - (choose trading days) separated by commas;
  • DayForOptimization - trading day for the optimizer;
  • TradeStartbyTimeMonday - start trading on Monday;
  • OpenHourMonday - OpenMinuteMonday - opening hour and minute on Monday;
  • TradeStartStopbyTimeFriday - start trading on Friday;
  • OpenHourFriday - OpenMinuteFriday- opening hour and minute on Friday;
  • CloseHourFriday - CloseMinuteFriday - closing hour and minute on Friday;
  • CloseFriday - true, false (if true, close regardless of the state (profit or loss); if false - positions will be closed according to the EA's algorithm);

TRAILING STOP

  • TrailingStopUSE - use trailing stop;
  • IfProfTrail - use only for profit positions - break even mode;
  • TrailingStop - trailing distance, 0 - minimum allowed;
  • TrailingStep - distance step;
  • SaveTPafterTrailingStop - keep take profit during trailing stop modification;

TRAILING STOP by PARABOLIC SAR

  • TrailingStopSAR - use Parabolic based trailing stop;
  • TrailingStopSAR_TimeFrame - indicator timeframe;
  • step - maximum- SAR indicator settings;

BREAKEVEN SETTINGS

  • MovingInWLUSE - move a position to breakeven;
  • LevelWLoss - move the Stop Loss at LevelWLoss pips;
  • LevelProfit - when the trade gains LevelProfit points of profit;

CLOSE BY TOTAL PROFIT AND LOSS

  • TypeofClose - closing type by profit;
  • TrailOptions - distance for profit trailing (operates with the prifitessss parameter);
  • TypeofClose - profit trailing modification step;
  • CloseProfit - close if profit+;
  • prifitessss - number of units (depending on TypeofClose) for closing profit;
  • CloseLoss - close if loss;
  • lossss - number of units (depending on TypeofClose) for closing a loss;
  • OFFAfterClosePROF OFFAfterCloseLOSS- close the EA upon reaching profit/loss;
  • CloseTerminalAfterClosePROF CloseTerminalAfterCloseLOSS- close the terminal upon reaching profit/loss;

CURRENCY PAIR SETTINGS

  • PAIR1-PAIR12 - names of currency pairs for the EA to trade, up to 12 at a time;

INDICATOR SETTINGS

  • Indicators options - standard indicator settings; only configure indicators used for the signal and filter;

PROFIT?LOSS LIMIT SETTINGS

  • LimitFor - calculation limit in the time range;
  • LimitType - limit calculation type (dollars, points, percentage;
  • LimitForLosses - limit of loss in the deposit currency;
  • LimitForProfits - limit of profit in the deposit currency;
  • ClosebyLIMITING - close upon reaching the limit;
  • UseCurrentProfit - take into account floating profit of currently open positions;

DRAWDOWN LIMITATION SETTINGS

  • DrawDown_Level - enable drawdown management block;
  • Type_DrawDownHR - drawdown calculation type based in history settings and current settings;
  • DrawDown_Level_One - the first drawdown levels as percentage;
  • Type_Deal_Level_One - what to do at the first level of drawdown (disable new signals \ disable averaging or additional opening \ disable all trades \ alert)
  • DrawDown_Level_Two - the second drawdown level in percent;
  • Type_Deal_Level_Two - what to do at the second drawdown level (close all profitable positions \ close all unprofitable positions \ close all \ alert);

OTHER SETTINGS

  • Tester Withdrawal - block of emulation of withdrawal in the strategy tester;

Find the remaining parameters in our article: The complete manual and description of The X EA settings (in Russian)

Daniel Andrejczuk
5398
2017.11.09 23:44 
 

ユーザーはレーティングに対して何もコメントを残しませんでした

Andrey Litvichenko
7571
2017.10.12 13:19 
 

ユーザーはレーティングに対して何もコメントを残しませんでした

Ali irwan
5195
2017.07.20 11:51 
 

I just used it 2 weeks, good results

whinero
212
2017.02.13 12:43 
 

Панелька красивая, за нее 4+ балла, но торговая стратегия мартина(ИМХО) да еще с сотней(!) статических параметров - полная чушь, 1 балл.

Выставляем стопы, добавляем проскальзывание и получаем сливатора. А если нет стопов, то рано или поздно, может через день, а может через год - 100% слив депо.

Красивая лесенка - развод для новичков.

Vladislav Andruschenko
117763
2017.02.12 12:16 
 

Данный эксперт - универсальный робот. Вы можете настроить его по своему. Никто не заставляет использовать мартингейл или еще что. Все В Ваших руках.

Роман Ефимов
86
2016.06.30 20:27   

не работает за целый день не открыл ни одной сделки!

Alexander
87
2016.06.12 17:14 
 

Сова нравится. Вопрос: в бесплатной версии не работает функция ограничения кол-ва ордеров? И где подробные настройки?

Nork
6022
2016.03.21 03:48 
 

ユーザーはレーティングに対して何もコメントを残しませんでした

Rodrigo da Silva Boa
7190
2015.12.09 06:28 
 

ユーザーはレーティングに対して何もコメントを残しませんでした

Megatrader777
179
2015.01.31 18:05 
 

Все работает все нравится. Отличная работа. Только сделайте такой же под МТ4. И будет вообще круто

n71645
104
2014.09.11 14:03 
 

пять балов мне нравится!!!

Gennadiy Sidorov
1462
2014.05.15 08:38 
 

интересная задумка

Malken
54
2014.04.30 09:11 
 

Good Ea

Reanimator2
67
2013.07.11 18:25 
 

Cool

Mamai
101
2013.05.12 10:12 
 

Суперский эксперт. ошибки 4302 у себя не нашел. Еще бы было бы прекрасно добавить сюда усреднение как в советнике тиковом у Вас на сайте. цены бы не было. И предлагаю добавить сюда другие стандартные индикаторы как сигналы для стратегий 12 - слишком мало.

ilea
37
2013.04.18 21:58 
 

Vladon, что же все таки делать с ошибкой 'Cannot load indicator MACD [4302]' и подобными ?

EnergieB
26
2013.04.11 00:16   

Testing EA on 5 digit broker. I get the message 'Cannot load indicator MACD [4302]' ...I get the message for all indicators. How do I resolve this ?

cherep
34
2013.02.27 05:35   

Здравствуйте!

Уточните, пожалуйста, параметр IndSigToTrade позволяет устанавливать значения от 1 до 12. Но ведь индикаторов только 11. Что означает параметр 12?

Moran
58
2013.01.15 09:20   

Здравствуйте. Почему я не могу видеть SL и TP в открытом позиции? Означает ли это, что их нет? И я должен поставить их вручную? Тем не менее, я установил параметры внутри эксперт.

Maksim Korolyov
178
2013.01.07 18:19   

Интересный робот. Можете поделиться оптимальными настройками, если у кого есть. Непротив поставить его на реал, но тесты нестабильны.

Alexandr Barteniev
142
2012.11.14 16:14   

Ребят спасибо за робота, собираюсь его поставить на депозит 50 000

Jenysan
34
2012.10.29 14:21   

Здравствуйте ! Очень нравиться ваш експерт . Главный плюс в том что всё в нём можна настроить в ручную . У меня к вам вопрос , на некоторых валютных парах експерт открывает позиции не по заданию например EURGBP S/L 30p , T/P 60 , а открывает S/L 90p , T/P 100. В чом может быть проблема ?

バージョン 18.1 - 2017.12.29
Updated the ClosePosifChange parameter to allow using filters as signals.
バージョン 17.977 - 2017.12.15
Note: We placed some secondary EA parameters to the bottom of the internal variables list.

Added the new parameter ReInstallStopOrdersNewSignalAppears - re-set pending orders if a new indicator signal arrives. It allows removing the current BUYSTOP pending order and place a new BUYSTOP on a new level after indicators have informed of a new signal.

No Signal option has been added to the main signal.
If selected, the EA will ignore the main signal and will trade based on filters.
When using the main indicator, the signal is generated 'as is' on the current bar.
This means the open signal is regarded a signal completion. If a signal arrives, while the filter does not allow opening a position, then the signal is ignored.
When using No Signal, you can ignore the fact of the main signal completion and follow the filters.
When using the filters, the current position of indicators is regarded as a signal.

Added the OnlyAlternateSignals parameter
It allows opening positions one by one only.
If the last closed position is SELL, the next one can be only BUY!
It is needed to let the main indicator trade in No Signal mode.

Update of ADX Filter
ADX shows the trend strength.
If ADXLevel is 0, DI- > DI+ is used as a permission to sell
If ADXLevel is 0, DI+ > DI- is used as a permission to buy
If ADXLevel is not 0, DI- > DI+ и DI- > ADXLevel is used as a permission to sell
If ADXLevel is not 0, DI+ > DI- и DI+ > ADXLevel is used as a permission to buy

Added new ATR filter.
ATR shows the market volatility.
Trading strategies applying ATR as a filter confirm the current trend.
When ATR grows, this means high market volatility.
Low ATR values means low market volatility.
External settings:
ATR_period=14 - ATR calculation period
ATRprice=PRICE_CLOSE - price type used to calculate the filter (Close, Open, High, Low...)
ATR_MA_period=1 - number of candles for calculating the Middle line (MA), 1 - the indicator calculates the signal direction from the current and previous bar (depending on the 'shift' parameters)
ATR_MULTIPLIER=1 - ATR ratio, for example EURUSD ATR=0.0020, when using ATR_MULTIPLIER=2; calculation will include ATR=0.0040.
Filter ATR logic:
The price(ATRprice) of the current bar exceeds the price(ATRprice) of the previous bar + (ATR*ATR_MULTIPLIER) = high volatility BUY filter
The price(ATRprice) of the current bar is lower than the price(ATRprice) of the previous bar - (ATR*ATR_MULTIPLIER) = high volatility SELL filter
バージョン 17.956 - 2017.11.13
Updated on 27.10.2017
Added the StopOrderDayToExpiration parameter
StopOrderDayToExpiration= order expiration time in days.
0 - ORDER_TIME_GTC - the order will stay in the queue until it is manually canceled
1 - ORDER_TIME_DAY - the order will be valid only during the current trading day
2...X - ORDER_TIME_SPECIFIED - the order will be valid until the specified date
===============================================================================
Added the parameters of total stop loss and take profit to the averaging block.
The stop loss/take profit level is calculated based on the middle line.
TakeProfitALL - the total take profit distance when opening averaging trades.
This option is useful only when AverageUSE is activated.
StopLossALL - the total stop loss distance when opening averaging trades.
This option is useful only when AdditionalOpening is activated.
===============================================================================
When opening additional trades or averaging trades, the algorithm for breakeven and trailing stop is activated based on the middle line. The entire series of positions in one direction is calculated from the average level.
===============================================================================
VirtualStops - enable the virtual (hidden) levels of stop loss/take profit/trailing stop/breakeven
Completely revised the algorithm of virtual stop loss\take profit\trailing stop\breakeven.
Now all virtual stops are displayed on the chart and are the key level for closing positions.
Data are displayed in the form of lines and written in global variables.
Note: if the stop line is removed from the chart along with the global variables, the virtual closure for this line will not work.
Note: check if your experts and indicators delete lines from the chart and global variables!
Attention: virtual levels are triggered at the current price, after which the closure occurs.
During closing, there may be a few points of slippage!
Note: enabling VirtualStops significantly reduces the speed of testing.
===============================================================================
FIFO
When closing all positions, the EA closes the positions starting from the first opened one.
===============================================================================
Added selection of the pending stop/limit order type in StopOrderUSE
バージョン 17.943 - 2017.10.17
Added the ability to open trades in the tester using the panel.

Added the signal bar number for the main signal and filter
OWNSIGNAL_shift - signal bar shift for the main signal.
FILTERSIGNAL1_shift - signal bar shift for the filter.


Added a parameter to disable opening positions instead of notifying the user of a new signal.
Show_alert_without_opening_positions - when enabled, the EA will not open a new position based on the signal, but will only notify the user that a new signal has appeared. In this case, all other functions will work in the normal mode.
バージョン 17.933 - 2017.10.12
Optimized the signal generation algorithm. Significantly increased the EA testing and optimization speed.

Added the SaveTPafterTrailingStop option. When enabled, take profit of the modified positions will be saved in its place.
For example:
SaveTPafterTrailingStop = false: when trailing stop is active, take profit of the modified position is deleted.
SaveTPafterTrailingStop = true: when trailing stop is active, take profit of the modified position is saved.


Updated the Extra BUY and Extra SELL buttons. The stop loss/take profit specified in the EA settings is now also considered when opening positions.

Updated the MACD filter
When using the MACD filter, the location of the MACD lines relative to the MACD_BUYLEVEL and MACD_SELLLEVEL levels is now taken into account, similar to the signal.


Added ZIGZAG signals
Intersections of ZIGZAG extremums serve as position opening signals.
When using these signals, it is important to configure the shift parameter.
If set to 0, a position is immediately opened towards the intersection of the current Bid price and the latest ZIGZAG extremum.
If set to 1, a position is opened when the intersection is registered on 1 closed bar.
The last extremum is the fixed extremum 1, when a new ZIGZAG segment is plotted starting from that extremum. Intersection of the maximum and minimum point is a signal for opening a position.
The direction of the last ZIGZAG 0 segment is considered to be the ZIGZAG filter.
バージョン 17.525 - 2017.06.05
- Fixed the trailing stop error when there are positions in different directions.
- Added parameter ClosePositionifChangeOWNSignal - closing opposite positions when the main!! signal changes.
The difference from ClosePosifChange is that when using ClosePosifChange, a change in the signal in considered for all filters + the main signal.
And when using ClosePositionifChangeOWNSignal - a change in the signal is considered only according to the main indicator.
バージョン 17.424 - 2017.05.03
Added parameters for opening pending orders instead of positions
Using pending orders for entries instead of positions:

StopOrderUSE (true - false) and StopOrderDeltaifUSE (from the minimum allowed stop level allowed on the server) in points.
These parameters in conjunction provide the ability to place pending orders instead of positions. For example, you want to verify a signal after it appears by placing a pending order.
You set: StopOrderUSE =true StopOrderDeltaifUSE=100
If your indicator generates a signal for opening BUY, then the EA will place a pending BUYSTOP order at the price of Ask+StopOrderDeltaifUSE points.
If your indicator generates a signal for opening SELL, then the EA will place a pending SELLSTOP order at the price of Bid-StopOrderDeltaifUSE points.
If the parameter is less than the minimum allowed on the server, the Expert Advisor will show the error 130.
バージョン 17.224 - 2017.03.01
Update of the "Averaging" block for the Brazilian market
バージョン 17.201 - 2017.02.20
Fixed the error in displaying the autolot in EAPADPRO
Added output of the signal information to the journal when a trade is opened.
Fixed the multi-currency operation mode of the EA.

Operation by time feature

Attention: Trading by time involves only filtering for opening new deals based on new signals.
All other functions: Trailing stop, Breakeven, Averaging, Scaling up along the trend and other works around the clock.
Attention: All parameters for trading by time can be optimized in the tester.


If TradeStartStopbyTime = false, the EA trades around the clock.

If TradeStartStopbyTime = true, the trading by time is activated:
The trading by time period starts on Monday.
The EA starts working on Monday at OpenHourMonday:OpenMinuteMonday if TradeStartbyTimeMonday=true
For example, OpenHourMonday=3 and OpenMinuteMonday=40, then the EA starts trading on Monday at 40:03 server time
(time of your broker, indicated in the Market Watch).

Next, the EA checks the trading time according to the parameters: OpenHour:OpenMinute - trading start and CloseHour:CloseMinute - trading end time for one day.
For example: OpenHour=5 and OpenMinute=0, as well as CloseHour=18 and CloseMinute=59, then the EA will trade every day from 5:00 to 18:59.

To set a trading period from the starting time, set the ClosePeriod_Minute parameter - period in minutes.
For example, OpenHour=6 and OpenMinute=6 and ClosePeriod_Minute=00, then the EA sets the trading time from 0:00 to 180:6(180+9 minutes = 9 hours).

You can also set multiple time intervals for trading in the SeveralTimeWork parameter. Entry format: HH:MM-HH:MM;
where: Hour to start trading:Minute to start trading - Hour to stop trading: Minute to stop trading.
For example, SeveralTimeWork=3:00-5:00;7:30-8:50;12:00-15:00;
then the EA will trade during 3 time intervals. from 3:00 to 5:00, from 7:30 to 8:50 and from 12:00 to 15:00. The EA will not open order during the remaining time.

You can also close all open deals and pending orders outside the trading time, CloseAllTradesByOutOfTime=true.
The EA will trade during the time specified above, and when the trading time ends, the EA will close all open positions and orders.


TradeStartStopbyTimeFriday - Trading time for Friday.
This EA allows the users to set the trading time for the EA on Friday.
Time parameters for Friday: OpenHourFriday:OpenMinuteFriday - CloseHourFriday:CloseMinuteFriday
For example, the EA should not open new deals on Friday after 18:00, set:
OpenHourFriday=0:OpenMinuteFriday=0 - CloseHourFriday=18:CloseMinuteFriday=0
In this case, the EA will not open new deals after 18:00

It is also possible to close all open deals and pending orders on Friday at the specified time - 18:00, CloseFriday=true.
CloseAllTradesByOutOfTime


The block for operation by time allows to set the trading days: TradeByDays
For example, TradeByDays=true Days=1,2,3 - in this case, the EA will trade only on Monday, Tuesday and Wednesday during the time specified above. Or it will trade around the clock those 3 days, if the time is not specified.
If you set Days=1,2,3,4,5 but with TradeStartStopbyTimeFriday=false, the EA will not trade on Friday.

It is also possible to set 1 day for optimization in the DayForOptimization parameter.
This option is useful to determine the most profitable days in optimization.
For example, DayForOptimization = 3, then the EA will trade only on Wednesdays.


You can set the trading to start on Monday and to stop on Friday, while the EA trades around the clock on the remaining days.
You can set the start on Monday and specific hours on other days.
バージョン 17.121 - 2017.01.27
Block of Averaging
-Fixed error with the DistanceMartin

Block of Parabolic SAR based trailing stop
-Added parameter TrailingStopSAR_TimeFrame - Timeframe of the SAR indicator for the trailing stop.
-To the МТ5 version: Added Parabolic SAR based trailing stop
TrailingStopSAR (true - false) step and maximum (parameters of the Parabolic SAR)
These parameters allow the modification of stop loss based on the specified Parabolic
The stop loss will be modified at every new value of the Parabolic SAR.
Accordingly, Buy is modified when the Parabolic SAR is below the price, Sell is modified when the Parabolic is above the price.


Block of signals
-Added parameter Signal_Reverse,Filter1_Reverse,Filter2_Reverse - they allow to inverse signals
based on specific indicators (Main signal, Filter 1 and Filter 2)
-Changed the MinuteToOpenNextPosition parameter (Allow opening the next signal after the last opened position),
if there are no open positions, the EA considers the time since the last closed position.
The time is considered for the same type. If the signal is BUY, the time is calculated from the last opened \ closed BUY....
-Changed the function for receiving signal when using signal inversion.
For example:


*If you use WPR as signal source, with the levels:
WPRHighLevel= -20;
WPRLowLevel = -80;
then:
Buy is opened, if WPR crosses WPRLowLevel (-80) upwards
SELL is opened, if WPR crosses WPRHighLevel (-20) downwards

*If you enable the option: Signal_Reverse=true
then:
SELL is opened, if WPR crosses WPRLowLevel (-80) upwards
Buy is opened, if WPR crosses WPRHighLevel (-20) downwards

*If you enable the option: Signal_Reverse=true and set the parameters:
WPRHighLevel= -80;
WPRLowLevel = -20;
then:
Buy is opened, if WPR crosses WPRHighLevel (-80) downwards
SELL is opened, if WPR crosses WPRLowLevel (-20) upwards

- added parameters for the MACD signal
MACD_BUYLEVEL=0;
MACD_SELLLEVEL=0;
Which are involved in determining the signal.
for example: MACD_BUYLEVEL=3,MACD_SELLLEVEL=-3
For the long trade, the signal crosses the MACD line and at the end of that candle the MACD is greater than 0 and MACD is less than 3,0 (the signal line and MACD line must be both above the origin and less than 3.0).
For the short trade, the signal crosses the MACD line and at the end of that candle the MACD is less than 0 and MACD is greater than -3,0 (the signal line and MACD line must be both below the origin and greater than 3.0).



-Added automatic checking and normalization for all stops to tick size on the current currency pair.
For example, if the tick size on the WING17 symbol is 5 points, then all stop loss and take profit values will be normalized.
For example, the contract price is 58840 and the automatic stop loss calculation resulted in 1211 points, the final stop loss will be normalized to 1210 points.

Automated calculation of commission and swap has been added to the Trailing Stop and Breakeven functions.
Now trailing stop only triggers after a position covers the commission amount.


Limiting loss and profit per 1 day/week/month
Limiting LimitFor - Limitation type day/week/month
LimitForLosses - Limit by profit
LimitForProfits- Limit by loss
LimitType - Limit by USD, points, percentage of the deposit
ClosebyLIMITING - Close deals of the EA when the limit is exceeded
UseCurrentProfit - Consider the current profit/loss in calculation of limit

This function is capable of disabling the EA operation in case the EA accumulates certain profit/loss in deposit currency per day/week/month The EA will be reactivated the next day/week/month
For example, LimitFor=DAY LimitForProfits=1 Close by total profit = 10 USD
You can also select the limit type (LimitType) for calculations. In the USD, points, percentage of the account balance.
If you need to close and delete all deals using this EA once the limits are exceeded, you can set ClosebyLIMITING = true
The UseCurrentProfit parameter prohibits or allows considering the current floating profit/loss for this EA


Added new signals:
AC - signal principle is the same as in the АО indicator
Ichimoku - operation principle based on intersection of the TENKANSEN and KIJUNSEN lines,
If TENKANSEN is greater than KIJUNSEN - BUY signal
If TENKANSEN is less than KIJUNSEN - BUY signal
Bar - Work in the direction of the bar
If the candle Close is above the candle Open (Bullish candle) - BUY signal
If the candle Close is below the candle Open (Bearish candle) - SELL signal


Added new filters
AC - signal principle is the same as in the АО indicator
Ichimoku - operation principle based on location of the TENKANSEN and KIJUNSEN lines,
Bar - Work in the direction of the bar
Bar relatively MA - The EA signals are filtered based on the values of bar Close and Fast\Slow MA
If the bar Close is above MAfast and MAslow - only BUY signals
If the bar Close is below MAfast and MAslow - only SELL signals


Bug fixes

Performed code optimization in order to reduce the CPU load.
Added support of the EA in the Brazilian market.
Added a new variable:
SeveralTimeWork = the EA operation time through listing,
entry format:
start hour:start minute-end hour:end minute;start hour:start minute-end hour:end minute;
For example:
09:00-10:00;12:00-13:00;15:00-17:30;
means that the EA will work from 9:00 to 10:00, also from 12:00 to 13:00, and also from 15:00 to 17:30


- Added the EAPADPRO information panel
Details on the panel in our blog:
or https://www.mql5.com/ru/blogs/post/687140

The following data has been moved to the Strategy Info block:
OWN Signal = Name of the signal + Timeframe of the signal + Reverse
Current Signal = Current signal from the main indicator
Filter 1/2 - Name of the filter 1/2
Current Filter - Current signal from filters 1/2
BUY Average/Lot - Next averaging in points for BUY / Next averaging lot
SELL Average/Lot - Next averaging in points for SELL / Next averaging lot
Buy Additional/Lot - Next additional opening in points for BUY / Next lot for additional opening
Sell Additional/Lot - Next additional opening in points for SELL / Next lot for additional opening
Average Price Buy - Average price for BUY deals
Price Sell - Average price for SELL deals
バージョン 16.957 - 2016.11.10
Optimized the code to reduce the CPU load.
Added support for working on the Brazilian market.
Added the new variable:
SeveralTimeWork = EA working time via enumeration,
entry format:
start hour:start minute-end hour:end minute;start hour:start minute-end hour:end minute;
For example:
09:00-10:00;12:00-13:00;15:00-17:30;
means that the EA works from 9:00 to 10:00, as well as from 12:00 to 13:00, as well as from 15:00 to 17:30
バージョン 16.955 - 2016.10.31
Fixed a bug in breakeven MovingInWLUSE, where stop loss of a trade could be ranging between breakeven and triggered trailing stop
バージョン 16.945 - 2016.10.24
Added support for EA operation on hedging accounts. The EA can work on Hedging and Netting accounts!
Added the Magic number
Fixed the error in balance calculation in the block of closing by profit for the accounts that use the day trading mode and equal to 0.


Added new functions to the 'Profit or Loss' block:
TrailOptions - The number of profit "units", after which profit trailing is activated;
TrailOptionsStep - Trailing step in "units";
Trailing Stop at Closing
A new function for trailing profits has been implemented on user demand. In this case, the profit is fixed with some correction. As soon as the profit reaches the specified value, the Expert Advisor saves the current profit level and starts trailing the profit. If you made settings for closing at the profit of 10 dollars:

CloseProfit - Close in profit.
prifitessss - The amount to close in profit.
TrailOptions - the distance from prifitessss, when reached the profit trailing is activated.
If prifitesss is set to 10 and TrailOptions is set to 5, the Trailing Stop will be set at 5 dollars. The Trailing Stop will come into play when the Expert Advisor passes the 10 dollar line and start moving following the profit. The Journal will show entries about the current profit status.
When the total profit falls below the last fixed level, TrailOptions, the Expert Advisor will perform forced closing of all positions.


Improved the OnePosPerDirection parameter: Open 1 trade per 1 direction
For example:
if OnePosPerDirection=true and ONlyOnePosbySignal = false
then the EA can open 1 Buy according to signal and 1 Sell according to signal
if OnePosPerDirection=false and ONlyOnePosbySignal = true
then the EA can open only 1 trade according to signal, either Buy or Sell
if OnePosPerDirection=false and ONlyOnePosbySignal = false
then the EA can open any trade according to any signal of the indicators

Added the OnlyOnePositionPerMagic parameter: Opening 1 position per 1 magic,
The EA checks if there are open positions with the specified magic number on other currency pairs. If there are no positions - the EA opens a trade according to the signal, and other experts will wait for this trade to be completed.


Added the CloseChangeOnlyInProfit parameter - close trades in case of a reverse signal only when the current position is in profit.


Added the MinuteToOpenNextPosition parameter - the number of minutes for opening the next trade based on the indicator signals. This parameter counts the number of minutes elapsed from the last opened position. It allows to filter trades when using the ONlyOnePosbySignal=false
Added the OpenOppositePositionAfterStoploss parameter - opening an opposite position when closing the current position by stop loss. It allows to open an opposite trade right after the stop loss of the previous is triggered without using the indicator signals.
Added the MAX_BUY_POSITION and MAX_SELL_POSITION parameters for limiting the maximum number of trades.
バージョン 16.428 - 2016.05.06
Fixed MaxOrders error.
Added new input for selecting the type of the position to open:
TypeTradeBUYSELL
BUYSELL;
OnlyBuy;
OnlySell;
バージョン 16.309 - 2016.03.23
Version 16.226 - 2016.03.01
The updated version for the stock market:
- Fixed the error in the determination of the last lot, if the position was closed by several requests.
Version 16.105 - 2016.01.06
Redesigned the signals block when the IndSigToTrade and IndSigToTrade2 are selected.
Before: A trade opens only when the two signals match at the same time.
Now: If the IndSigToTrade signal appeared, then the FILTER_IndSigToTrade2 and FILTER_IndSigToTrade3 indicators are checked. If their signals go on, the trade is opened.
I.e. If the IndSigToTrade is selected as the main signal, then the FILTER_IndSigToTrade2 and FILTER_IndSigToTrade3 parameters only trigger as filters.
Version 15.994 - 2015.12.23
Added automatic detection of the order filling type.
Version 15.992 - 2015.12.17
Added separation of deals by parameters:
MaxOrders = maximum number of smoothing deals (deals against the main position);
MaxOrdersOpenAdditionalOpen = maximum number of additional deals (deals along the main position);
Version 15.991 - 2015.12.11
Fixed take profit calculation when opening an additional trend following trade from the 'Additional opening' unit
For an additionally opened trade, take profit is equal to the TakeProfit parameter
Version 15.981 - 2015.11.25
In signals of Stochastic RSI CCI WPR, added levels for the EA to count signals from.
Stochastic_BUYLEVEL=20;
Stochastic_SELLLEVEL=80;
Rsi_BUYLEVEL=30;
Rsi_SELLLEVEL=70;
CCI_BUYLEVEL=-100;
CCI_SELLLEVEL=100;
WPR_BUYLEVEL=-80;
WPR_SELLLEVEL=-20;
Version 15.956 - 2015.10.28
New block in sets:

AdditionalOpen - use opening additional orders by trend;
DistanceAdditionalOpen - distance of opened grid positions, adding by trend;
LotsMartinAdditionalOpen - increase lot for a position grid;
MaxOrdersOpenAdditionalOpen - maximum additions, 0 - unlimited.

If you want to open additional positions by trend (for example, if you buy and the price goes up through DistanceAdditionalOpen points, a new position should be opened equal to "previous lot * LotsMartinAdditionalOpen"). The maximum amount of deals in a single position should not exceed MaxOrdersOpenAdditionalOpen deals.
Version 15.943 - 2015.10.26
Version of October 23:
added option CloseAllTradesByOutOfTime
When using the trading permission block:
input int OpenHour = 0;
input int OpenMinute = 0;
input int CloseHour = 23;
input int CloseMinute = 59;

If CloseAllTradesByOutOfTime open positions remain after the time is up - all positions are closed.
Version 15.821 - 2015.08.27
Now you can select an indicator by its name as a matter of convenience

- NO=0 - No signal
- Ma=1 - Moving Average
- MACD=2 - Moving Average Convergence/Divergence (MACD)
- STOCH=3 - Stochastic Oscillator
- RSI=4 - RSI
- CCI=5 - Commodity Channel Index (CCI)
- WPR=6 - Williams Percent Range (WPR)
- BB=7 - Bollinger Bands
- Envelopes=8 - Envelopes
- Alligator=9 - Alligator
- OsMA=10 - Moving Average of Oscillator (OsMA)
- AO=11 - Awesome Oscillator (AO)
- ISH=12 - Ichimoku
Version 15.618 - 2015.06.19
Updates for brokers using IOC order filling type.
Fixed averaging error.
Version 15.601 - 2015.06.02
The Expert Advisor has been updated to adjust to the new terminal build.
Removed the limitation on the minimum averaging distance.
バージョン 14.209 - 2014.02.13
Fixed operations of some indicators, namely MA and MACD.
バージョン 14.122 - 2014.01.23
Added price check when trading shares due to client requests.
バージョン 14.103 - 2013.10.04
Added the signal 13 - strategy based on Accelerator oscillator.
バージョン 13.820 - 2013.08.20
Amended the autolot function for brokers that have symbols with suffixes. For example, EURUSD.m.
バージョン 13.813 - 2013.08.13
Updated TrailingStop function.
When using initial trailing stop and a set of signals for modifying the stop loss, the initial stop loss is reset and the TrailingStop function starts working instead.
バージョン 13.237 - 2017.04.05
The EA has been updated for the terminal's build. Added condition for trading time: if parameters remain unchanged, the EA works 24 hours.

The EA is best suited for working at VPS server.