• Overview
  • Reviews (2)
  • Comments (55)
  • What's new


The EA allows creating a trading system based on a custom indicator. The trading robot automatically opens/closes trades by signals of the indicator that places the values not equal to 0 and EMPTY_VALUE to the buffer. The EA checks the values of the specified indicator buffers, as well as opens/closes and tracks deals according to specified parameters.

The trading robot features the following deal-tracking functions:

  • Setting SL/TP for deals;
  • calculating volume by specified risk;
  • transfer to breakeven;
  • partial closure;
  • increasing a deal volume after receiving a loss;
  • closing all orders by a total profit value.

To implement your own indicator, enter its name and set applied buffers. The indicator should be placed in the standard folder.


  • startLot - initial deal volume.
  • maxLot - the maximum deal volume.
  • MaxRisk - risk per deal, 0 - not used.
  • Martin_factor - order volume multiplier after a loss;
  • stepProfit - profit step for partial deal closing;
  • stepProfit_factor - volume in case of partial order closing;
  • stopLoss,takeProfit - SL and TP in points;
  • stopLoss_factor - SL level based on TP;
  • takeProfit_factor - TP level based on SL;
  • noLoss - level for moving to breakeven;
  • noLoss_factor - level for moving to breakeven in fractions of SL;
  • trailStop,trailStep - trailing stop level and step in points;
  • DualOrders - allow opening sell orders when active buy deals are present and vice versa;
  • UseAllSignals - allow orders by all signals;
  • ProfitNum,ProfitSumm - the number of orders the amount for closing by total profit;
  • minProfit_factor - partial closure level of deals;
  • minProfit_noLoss - allow moving to breakeven at partial closing;
  • IndicatorName - name of the indicator;
  • openBuyBufferIndex - buffer for Buy orders;
  • openBuyStopBufferIndex - buffer for BuyStop orders;
  • openBuyLimitBufferIndex - buffer for BuyLimit orders;
  • takeProfitBuyBufferIndex,stopLossBuyBufferIndex,closeBuyBufferIndex - buffer for TP, SL and closure levels for Buy orders;
  • minProfitBuyBufferIndex - buffer for partial closing of Buy orders;
  • openSellBufferIndex - buffer for Sell orders;
  • openSellStopBufferIndex - buffer for SellStop orders;
  • openSellLimitBufferIndex - buffer for SellLimit orders;
  • takeProfitSellBufferIndex,stopLossSellBufferIndex,closeSellBufferIndex - buffer for TP, SL and closure levels for Buy orders;
  • minProfitSellBufferIndex - buffer for partial closing of Sell orders;
  • BarIndex - bar index in a buffer;
  • useMaFilter - filtering by the Moving Average;
  • MaFilterTimeFreme - timeframe of the Moving Average;
  • MaFilterPeriod,MaFilterMethot,MaFilterPrice - period, method, applied period of the Moving Average;
  • useRsiFilter - allow filtering by the RSI indicator;
  • rsiFilterTimeFrafe, rsiFilterPeriod, rsiFilterPrice, rsiFilterLevel_UP, rsiFilterLevel_DOWN - RSI parameters;
  • useStochFilter - allow filtering by the Stochastic indicator;
  • stochFilterTimeFrafe, stochFilterK, stochFilterD, stochFilterSlow, stochFilterMethod, stochFilterPrice, stochFilterLevel_UP, stochFilterLevel_DOWN - Stochastic parameters;
  • useParabolicFilter - allow filtering by the Parabolic SAR indicator;
  • parabolicFilterTimeFrafe, parabolicFilterStep, parabolicFilterMax - Parabolic SAR parameters;
  • useStdFilter - allow filtering by the StdDev indicator;
  • stdFilterTimeFrafe, stdFilterPeriod, stdFilterLevel, stdFilterMethod, stdFilterPrice - StdDev parameters;
  • useMacdFilter - allow filtering by the MACD indicator;
  • macdFilterTimeFrafe, macdFilterFast, macdFilterSlow, macdFilterSignal, macdFilterPrice - MACD parameters;
  • CustomEventBuy,CustomEventSell - custom buy and sell events;
  • timeStart,timeEnd - trading start and end hour;
  • slippage - slippage;
  • MAGIC - identifier;
  • useMail,useNotification - email and push notifications;
  • messageText - message text;
  • TesterAutoTradeWeek - automatic daily buy signal in the strategy tester;
  • useButton - output the Buy/Sell buttons on the chart;
  • pendingReversClose - remove pending orders when an opposite signal is received;
  • pendingMinMax - place pending sell orders above the previous ones, and buy orders - below.
lchenot 2018.04.18 00:32 

This is AMAZING work. This is genius, both for the idea and implementation.

I have been able to backtest a large numbers of indicator to assess which ones were the best suited for my market and strategy. Huge time and money saver.

Thank you for this wonderful work.

Michael Maggi
Michael Maggi 2016.12.28 14:37 

Starting off well for 2017 preparation. I will post more on my profile page to show the trading specifics but the Universal EA definitely does what it promises. I will add a comment with a jpg.

Version 1.19 2019.01.08
Добавлена работа с графическими объектами
Version 1.18 2018.07.03
1. Added the ability to place pending orders, parameters:
- openBuyStopBufferIndex;
- openBuyLimitBufferIndex;
- openSellStopBufferIndex;
- openSellLimitBufferIndex.
2. Options for working with pending orders:
- pendingReversClose - remove the opposite orders when a new signal is received;
- pendingMinMax - place pending sell orders above the previous ones, and buy orders - below.
3. Added options for setting the SL level based on TP or the TP level based on SL, parameters:
- stopLoss_factor;
- takeProfit_factor.
Version 1.17 2018.05.08
Added a signal for partial closing of deals.
Version 1.16 2018.05.03
Added filters based on signals of indicators: RSI, Stohastic, SAR, StdDev, MACD
Version 1.8 2016.12.19
Added handling of the custom chart events:
- CustomEventBuy
- CustomEventSell
Added the TesterAutoTradeWeek parameter for the automatic validation of the EA on mql5. In testing mode, the EA automatically generates buy events 1 time per week.
Version 1.5 2016.06.21
Added filter of trades based on the Moving Average. If the price is above MA, only Buy trades can be performed. If the price is below MA, only Sell trades are executed.
Filter parameters:
-useMaFilter - enable MA based filtering of signals;
-MaFilterTimeFrafe - timeframe of the Moving Average;
-MaFilterPeriod - period of the Moving Average;
-MaFilterMethod - method of the Moving Average;
-MaFilterPrice - prices of the Moving Average.
Version 1.3 2016.06.07
- Minor improvements
- Added email and mobile notifications