• Overview
  • Reviews (3)
  • Comments (33)
  • What's new


Universal Multicurrency Trading System with Averaging Function that uses Williams Percent Range (WPR) 

The EXP THE X series Expert Advisor. Trades with minimum lot only.

This Expert Advisor includes all the useful functions that have been used in all the Expert Advisors including the function of averaging. It also allows using several (up to 12) currency pairs on a single chart and signals from 12 indicators included in MetaTrader 5 package.

The function of averaging allows bringing an unprofitable position to profit by creating a grid of positions in the price movement direction. If the price moves against a position, the averager will open additional positions on the basis of your settings, thus it increases the volume and sets a common take profit for all positions by the given symbol.  

The martingale function allows using the standard martingale mode.  

Trailing stop, break even, trading time, auto lot, closing by total profit/loss. All these function are available in the full version of the Expert Advisor.

You can also purchase separate functionally independent Expert Advisors included in this Expert Advisor:


Main Advantages

  • Autolot (calculation of volume based on the current balance), money management;
  • Work by time (limitation of trade time for the Expert Advisor);
  • Trailing Stop (standard one with the "Only profitable" algorithm);
  • MarketWatch ECN (work on ECN, NDD accounts);
  • Functions of error processing for real accounts;
  • Block of closing by total profit and loss with the ability to disable all the Expert Advisors on the account;
  • Break even (moving Stop Losses to the zero level);
  • Martingale (increasing the following lot after an unprofitable position);
  • Work by the indicator signals only (Signal for opening, Signal for closing an opposite order and opening);
  • Closing opposite orders when signal changes;
  • The "REVERSE" function that reverses the signals of your strategy.
  • The function of averaging a losing position bringing it to profit.


Indicators and Signals

Williams Percent Range (WPR) (Signal 6)

The indicator is similar to RSI, CCI and DeMarker. BUY signal - crossing the overbought level (-80) downwards and SELL - crossing the oversold level (-20) upwards. All other cases refer to "no signal" state. Only the indicator period parameter (WPRPeriod) can be changed outside.


Parameters of the Expert Advisor:

  • Signal="Signal options";
  • shift=0;
  • ReverseSignal=false;
  • ONlyOnePosbySignal=true;
  • ClosePosifChange=true;
  • averagerset="Averager options";
  • UseAverage=true;
  • OnlyModify=false;
  • TakeProfitALL=100;
  • Distance=100;
  • MaxOrders=0;
  • LotsMartinAverager=1;
  • lotsset="options";
  • lot=0.1;
  • DynamicLot=false;
  • LotBalancePcnt=20;
  • MaxLot=999;
  • Martin=1;
  • StopLoss=90;
  • TakeProfit=60;
  • timetrade_="Times options";
  • OpenHour=0;
  • OpenMinute=0;
  • CloseHour=23;
  • CloseMinute=59;
  • Trailing_="Trailing options";
  • TrailingStopUSE=false;
  • IfProfTrail=false;
  • TrailingStop=0;
  • TrailingStep=1;
  • MovingInWLUSE_=WithoutLOSS options";
  • MovingInWLUSE=false;
  • LevelWLoss=0;
  • LevelProfit=0;
  • CloseProfitLoss="CloseALL when Profit or LOSS options";
  • TypeofClose=1;
  • CloseProfit=false;
  • prifitessss=10;
  • CloseLoss=false;
  • lossss=-10;
  • OFFAllEaAfterClosePROF=false;
  • OFFAllEaAfterCloseLOSS=false;
  • pair="Symbols options ";
  • PAIR8="";
  • PAIR9="";
  • PAIR10="";
  • PAIR11="";
  • PAIR12="".

Description of Parameters of the Expert Advisor

1 Parameter to get a signal bar

shift (0,1,2.....) bar number.

This parameter represents the number of a bar from which your indicators will take signals. Specify the following parameters of signal definition when ordering an Expert Advisor: 

  • Open a deal immediately after the signal appears;
  • Wait until a signal on the closed bar is formed and open the deal only at opening of the following bar.

Some indicators have a clear definition on what bar a signal is triggered due to their algorithms. Considering the accuracy and correctness of execution of an order, a deal should be processed only on the current bar, i.e. shift=1 parameter. If it is necessary to open the deal immediately on the current bar as the signal appears and the indicator allows it, then you should set shift=0.

2. Reverse of strategy signals

ReverseSignal (true - false) Enabled\Disabled.

This parameter represents the reverse of signals of your indicator(s).

If your Expert Advisor is made on the basis of a definite algorithm or on definite signals of the indicator, you have a possibility to change BUY\SELL signals without reprogramming them.

For example: ReverseSignal=true.

Your indicator gives a signal to BUY, but the Expert will open a SELL deal.

Your indicator gives a signal on SELL, but the Expert Advisor will open a BUY deal.

3. Magic number

Magic (0....99999) number.

This parameter represents a special number of the Expert Advisor on the chart. If you use a lot of Expert Advisors on different charts you will need to give them unique numbers to avoid confusing of deals.

4. Stop Loss of a deal

StopLoss (0...) in points.

This parameter is a stop loss for each position. This is the number of loss points for a deal to be closed.

0 - the parameter is disabled; and the stop loss will be equal to 0.

This parameter should be set to no less than the minimum allowed value on your server.

If the parameter is less than the minimum allowed on the server, the Expert Advisor will show the error 130.

5. Take Profit of a deal

TakeProfit (0...) in points.

This parameter is a take profit for each position. This is the number of profit points for a deal to be closed by the server.

0 - the parameter is disabled; and the take profit will be equal to 0.

This parameter should be set to no less than the minimum allowed value on your server.

If the parameter is less than the minimum allowed on the server, the Expert Advisor will show the error 130.

6. Slippage of the deal

Slippage(0....) in points.

This parameter adjusts price slippage at opening of the deal.

On the real market price moves very fast, so when sending the order to the server, the server can response: prices changed, requotes, etc. In order not to send a lot of orders to the server, you can set the allowed slippage parameter at the opening of a deal.

For example: Slippage=10.

When sending an order for opening the price was 1.1234, but it has changed to 1.1238. In this case the deal will be performed at 1.1238 without any requotes! But if Slippage was equal to 0, in this example the deal would not be opened, the server would send the Requote error (New prices).

7. Closing deals by an opposite signal

ClosePosifChange (true - false).

This parameter adjusts the possibility to close an opposite deal when opening the new one. If your indicator uses BUY - SELL - BUY - SELL signals and this parameter is enabled, the Expert Advisor will close the opposite deal before opening the new one.

8. Number of positions for a signal

ONlyOnePosbySignal (true - false) Enabled\Disabled.

This parameter is used to choose whether a single or multiple positions should be opened.

At that, if this parameter is enabled, 1 deal per bar will be opened at each signal coming.

For example, your strategy gives consequent BUY signals on each new bar, and the function ONlyOnePosbySignal= true, then a BUY deal will be opened on each bar if the signal appears.

If the function ONlyOnePosbySignal = false, then the Expert Advisor can open only one BUY deal and one deal on SELL and wait until they are closed.

9. Fixed lot

Lots (0.01 .........) - setting a fixed lot for all deals.

This parameter specifies the number of lots for opening deals. The lot is fixed and applied to all deals.

You need to clarify the minimum lot for a deal allowed by your broker.

10. Dynamic lot

DynamicLot (true - false) LotBalancePcnt (in percentage from free margin).

These parameters adjust automatic calculation of lot and choosing lot depending on free margin.

11. Martignale

Martin (1....) - coefficient for Martingale.

This parameter allows you to use the Martingale principle for your strategy, which implies that the volume of a deal following an unprofitable deal will be calculated as Lot * Martin ratio..

If the parameter is equal to 1, then Martingale is not used.

For example: Lots = 0.01 Martin =2:

  1. BUY deal (0.01) closed with loss or by Stop Loss.
  2. The next deal will be opened with lot 0.01 * 2 = 0.02.
  3. If the previous deal is closed by Stop Loss, then the following deal will be opened with lot 0.04.

If the previous deal is closed with profit or by Take Profit, then the following deal will be opened with the initial lot 0.0.

12. Working time of the Expert Advisor

OpenHour (in hours), OpenMinute (in minutes), CloseHour (in hours), CloseMinute (in minutes).

These parameters are used for adjusting the time range of the Expert Advisor operation. At that, this range affects only opening new positions. Trailing stop and break even will work independently from the range.

For example, you want the Expert Advisor to trade only from 2 p.m. to 6.35 p.m. Then the parameters will look like:

OpenHour= 14, OpenMinute=0, CloseHour=18, CloseMinute =35.

Deals will be performed from 14:00 to 18:35; all the rest of time the signals of the strategy will be ignored.

13. Classic TrailingStop

TrailingStopUSE (true - false), IfProfTrail (true - false), TrailingStop (in points), TrailingStep (in points).

These parameters enable\disable automatic tracking the positions by moving Stop Loss in + zone.

TrailingStopUSE - enables\disables trailing stop function.

IfProfTrail - if true, the Expert Advisor starts modification only when the position is in the break even. If false, trailing stop starts working only after opening a position and pulls it after the price.

TrailingStop - distance in points from the current price to the estimated Stop Loss. This parameter can be less than the minimum allowed parameter on your server.

TrailingStep - Stop Loss modification step.

For example, Stop Loss will be modified each TrailingStep points on the distance of TrailingStop points from the current price.

14. Function for closing by total profit\loss

These parameters adjust the possibility to close deal(s) by the given instrument and magic reaching one of the parameters.

  • TypeofClose=1 - closing by profit: 1 - Dollar, 2 - Points, 3 - % of Equity, 4 - % of Balance;
  • CloseProfit=false - close if +;
  • prifitessss=10 - number of units (depending on TypeofClose) for closing profit;
  • CloseLoss=false - close, if lossss= -10 - number of units (depending on TypeofClose) for closing loss;

For example:

  • If you would like to close several deals BUY\SELL at profit on the account in 10 $:
    TypeofClose=1, CloseProfit=true, prifitessss=10.
  • If you would like to close several BUY\SELL deals at 200 point loss on the account:
    TypeofClose=2, CloseLoss=true, lossss=200.
  • If you would like to close several BUY\SELL deals at a loss on the account of 5 % from the deposit and also close several BUY\SELL deals at a profit on the account of 10 % from the deposit: TypeofClose=4, CloseLoss=true, lossss=5, CloseProfit=true, prifitessss=10.

15. Moving Stop Loss to break even

MovingInWLUSE (true - false) LevelWLoss (in points) LevelProfit (in points).

These parameters adjust the possibility to modify deals by moving the Stop Loss to break even at the earliest opportunity.

For example:

  • You would like to set Stop Loss in the break even, when the deal will score +10 points of profit:
    MovingInWLUSE = true, LevelWLoss=0, LevelProfit=10.
  • You want to set Stop Loss at +5 points, when the deal will score +20 points of profit:
    MovingInWLUSE = true, LevelWLoss=5, LevelProfit=20.

Therefore the difference between LevelProfit-LevelWLoss must always be greater or equal to the minimum stop on the server.

16. Averaging positions

  • OnlyModify - this function allows the EA working in the mode of tracking the current positions without opening new ones.
  • TakeProfit - the number of points for placing a common take profit for all positions.
  • Distance - the number of points for placing additional orders relative to the main position.
  • TrailingStopa - the number of points for the trailing of profit. Once the profit on a currency pair becomes greater than or equal to TrailingStopa (in points), the system will trail the stop loss after the price. At that, the take profit will be set to zero.
  • LotsMartin - increases the volume of the next deal according to the Martingale principle. 1 - without increasing.
  • MaxOrders - the maximum number of deals for a currency pair (considering deals opened outside of the program).
  • MaxLot - the maximal volume that can be opened by the averager.
  • StopLosss - the stop loss for the common positions by the currency pair.

The Expert Advisor will open a position in the same direction after the specified number of points (Distance). The volume of the position is calculated as the volume of the previous deal * LotsMartin. Also the Expert Advisor modifies the common take profit for all deals setting it as "The point of zero line of all positions of the same direction" + TakeProfit points.

It also can modify the stop loss of all positions (if TrailingStopUSE = true) if the price breaks trough the level "The point of zero line of all positions of the same direction" and goes behind it for TrailingStop points.

The inputs parameters of the Expert Advisor include MaxOrders - the maximum number of deals for averaging.

Rodrigo da Silva Boa
2015.11.19 06:32 

Bom para contas demonstração, deixe seu dinheiro longe dele.

Gennadiy Sidorov
2014.05.16 07:58 

User didn't leave any comment to the rating

2013.10.26 20:41 


Version 15.821 - 2015.08.28
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

Updates for brokers using IOC order filling type.
Fixed averaging error.

The Expert Advisor has been updated to adjust to the new terminal build.
Removed the limitation on the minimum averaging distance.
Version 15.227 - 2015.03.02
Fixed signal definition on some brokers.
Version 15.123 - 2015.02.04
Fill policy parameter has been added to the external parameters:

This fill policy means that an order can be executed only with the specified volume. If the required volume for a given financial instrument is currently unavailable in the market, the order will not be executed. The required volume can be filled using several offers currently available in the market.

This means that a trade will be executed with the maximum volume available in the market within the value indicated in the order. In case entire order volume is not available in the market at the moment, a partial fulfillment is possible, but any portion that cannot be filled immediately is canceled.

This fill policy is used for market, Limit and Stop Limit orders and only in the Market Execution and Exchange Execution modes. In case of partial filling a market or Limit order with remaining volume is not canceled but processed further.
When a Stop Limit order triggers, a relevant Limit order will be placed with the Return fill policy.
Version 14.962 - 2015.01.22
The version has been completely updated based on the update of the paid version https://www.mql5.com/en/market/product/1230