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


Universal Multicurrency Trading System with Averaging Function that uses Moving Average Convergence/Divergence (MACD)

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 the 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 strategies;
  • The function of averaging a losing position bringing it to profit.


Indicators and Signals

Moving Average Convergence/Divergence (MACD) (Signal 2)

The signals are also simple: BUY - the main line is higher than the signal one, SELL - the main line is below the signal one. "No signal" is not used.


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 drawn on 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 were equal to 0, in this example the deal would not be opened, the server will 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 2 p.m. to 6.35 p.m.; 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 right 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 10$ profit on the account: TypeofClose=1, CloseProfit=true, prifitessss=10.
  • If you would like to close several deals BUY\SELL at 200 point loss on the account: TypeofClose=2, CloseLoss=true, lossss=200.
  • If you would like to close several deals BUY\SELL at the loss of 5 % from the deposit and also close several deals BUY\SELL at the profit 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.

At that, 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 to work in the mode of tracking the current position 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.

Gennadiy Sidorov
2014.05.15 08:06 

User didn't leave any comment to the rating

2013.10.26 17:00 

Этот робот тоже хорош!!!! буду следить за Вашей деятельностью !

2013.07.31 08:33 

User didn't leave any comment to the rating

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.

Fill policy parameter has been added to the external parameters: TypeFilling

Works on ECN account - updates the list of orders using a delay.
Modifies stop loss and take profit after opening the position.
Version 13.820 - 2013.08.21
Amended the autolot function for brokers that have symbols with suffixes. For example, EURUSD.m.
Version 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.
Version 13.237 - 2013.07.24
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.