The xCustomEA is a universal trading advisor that uses iCustom indicators.

EA The xCustomEA Universal trading advisor on iCustom indicators.

Exp – TickSniper Automatic Expert Advisor for Metatrader. Tick scalper
Copylot – Forex copier trade deals for MetaTrader. Full instructions
Exp – TickSniper Automatic Expert Advisor for Metatrader. Tick scalper
Copylot – Forex copier trade deals for MetaTrader. Full instructions

<

  • Main
  • Documentation
  • Settings
  • FAQ
  • Changelog
  • Reviews
  • Comments
  • Extra

About xCustomEA

Universal trading adviser on custom indicators for MetaTrader .

Exp – The xCustomEA Universal trading advisor on custom indicators iCustom.

Our new advisor The xCustomEA is based on the advisor The X – Universal EA

The functionality of the universal trading advisor The xCustomEA exactly repeats all the parameters of our advisor The X except for one thing:

The xCustomEA works on a custom indicator and can program its trading strategy for the MT5 and MT4 terminals.

In other words: The xCustomEA has a connection with custom indicators that can be downloaded from the Internet or the mql5 market.

Any custom indicator from the internet!

Builder strategy.

Write the name of your indicator with Arrow and signal buffers, and our EA xCustomEA trades on these signals.

You can also use many of our built-in functions.

How does it work?

New EA based on iCustom indicators

You can test iCustom indicators from market for free

You can program strategy in 5 minutes

All Metatraders terminals, All account type, All symbols

An example of dividing a custom indicator into the Advisor settings

Example of strategy programming for our xCustomEA

What do people write about xCustomEA?

  • ROBERT URBANSKI 2022.12.02 18:40
    I rent this EA for one month for testing. I give 5 stars in begin for Suport. After month I will update info about EA but now I can tell. It have many interesting settings. I tried work with many custom indicator (not build). Works very impresive.
    ROBERT URBANSKI
    ⭐⭐⭐⭐⭐
  • DadeSubandryo 2022.09.04 12:56
    Great support for consumers. still learning stage & EA started to work as i want. I will update the stars & comments if necessary. Thank you
    DadeSubandryo
    ⭐⭐⭐⭐⭐
  • Stanimir Stanchev 2020.06.29 09:55
    I am using xCustomEA for two months and i am extreamly happy with it and the support i'd received from Vladislav. His Exp4 Tester PAD for Strategy Tester is also very useful when it comes to test a strategy in visual mode. My favorite developer as of now!
    Stanimir Stanchev
    ⭐⭐⭐⭐⭐
  • Hanxyork 2020.01.31 03:00
    I purchased the xCustomEA few days ago, Vladislav answered all my questions quickly, he is very professional, responsible, knowledgeable, honest and dedicated, he helped me to start up my xCustomEA in a VPS. I am buying more of his products, definitely. Thank you very much Vladislav.
    Hanxyork
    ⭐⭐⭐⭐⭐
  • 189114nickynomates 2020.11.26 03:06
    This has opened up a whole new world to my trading. The concept is pure brilliant. The forums very informative and you always get help to questions detailed in the correct way. The biggest gain I have received is widening my understanding of the scope that can be achieved in cleaver trading with this ea. Keep up the good work.
    189114nickynomates
    ⭐⭐⭐⭐⭐
  • Sammy Boy 2020.10.28 12:00
    Excellent EA. Vladislav has put in great effort to come up with such sophisticated EA
    Sammy Boy
    ⭐⭐⭐⭐⭐
  • Franco Alves 2020.07.08 20:09
    Very good!!
    Franco Alves
    ⭐⭐⭐⭐⭐
  • Valter Oliveira 2020.06.01 01:09
    Excellent product for implementing Expert Advisors (EA) using existing indicators in the MQL5 market. I thank the developer for making this tool available to us.
    Valter Oliveira
    ⭐⭐⭐⭐⭐
  • Atila R Akdeniz 2018.12.28 10:01
    I just bought the EA. I have been using The X Universal for a long time now, with great results. This EA does everything TheX Universal does and much more, including integration of other EA's and signals and independent strategies etc. I guess there will be a little bit of a learning curve to understand its full functionality and use it to its full power. 5 stars for such an innovative product from a great designer.
    Atila R Akdeniz
    ⭐⭐⭐⭐⭐

You can Download free xCustomEA

Get started for FREE!

You can download and install our program for free!

And you can test it on your DEMO account without time limits!
And you can also test our program for free on a REAL account using the USDJPY symbol!

You can Buy full version of xCustomEA


$60/ 3 months

Rent for 3 months

For MetaTrader 4
  • MetaTrader 4
  • 3 months
  • Unlimited accounts
  • 10 computers!
  • FULL functions
  • Technical Support

$60/ 3 months

Rent for 3 months

For MetaTrader 5
  • MetaTrader 5
  • 3 months
  • Unlimited accounts
  • 10 computers!
  • FULL functions
  • Technical Support



The X and The xCustomEA : Testing and Optimization

Useful links


Download MetaTrader

How to buy How to install Strategy Tester VPS MetaQuotes MT4 Log Files MT5 Log Files


Description

Exp – The xCustomEA Universal trading advisor on custom indicators.

Forex Builder for your strategy.

Our new advisor, The xCustomEA, is based on the advisor The X – Universal EA.

The functionality of the universal trading advisor The xCustomEA exactly repeats all the parameters of our advisor The X except for one thing:

The xCustomEA works on a custom indicator and can program its trading strategy for the MT5 and MT4 terminals.

In other words, The xCustomEA is connected to custom indicators that can be downloaded from the Internet or the mql5 market.

Any custom indicator from the internet!


The X and The xCustomEA : Testing and Optimization


Foreword

When programming Expert Advisors(EA) to order(Freelance), we were not surprised that 90% of orders are based on strategies for indicators.

Therefore, our primary work was to embed a custom indicator in our template for writing an advisor.

But the cost of such work + template for writing + open-source of such a template is too high.

Not all traders agree to write a trading advisor for one custom indicator.

After all, if your indicator is not profitable enough, then you will have to order a new advisor on a new indicator for the same money.

We found a way out of this situation and developed a new universal trade advisor, The xCustomEA.

This advisor does not have a pre-set strategy. It can trade on signals from other indicators.

You can program your custom indicator and our advisor. 

The xCustomEA will open positions on signals.

By purchasing Our Universal Trading Advisor, The xCustomEA, you can program Expert Advisors on indicators every day!

Attention : You are not required to buy an indicator to test Expert advisor in the strategy tester.

You can download the indicator in the strategy tester and check our advisor on this indicator in the strategy tester.

Only after getting profitable results in the strategy tester, you can buy a custom indicator and run an advisor on this indicator on a real or demo account!

Article : Optimization and testing! Search for advisor settings!

What is the difference between The X and The xCustomEA?

These two EA are built on the same basis (MQL CODE and functions) and differ only in the fact that:

The X = Universal EA.

This adviser works for standard indicators of terminal MetaTrader (about 20 standard strategies of standard indicators).

The xCustomEA = This Universal Advisor who works for custom indicators. +Added 20 standard strategies from The X List of indicators and filters

Benefits xCustomEA

  1. This advisor does not have built-in strategies. You can set custom indicators in this EA.
  2. This means that you can choose a custom indicator, which shows the signals with arrows and trade on it.
  3. Also, in this EA, you can program your strategy on any indicators that are on the Internet!
  4. You can download ready-made strategies that have been programmed for this advisor. This list is updated whenever possible.
  5. You can download all signals from the strategy The X – and use your custom changes to the strategies!

If you do not know how and do not want to learn programming and you enough of standard indicators, your choice =The X 

If you know how to program, and you have an interest in the study of other indicators, your choice =The xCustomEA 

Functions of these advisors = Equal!

Basic Functions and Parameter Description

We will not dwell on the detailed description of the main parameters of the advisor because 99% of the settings correspond to our system, The X.

A full description of all the basic parameters and functions is described in the instructions for The X. Parameter Description Exp The xCustomEA.

In The xCustomEA, there are such functions as:

  1. Autolot (calculation of the lot from the current balance), money management;
  2. Fixed lot;
  3. Work on time (limiting the work of an adviser on trading time);
  4. Trailing stop (standard, with the “Only profitable” algorithm);
  5. Parabolic SAR trailing stop
  6. Error handling functions for real accounts;
  7. Block closing on total profit and loss with the ability to disable the adviser on the account;
  8. Breakeven (set stop loss to break-even point) (set stop loss to zero);
  9. Martingale (increase in the next lot after a losing position);
  10. Work solely on indicator signals (Signal – opening, Signal – closing, an opposite order – opening);
  11. Closing the opposite signal when changing the signal;
  12. The function “REVERSE” flips the signals of your strategy;
  13. Function averaging unprofitable position.
  14. The function of the additional opening of positions on the trend and against the trend.
  15. Virtual stop loss, take profit, and trailing stop functions.
  16. Work positions, pending orders, limit orders.
  17. Work with drawdown;
  18. Work with a limit on profit and loss;
  19. Work with test results;
  20. Work in the semi-automatic mode without opening a position with the notice that the strategy received a signal to open. The ALERT is displayed on the screen;

A full description of all the basic parameters and functions is described in the instructions for The X. Parameter Description Exp The xCustomEA

Signal and Filter Definition

Signal

  1. Signal – occurs when there are all conditions for the signal, for example, the fact of crossing the MA lines. Or the appearance of a new point, ZigZag.
    • For example, The intersection of level 70 for the RSI indicator is a signal. And if the RSI is above level 70, then this is already a filter.
  2. The signal—what appears at the moment of quotation receipt—is fixed on the bar. The advisor accepts that a signal has been made.
    • For example: Turned on the light. This is a signal because the light has just turned on. When you turn on the light, the man wakes up. This is a signal.
  3. Opening positions occur after the signal is made. The lines are crossed, and then the position is opened. If the lines were crossed before, this is not a signal. The signal has passed.
  4. +Added 20 standard strategies from The X List of indicators and filters

Filter

  1. Filter—This is the indicator’s current position, such as the MA lines’ current position relative to each other. Or current last vertex ZIGZAG
  2. The filter is what the indicator is currently showing. This is not a signal fact; it is the indicator’s current position.
    • For example, the light was burning. This is a filter because the light has already been turned on, and it is already on. When the light is on, the person is no longer asleep. This is a filter.
  3. The current value of the indicator filters the signals.
  4. If a Fast MA is above a slow MA, then this is a filter that only BUY should open.
  5. +Added 20 standard strategies from The X List of indicators and filters

Easy installation of the custom indicator in signals and filters

There are 3 types of work Expert Advisors:

xCustomEA – Advisors work on our indicator, in which you program your strategy.

If you need to program the work of the advisor on the indicator, go to the next section: Programming your strategy

xArrow :
xArrow – The EA works directly with a custom indicator that has Arrow-type buffers that can be used for the EA.

For example, Buffer with indicator signals to BUY and Buffer with indicator signals to SELL;

Such buffers must be of the Arrow type.
Our Expert Advisor determines the signal by type: The buffer value must be above 0 and not equal to an empty value.


// — We check the conditions and set the value for sig

if (xCustom_SIGNAL_BUY_buffer[OWNSIGNAL_shift]!= EMPTY_VALUE && xCustom_SIGNAL_BUY_buffer[OWNSIGNAL_shift]> 0) sig = 1; 
else if (xCustom_SIGNAL_SELL_buffer[OWNSIGNAL_shift]!= EMPTY_VALUE && xCustom_SIGNAL_SELL_buffer[OWNSIGNAL_shift]> 0) sig = -1;

xColorArrow:
Added the type of indicator signals (xColorArrow with 1 Buffer and 2 colors), for which the signal arrows have 2 different colors (DRAW_COLOR_ARROW).


List of Indicators:

  • NoSignal=100,//No SignalToOpenPosition
  • Ma=101,//Moving Average
  • MACD=102, //Moving Average Convergence / Divergence (MACD)
  • STOCH=103,//Stochastic Oscillator
  • RSI=104,//RSI
  • CCI=105,//Commodity Channel Index (CCI)
  • WPR=106,//Williams Percent Range (WPR)
  • BB=107,//Bollinger Bands
  • Envelopes=108,//Envelopes
  • Alligator=109,//Alligator
  • OsMA=110,//Moving Average of Oscillator (OsMA)
  • AO=111,//Awesome Oscillator (AO)
  • ISH=112,//Ichimoku
  • AC=113,//AC
  • BAR=114,//Bar BEAR/BULL
  • ADX=115,//ADX
  • ZigZag=117,//ZigZag
  • MFI=120,//Money Flow Index
  • Fractals=121,//Fractals

Easy Install iCustom Indicator to the input of our xCustomEA

If you do not want to program your strategy and your custom indicator allows you to work directly with the advisor, you can specify the name of the indicator and set buffers for its work on the signals on BUY and SELL

for example :

1. Write the name of the custom indicator! If this indicator was downloaded from the MQL5 market, then you need to specify from the Market folder:

MarketPipFinite Trend PRO

Be sure to write a double backslash \

2. Specify the type of xArrow signals.

3. Specify the number of signal buffers for opening BUY (in this example, buffer number 8)

4. Specify the number of signal buffers for opening SELL (in this example, buffer number 9)

How to find buffer numbers

Thus, we do not need to program our indicator for the work of the advisor.

Our example of a custom indicator contains buffers for the advisor’s work, and we can directly use it!

In our section, The xCustomEA Strategy Examples, we will post examples of programming strategies and advisers on indicators known in the market!

Example Pipfinite Trend Pro+xCustomEA

An example of advisor on the indicator PipFinite Trend PRO

PipFinite

Indicator template file

For ease of use advisor:

When you first start the advisor, an indicator template file will be created in your terminal’s folder – Files

This file can be used as a template for writing an indicator strategy.

To find a file, click in your terminal menu File-Open data directory

Open this file with your MQL editor

In the file, you will see examples of the use and steps of programming a strategy.

After creating an indicator strategy, save this file in your terminal folder – Indicators/

After that, specify this file in the settings of the SignalNameIndicator advisor

Programming your strategy

You should know the minimum programming rules to write your strategy.

Or add a ready-made strategy on indicators from a ready-made file (indicators from the Internet, for example)

Programming advisors for MetaTrader 5 is more complicated than programming for MetaTrader 4.

But the MT5 terminal allows you to create more powerful strategies and also has a more advanced strategy tester.

For ease of programming

  1. Open our indicator source code Ind – The xCustomEA or Ind – The xCustomEA Example TheX;
  2. Press the key combination Ctrl + F, and you will see the search bar;
  3. Enter the name Step – For this word, in our source code, you can navigate and quickly write your strategy.
  4. Each step is commented on and contains an example.
  5. To learn how to program your strategy, you can gradually uncomment the lines with an asterisk // *

We will analyze each step in detail!

MetaTrader 4 Programming your strategy using a custom indicator in MT4

Programming an advisor on the indicator in MT4 consists of 4 steps:

MetaTrader 4 Step 1: Step of loading indicators into resources!

// Step 
// This part of the code for programming your strategy in open source
// this part is for open source
//
// In order for the indicator to be built into the advisor when compiling, you need to load it into the resources of the advisor
In the case of the expert advisor during the compilation
// # # # # 
// for example:
// * #resource "IndicatorsMACD.ex4"

Here we are obliged to add the indicators we need to resources.

This will allow us to compile the indicator for the market, as well as relieve us of unnecessary problems when the compiled advisor does not suddenly find the indicator on the other computer!

Rules for writing the name of the market: The full name of the folders, starting with Indicators!

Folder denoted by

For example :

If the path to your indicator looks like this:

 C:ROBO MT4MQL4IndicatorsExamplesMACD.ex4 

Then, the path to this indicator in the programming language is written as:

IndicatorsExamplesMACD.ex4

MetaTrader 4 Step 2: The primary step of creating strategies and signals for opening positions!

 // Step 
// This part of the code for programming your strategy in open source
// this part is for open source
//
// Here we create our signal for opening positions. Fill data buffers
// Here we create our signal for opening positions. Fill in the data buffer
// # # # # 
// for example:
// * if (sigInd == 1)
// * {
//
// Fill in the data
// We fill in the data
//
//
// * double CustomMain = iCustom (StrategySymbol, StrategyTimeFrame, "::IndicatorsMACD", periodma1, periodma2,9, MAprice,
// * MODE_MAIN, StartCopyI + ShiftIndicator);
// * double CustomSig = iCustom (StrategySymbol, StrategyTimeFrame, "::IndicatorsMACD", periodma1, periodma2,9, MAprice,
// * MODE_SIGNAL, StartCopyI + ShiftIndicator);
//
// * double CustomMain2 = iCustom (StrategySymbol, StrategyTimeFrame, "::IndicatorsMACD", periodma1, periodma2,9, MAprice,
// * MODE_MAIN, StartCopyI + ShiftIndicator + 1);
// * double CustomSig2 = iCustom (StrategySymbol, StrategyTimeFrame, "::IndicatorsMACD", periodma1, periodma2,9, MAprice,
// * MODE_SIGNAL, StartCopyI + ShiftIndicator + 1);
//
//
// Here we write our strategy, in this example it is the intersection of two lines,
// it is the intersection of two lines
//
// * if (CustomMain> CustomSig && CustomMain2 <CustomSig2)
// // Buy sig
// * sig = 1;
// * if (CustomMain <CustomSig && CustomMain2> CustomSig2)
// // Sell sig
// * sig = -1; //
// Write the data that will be displayed in the log when opening positions on the signal
// When you open the door
//
// * InfoAboutSignal = "InfoAboutSignal sigInd =" + (string) sigInd + "sig =" + (string) sig
// * + "CustomMain =" + CustomMain
// * + "CustomSig =" + CustomSig
// * + "CustomMain2 =" + CustomMain2
// * + "CustomSig2 =" + CustomSig2
// *;
// // --- return the trading signal
// * return (sig);
// *} 

This step is very important for the advisor. Although all other steps are required, the advisor will not work otherwise.

I have indicated my comments in the code!

  1. Programming code for strategy and signal individually. It depends on the chosen strategy and indicators.
  2. Getting buffers strategies ……..
  3. I want to note only that in this block, you can specify any strategy.
  1. Programming strategy. In this case, the intersection of two lines.
  2. Important: The signal for BUY is 1, and for SELL it is -1

I will post examples of strategies on our forum!

MetaTrader 4 Step 3: Step for specifying filters from your indicators or using your indicator as a filter for a strategy!

// Step 
// This part of the code for programming your strategy in open source
// this part is for open source
//
// Here we create our filter to filter the signals. Fill data buffers
// Here we create our filter for signal filtering. Fill in the data buffers
// # # # # 
// for example:
// * if (sigInd == 1)
// * {
//
// Fill in the data
// We fill in the data
//
//
// * double CustomMain = iCustom(StrategySymbol, StrategyTimeFrame, "::IndicatorsMACD", periodma1, periodma2,9, MAprice,
// * MODE_MAIN, shift);
// * double CustomSig = iCustom(StrategySymbol, StrategyTimeFrame, "::IndicatorsMACD", periodma1, periodma2,9, MAprice,
// * MODE_SIGNAL, shift);
//
// Here we write our strategy, in this example it is the intersection of two lines,
// it is the intersection of two lines
//
// * if (CustomMain> CustomSig)
// // Buy sig
// * sig = 1;
// * if (CustomMain <CustomSig)
// // Sell sig
// * sig = -1; //
// Write the data that will be displayed in the log when opening positions on the signal
// When you open the door
//
// * InfoAboutSignal = "InfoAboutSignal sigInd =" + (string) sigInd + "sig =" + (string) sig
// * + "CustomMain =" + CustomMain
// * + "CustomSig =" + CustomSig
// *;
// // --- return the trading signal
// * return (sig);
// *} 

There is nothing complicated in programming the code in this step, and it is similar to the previous step.

The only difference is that at this step, you are programming your indicators as a Filter.

You can not specify the signals on the indicator; you can specify only the filter. Or vice versa! It all depends on the strategy.

MetaTrader 5 Programming your strategy on a custom indicator in MT5

MetaTrader 5 Step 1: Step of loading indicators into resources!

// Step 
// This part of the code for programming your strategy in open source
// this part is for open source
// 
// In order for the indicator to be built into the advisor when compiling, you need to load it into the resources of the advisor
In the case of the expert advisor during the compilation
// # # # #
// for example:
// * #resource "IndicatorsExamplesMACD.ex5"

Here, we are obliged to add the indicators we need to resources.

This will allow us to compile the advisor for the market and also relieve us of unnecessary problems when the compiled advisor does not suddenly find the right indicator on another computer!

Rules for writing the name of the market: The full name of the folders, starting with Indicators!

Folder denoted by

For example :

If the path to your indicator looks like this:

C:ROBO MT5MQL5IndicatorsExamplesMACD.ex5

Then, the path to this indicator in the programming language is written as:

IndicatorsExamplesMACD.ex5

MetaTrader 5 Step 2: Declare variables for storing the handles of strategy indicators!

// Step 
// This part of the code for programming your strategy in open source
// this part is for open source
//
// declare the array variable to handle
// Declare the variable of the handle array
// # # # #
// for example:
// * int h_custom;
// * int h_custom2;

Here, we indicate the names of our handles that were created above!

There is nothing complicated here.

Handles are created in the form of arrays to use multi-currency in the advisor and use the ability to specify 6 signals or filters at once!

MetaTrader 5 Step 3: Variable declaration step for storing indicator data!

// Step ###
// This part of the code for programming your strategy in open source
// this part is for open source

// declare an array variable of indicator values
// Declare the variable of the handle array

// for example:
// * double custom1_buffer[];
// * double custom2_buffer[];

Here, we specify the names of our data for buffers!

There is nothing complicated here.

The data on the indicator values on each bar will be stored in these arrays. If you need to use multiple buffers, you can use multiple variables.

In our case, for example, we need 2 buffers for the signal and main lines of the MACD indicator.

MetaTrader 5 Step 4: Step of creating handles of indicators for downloading to the advisor!

// Step 4 
// This part of the code for programming your strategy in open source
// this part is for open source
//
// You need to create a record in the array so that the adviser assigns the handle of the indicator during initialization
// If you’re an expert
// # # # #
// for example:
// * case 1: h_custom = iCustom(StrategySymbolString, StrategyTimeFrame, "::IndicatorsExamplesMoving AverageMoving Average", MAFastPeriod, MAmethod, MAprice);
// * h_custom2 = iCustom(StrategySymbolString, StrategyTimeFrame, "::IndicatorsExamplesMoving AverageMoving Average", MASlowPeriod, MAmethod, MAprice);
// * if (h_custom == INVALID_HANDLE)
// * {
// * Print ("Failed to get the handle of the Moving Average indicator");
// * return (INIT_FAILED);
// *}
// * if (h_custom2 == INVALID_HANDLE)
// * {
// * Print ("Failed to get the handle of the Moving Average indicator");
// * return (INIT_FAILED);
// *}
// * break; 

This step is needed for our indicators to load once during the advisor’s initialization. In MetaTrader 5, it is not necessary to continually load the indicator on the chart.

When creating a handle, we remember the handle of an already open indicator and use it for further work.

You need to be very attentive here. When creating a handle, we must specify all external variables of the indicator and specify the correct name. Otherwise, the advisor will not be able to load the indicator.

Remember that we uploaded the indicator to the advisor’s resources. Therefore, we will call the indicator from resources!

You can read help on calling indicators via iCustom

We also need a strategy number to write this code. If you have several indicators in one strategy, then you need to specify several indicators but with the same number. That the adviser correctly loaded your strategy.

In our examples above, we need to do this:

h_custom = iCustom (StrategySymbolString, StrategyTimeFrame, "::IndicatorsExamplesMoving AverageMoving Average");
h_custom2 = iCustom(StrategySymbolString, StrategyTimeFrame, "::IndicatorsExamplesMoving AverageMoving Average");
if (h_custom == INVALID_HANDLE)
{
Print ("Failed to get the handle of the Moving Average indicator");
return;
}
if (h_custom2 == INVALID_HANDLE)
{
Print ("Failed to get the handle of the Moving Average indicator");
return;
}
break;

By analogy above, you can add several indicators and handles.

Also, with other strategies that you want to insert into the advisor!

MetaTrader 5 Step 5: The primary step in creating strategies and signals for opening positions!

// Step 5
// This part of the code for programming your strategy in open source
// this part is for open source
//
// Here we create our signal for opening positions. Fill data buffers
// Here we create our signal for opening positions. Fill in the data buffer
// #
// for example:
// * if (sigInd == 1)
// * {
//
// Fill in the data
// We fill in the data
//
// * if (CopyBuffer(h_custom, 0,0,3 + ShiftIndicator, custom1_buffer) <3 + ShiftIndicator)
// * return (0);
// * if (!ArraySetAsSeries(custom1_buffer, true))
// * return (0);
// * if (CopyBuffer(h_custom2,0,0,2 + ShiftIndicator, custom2_buffer) <2 + ShiftIndicator)
// * return (0);
// * if (!ArraySetAsSeries(custom2_buffer, true))
// * return (0);
//
// Here we write our strategy, in this example it is the intersection of two lines,
// it is the intersection of two lines
//
// * if (custom1_buffer[ShiftIndicator + 1] <custom2_buffer[ShiftIndicator + 1] && custom1_buffer[ShiftIndicator]> custom2_buffer[ShiftIndicator])
// * sig = 1;
// * else if ((ShiftIndicator + 1] && custom1_buffer[ShiftIndicator] <custom2_buffer[ShiftIndicator])> (ShiftIndicator + 1]>
// * sig = -1;
// * else sig = 0;
//
// Write the data that will be displayed in the log when opening positions on the signal
// When you open the position
//
// * InfoAboutSignal = InfoAboutSignal + "" + "sigInd =" + (string) sigInd + "TF =" + (string) TF + "Symbol =" + symToWork3 + "sig =" + (string) sig + "" + __ FUNCTION __ + ""
// * + "custom1_buffer[ShiftIndicator + 1] =" + (string)custom1_buffer[ShiftIndicator + 1]
// * + "custom2_buffer[ShiftIndicator + 1] =" + (string)custom2_buffer[ShiftIndicator + 1]
// * + "custom1_buffer[ShiftIndicator] =" + (string)custom1_buffer[ShiftIndicator]
// * + "custom2_buffer[ShiftIndicator] =" + (string)custom2_buffer[ShiftIndicator];
// // --- return the trading signal
// * return (sig);
// *}

This step is very important for the advisor.

Although all other steps are required, the advisor will not work otherwise.

I have indicated my comments in the code!

Our strategy number is the same as in the first steps!

  1. Programming code for strategy and signal individually. It depends on the chosen strategy and indicators.
  2. Getting buffers strategies ……..
  3. I want to note only that in this block, you can specify any strategy.
  4. All indicators that we declared in handles will be loaded into memory and used to build a strategy.

This step can be divided into 2 substeps:

  1. 1. We must copy the data buffers into our data arrays. In the copy settings, we must specify the line numbers (In our case, these are the MACD indicator lines)
  2. We use two lines, MAIN and SIGNAL.
  3. You can read CopyBuffer help.
  4. 2. Programming strategy. In this case, the intersection of two lines.
  5. Important: The signal for BUY is 1, and for SELL it is -1

MetaTrader 5 Step 6: Step for specifying filters from your indicators or using your indicator as a filter for a strategy!

// Step 6 ###
// This part of the code for programming your strategy in open source
// this part is for open source
//
// Here we create our filter to filter the signals. Fill data buffers
// Here we create our filter for signal filtering. Fill in the data buffers
// # # # # #
// for example:
// * if (sigInd == 1)
// * {
//
// Fill in the data
// We fill in the data
//
// * if (CopyBuffer(h_custom, 0,0,3 + ShiftIndicator, custom1_buffer) <3 + ShiftIndicator)
// * return (0);
// * if (!ArraySetAsSeries(custom1_buffer, true))
// * return (0);
// * if (CopyBuffer(h_custom2,0,0,2 + ShiftIndicator, custom2_buffer) <2 + ShiftIndicator)
// * return (0);
// * if (! ArraySetAsSeries(custom2_buffer, true))
// * return (0);
//
// Here we write our strategy, in this example it is the intersection of two lines,
// it is the intersection of two lines
//
// * if (custom1_buffer[ShiftIndicator]! = 0 && custom2_buffer[ShiftIndicator]! = 0)
// * {
// * Alert ("Congratulations! You did a lesson that shows the programming of your strategy!");
// * Alert ("Congratulations! You have done a lesson that shows your programming strategy!");
// *}

// * if (custom1_buffer[ShiftIndicator]> custom2_buffer[ShiftIndicator])
// * sig = 1;
// * else if (custom1_buffer[ShiftIndicator] <custom2_buffer[ShiftIndicator])
// * sig = -1;
// * else sig = 0;
//
// Write the data that will be displayed in the log when opening positions on the signal
// When you open the door

// // --- return the trading signal
// * return (sig);
// *} 

Programming the code in this step is not complicated, and it is similar to the previous step.

The only difference is that at this step, you are programming your indicators as a Filter.

You can not specify the signals on the indicator; you can specify only the filter. Or vice versa! It all depends on the strategy.

You can download our files for optimization for EA

Block connecting a custom indicator (custom strategy) to our advisor 

A new block of work with a custom strategy/indicator has been included in our new advisor.

ParameterDescription

OWN Signal options

SignalNameIndicatorThe name of the custom indicator from which the main signals for opening positions will be received.


 Default: ” Ind – The xCustomEA “
 This is a standard empty indicator into which you can program your strategy according to our example!


 We also created an example of a custom indicator based on The X signals.


Ind – The xCustomEA Example The X
 You can use our example to receive signals using standard indicators.
Description of The X Standard Strategies
SignalTypeIndicatorThe type of indicator for signals.


There are 3 types of work Expert Advisors (EA) and 20 standard indicators (from The X):
xCustomEA – Expert Advisor (EA) works on our indicator, in which you program your strategy.


xArrow :
xArrow – The EA works directly with a custom indicator that has Arrow-type buffers that can be used for the EA.


For example, Buffer with indicator signals to BUY and Buffer with indicator signals to SELL;


Such buffers must be of the Arrow type.
Our Expert Advisor determines the signal by type: The buffer value is not equal to an empty value and above 0.
// — We check the conditions and set the value for sig if (xCustom_SIGNAL_BUY_buffer [OWNSIGNAL_shift]! = EMPTY_VALUE && xCustom_SIGNAL_BUY_buffer [OWNSIGNAL_shift]> 0) sig = 1; 
else if (xCustom_SIGNAL_SELL_buffer [OWNSIGNAL_shift]! = EMPTY_VALUE && xCustom_SIGNAL_SELL_buffer [OWNSIGNAL_shift]> 0) sig = -1;


xColorArrow:
Added the type of indicator signals (xColorArrow with 1 Buffer and 2 colors), for which the signal arrows have 2 different colors (DRAW_COLOR_ARROW).


 When using the xColorArrow signal type, you need to set the following values:
SignalBuferforBUY Buffer number for arrows (Check with the author of your indicator) or by calculating this buffer number.
SignalBuferforSELL = The number of the color buffer for these arrows (Check with the author), usually following the arrow buffer.


Attention! This type supports 2 colors where:


0 (the first color of the arrow) is a signal to open a BUY;
1 (the second color of the arrow) is a signal to open SELL;


If your indicator has these colors reversed, then you can additionally use the Signal_Reverse parameter.
 For more information, we have made an example of using such an indicator with a DRAW_COLOR_ARROW buffer!




Added 20 standard strategies from The X List of indicators and filters
List of Indicators:


NoSignal=100,//No SignalToOpenPosition
Ma=101,//Moving Average
MACD=102, //Moving Average Convergence / Divergence (MACD)
STOCH=103,//Stochastic Oscillator
RSI=104,//RSI
CCI=105,//Commodity Channel Index (CCI)
WPR=106,//Williams Percent Range (WPR)
BB=107,//Bollinger Bands
Envelopes=108,//Envelopes
Alligator=109,//Alligator
OsMA=110,//Moving Average of Oscillator (OsMA)
AO=111,//Awesome Oscillator (AO)
ISH=112,//Ichimoku
AC=113,//AC
BAR=114,//Bar BEAR/BULL
ADX=115,//ADX
ZigZag=117,//ZigZag
MFI=120,//Money Flow Index
Fractals=121,//Fractals
 
IndSigToTradeSelection of the indicator and signal for opening the first and main positions.
 Strategy number from custom indicator SignalNameIndicator


If the specified strategy is not found in the indicator, the Expert Advisor will be unloaded from the chart with an error!

If 0 is specified, then strategy signals are not used, but filters are used!

When using the main Indicator, the signal is generated as is! 
On the current bar!
This means that the signal for opening appears as a fact of executing a signal. 
If there is a signal and the filter does not allow opening the position, then the signal is ignored.


No Signal: When chosen, the advisor ignores the main signal and trades on filters.
When using NoSignal, EA can ignore the fact of executing the main signal and work on filters.
When using filters, the Expert Advisor opens a position based on the Current data of the selected Indicator.
TF_IndSigToTrade1The Time frame for the first main indicator.

You can select the Time Frame by which the indicator will receive signals.
Period_Current – the current Timeframe


The larger the TimeFrame, the longer you need to wait for the main signal!
The smaller the TimeFrame, the faster positions (deals) are opened.
SIGNALStrategyInputs External parameters for custom indicator,
in SignalTypeIndicator = xArrow mode!


You can specify the external variables of the indicator as they are written in the settings table, separated by commas!


Important: You must respect the order of variables and the type of variables.

– Type int: the same;
– Type double: the same;
– Type boolean: true or false;
– Type datetime D’year.month.day’ Mandatory indication of D and single quotes.
If you need to write without a specific date, then you need to write as a string: “00:00” or “23:59″D’2018.11.08 ‘D’2015.01.01 ‘”00:00″”23:59”
– Type color C’red/green/blue ‘ Mandatory indication of C and single quotes.
Example: C’0/128/128′ or C’0/256/0′
– Type enum (list, enumeration)x (digit)
If your indicator has a list (selecting a parameter from the list), i.e., In the settings, you need to write a number!
– Type string
In MT5: Be sure to specify the string (not numbers), then You can write as “X”.
In MT4: AttentionIn the version for MetaTrader4, it is forbidden to transfer string parameters! 
When passing string parameters, the indicator may not load correctly!






For example, 
If your indicator has this input parameter:
 int InpCCIPeriod = 1;
 double InpCCIPeriod2 = 2.0;
 color InpCCIPeriod3 = clrGreen;
 string InpCCIPeriod6 = “text”;
 datetime InpCCIPeriod4 = 2018.11.08;
 bool InpCCIPeriod5 = false;
written as:
SIGNALStrategyInputs = 1,2.0, C’0/128/0′, “text“, D’2018.11.08′, false
Signal_ReverseFlip(Reverse) the signals of this Main indicator.

This option reverses the signals of the main indicator only.

If the signal is to open a Buy, then the Expert Advisor opens a Sell!
If the signal is to open a Sell, then the Expert Advisor opens a Buy!
ClosePositionifChangeOWNSignalEnable Disable closing of positions on the opposite signal of the main indicator without the participation of other filters and other parameters.


The ClosePositionifChangeOWNSignal parameter is divided into 3 values:
– False (off)
– True (on),
– OnlyifProfit (Only if positions are in profit);
OWNSIGNAL_shiftThe Number of BAR for the signal that the indicator will generate.


– = Last closed bar; signals on such bar are considered closed.
– = Current open bar; signals on this bar are considered drawings; be careful.


More about this parameter: Detailed article on signal bars
SignalBuferforBUYSignalBuferforSELLThe buffer number is in the custom indicator for receiving a signal to BUY and SELL.
Do not change for Ind – The xCustomEA and Ind – The xCustomEA Example TheX.

Close options

 
 This block allows you to close open positions by signals of a custom indicator.


 You can use this if a custom indicator provides signals for closing positions (separately from the signals for opening a new position).


 Suppose you need to write in this setting in the advisor signals to close positions.


 In that case, you need to specify the indicator name (which may be identical to the indicator name for closing positions), a set of parameters (If they differ from the default indicator parameters), TimeFrame, Bar Shift, and number buffers to receive signals for closing. Separately for BUY and SELL positions.


 Attention: If you want to close a position when receiving the opposite signals, then you do not need to use this block.
CloseNameIndicatorThe name of the custom indicator from which the main signals for closing positions will be received.
CloseTypeIndicatorThe type of indicator for signals. There are two types of work advisors:

– xCustomEA – Advisors work on our indicator, in which you program your strategy.

– xArrow – The EA works directly with a custom indicator that has Arrow type buffers that can be used for the EA.

For example, buffers with indicator signals for closing BUY and buffers with indicator signals for closing SELLSuch buffers must be of the Arrow type. Our Expert Advisor determines the signal by type:
The buffer value is not equal to an empty value and above 0 .

// — We check the conditions and set the value for sig if (xCustom_SIGNAL_BUY_buffer [OWNSIGNAL_shift]! = EMPTY_VALUE && xCustom_SIGNAL_BUY_buffer [OWNSIGNAL_shift]> 0) sig = 1;

else if (xCustom_SIGNAL_SELL_buffer [OWNSIGNAL_shift]! = EMPTY_VALUE && xCustom_SIGNAL_SELL_buffer [OWNSIGNAL_shift]> 0) sig = -1;
CloseTimeFrame
Close_shift
CloseStrategyInputs
CloseBuferforBUY
CloseBuferforSELL
Close_IndSigToClose
 

Filter options

FilterNameIndicatorThe name of the custom indicator from which the filters will be obtained when opening positions.


Default” Ind – The xCustomEA “.
This is a standard empty indicator into which you can program your strategy according to our example!
FilterTypeIndicatorThe type of indicator for the filter. 
There are two types of work advisors:


– xCustomEA – Advisors work on our indicator, in which you program your filter strategy.
– xArrow – Expert Advisor working directly with a custom indicator that has Arrow type buffers (Arrow) or a non-empty buffer value that can be used for the advisor.


For example
Buffer with indicator filter on BUY and Buffer with indicator filter on SELL
Such buffers must be of the Arrow type.
Our Expert Advisor defines a filter by type: The buffer value is not equal to an empty value and above 0 :


// — we check the conditions and set the value for sig if (xCustom_FILTER_BUY_buffer [shift]! = EMPTY_VALUE && xCustom_FILTER_BUY_buffer [shift]> 0) sig = 1; 
else if (xCustom_FILTER_SELL_buffer [shift]! = EMPTY_VALUE && xCustom_FILTER_SELL_buffer [shift]> 0) sig = -1;




–  Or you can use our standard strategies from The X 
FILTERMa=101,//Moving Average
FILTERMACD=102, //Moving Average Convergence/Divergence (MACD)
FILTERSTOCH=103,//Stochastic Oscillator
FILTERRSI=104,//RSI
FILTERCCI=105,//Commodity Channel Index (CCI)
FILTERWPR=106,//Williams Percent Range (WPR)
FILTERBB=107,//Bollinger Bands
FILTEREnvelopes=108,//Envelopes
FILTERAlligator=109,//Alligator
FILTEROsMA=1010,//Moving Average of Oscillator (OsMA)
FILTERAO=111,//Awesome Oscillator (AO)
FILTERISH=112,//Ichimoku
FILTERAC=113,//AC
FILTERBAR=114,//Bar
FILTERADX=115,//Average Directional Movement Index
FILTERBARrelativelyMA=116,//Bar relatively MA
FILTERZigZag=117,//ZigZag
FILTERATR=118,//ATR
FILTERMFI=120,//MFI
FILTERFractals=121,//Fractals 
FILTER_IndSigToTradeSelecting the indicator and filter to filter the main signal.


 Strategy number from custom indicator FilterNameIndicator.


If the specified strategy is not found in the indicator, the Expert Advisor will be unloaded from the chart with an error!

If IndSigToTrade is set to 0, then the advisor will work on filters!
FILTER_TF_IndSigToTradeTimeframe for the filter.
You can select the Time Frame by which the indicator will receive the filter signals.
Period_Current – the current timeframe.


For example
When using MA as the main signal with TF = M30, you can enable filtering on the higher MA with TF = H4.
Filter_ReverseFlip(Reverse) the signals of this filter.


This option reverses the signals of only this filter.
For example
The main indicator MA shows BUY, but the older MA indicator shows SELL
When using this function, we turn over the signals of the older MA and get the aggregate signal BUY.
FILTERSIGNAL_shiftThe bar number for the signal that the indicator will generate,


– = Last closed bar; signals on such bar are considered closed.
– = Current open bar; signals on this bar are considered drawings; be careful.
More about this parameter: Detailed article on signal bars
FilterBuferforBUYFilterBuferforSELLUse the buffer number in the custom indicator to get the filter on BUY and SELL.


Do not change for Ind – The xCustomEA and Ind – The xCustomEA Example TheX

SLTP options

 
 This block allows you to set a Stop Loss or Take Profit when opening positions on the signal, which can be taken from the values of the custom indicator buffers.




 If the Custom Indicator has separate buffers for getting Stop Loss or Take Profit, you can use these values when opening a new position.


AttentionStoploss or take Profit is set only when a new position is opened using a new signal.


The functions of averaging and additional opening use the parameters of stop loss and take Profit from past variables. 
Stoploss and takeprofit obtained from the custom indicator in Averaging and additional opening are not accepted.
 Stoploss and takeprofit from a custom indicator are also set when using the ForcedModifySLTP function.


You need to write in the advisor the stoploss and takeprofit values from the custom indicator, then you need to specify the indicator name
 (must be identical to the name of the indicator for opening/closing positions), a set of parameters (If they differ from the settings of the indicator by
 default), TimeFrame, Shift bar, and the number of buffers to get values. 

Separately for BUY and SELL positions and separately for StopLoss and TakeProfit.
SLTPNameIndicatorThe name of the custom indicator from which StopLoss and TakeProfit will be obtained.
SLTPTypeIndicatorType of indicator.
xPrice – Price value that will be created from variable (StopLoss, TakeProfit)
SLTPTimeFrame 
SLTP_shift 
SLTPStrategyInputs 
SLTPBuferforBUY_StopLossThe buffer number to get the StopLoss value for BUY,
-1 means that this option does not work.
SLTPBuferforSELL_StopLossThe buffer number to get the StopLoss value for SELL positions,
-1 means that this option does not work.
SLTPBuferforBUY_TakeProfitThe buffer
number to get the TakeProfit value for BUY,
-1 means that this option does not work.
SLTPBuferforSELL_TakeProfitThe buffer number to get the TakeProfit value for SELL positions,
-1 means that this option does not work.

Function and Parameters



Parameter
Description

Signal options Additional signal processing unit 

Show_alert_without_opening_positionsAlert

If this option is enabled (TRUE), the Expert Advisor will not open a new position(Deal) on the signal but will only notify the user that a new signal has appeared. 
In this case, all other functions will work in normal mode.

It allows the user to open a position(Deal) on their own if the advisor has issued (create) a signal. 
However, the EA does not make this deal(Position) and does not open the position(Deal) but only alerts the user about the signal.
Send_Push_without_opening_positionsPush Notification

If this option is enabled (TRUE), the Expert Advisor will not open a new position(Deal) on the signal but will only notify the user by phone that a new signal has appeared. 
In this case, all other functions will work in normal mode.

It allows the user to open a position(Deal) on their own if the advisor has issued (create) a signal. 
However, the EA does not make this deal(Position) and does not open the position(Deal) but only sends a Push Notification to the user about the signal.
OpenBarControlOnlyThe work of an advisor is only in open bars (Start of New BAR).


This mode allows you to simulate the work of the Advisor on opening a bar (as in the strategy tester).
When this mode is enabled(True), the Expert Advisor will trade exactly as in OpenPriceOnly testing mode.


All Advisor functions will be executed Once at the opening of a new bar (depending on TF, which TF you have installed, such timeframe will be used), including Modification, Trailing stop, Averaging, the opening of deals by signal, etc.
ControlNewBarforSIGNALCheck the indicator signal only for each new bar (without checking on each tick).

Works only when OWNSIGNAL_shift> = 1 and IndSigToTrade! = NoSignal (with NoSignal, the Expert Advisor checks the values of the filters with each tick)
When ControlNewBarforSIGNAL = true, the optimization speed is increased by 1.5 times!

1. ControlNewBarforSIGNALType = 1 = True smallest TF of the settings: New mode!


The EA selects the smallest TimeFrame, which was set by the parameters TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2…


In this mode, the EA does not check the signal on the current TimeFrame but on the TimeFrame for receiving a signal from indicators!
This mode is useful for those who use TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2, other than Current TimeFrame.


2. ControlNewBarforSIGNALType = 2 = True, a current bar of the current TF
Old mode!


In this mode, the EA checks every new bar of the current TimeFrame for New Signals!
If you use TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2 other than Current TimeFrame, the results on each TimeFrame may be different.
We advise you to install the Expert Advisor on the TimeFrame M1!


3. ControlNewBarforSIGNALType = 0 = False
Do not use the control of the new bar to determine the signal!
Attention: When this is off (false), the EA checks signal every new tick! There may be delays in testing and optimization!
ControlNewBarforOpenbySignal:ControlNewBarforOpenbySignal = true: Old mode! 
The EA Open positions(Deals) on a signal only every new current bar of the current TimeFrame!
The EA opens positions(Deals) if there is a signal, only when a new bar of the current TimeFrame arrives!


ControlNewBarforOpenbySignal = falseNew mode! 
The EA Open positions(Deals) on a signal every new bar from the signal Timeframe!
The EA opens positions(Deals), if there is a signal, immediately upon detection of a signal.


This mode is useful for those who use TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, and FILTER_TF_IndSigToTrade2, other than the Current Time Frame.
ReverseSignalFlipping(Reverse) the overall strategy signal received from the Main Indicator + filters!


If the common signal is to open a Buy, then the Expert Advisor opens a Sell!
If the common signal is to open a Sell, then the Expert Advisor opens a Buy!

Opening Filter options

TypeTradeBUYSELLThe direction of trade:

– Buy and Sell
– Only Buy
– Only Sell

Attention: If you use pending orders (instead of positions) and work only in 1 direction, every time a new signal is received, the old pending order will be deleted and set to a new price.
MinuteToOpenNextPositionPermission to open the next signal after the last open position


If there are no open positions(Deals), the Expert Advisor (EA)considers the time (in minutes) from the last closed position.


Time is considered to be of the same type. 
If the BUY signal: Time from the last opened/closed BUY…
If the SELL signal: Time from the last opened/closed SELL …


The number of minutes to open the next deal on the signals of indicators.
It allows you to filter deals when using ONlyOnePosbySignal = false.
DistanceToOpenNextPositionMinimum Distance to open the next position on the main signal 


(If ONlyOnePosbySignal = false and OnePosPerDirection=false).


If DistanceToOpenNextPosition is above 0, then the next position(Deal) can be opened only when the previous position(Deal) on the signal has passed DistanceToOpenNextPosition of profit Point(Pips)!

If DistanceToOpenNextPosition is below 0, then the next position (Deal) can be opened only when the previous position(Deal) on the signal is at a distance DistanceToOpenNextPosition Point(Pips) on both sides of the profit or loss! 
OpenOppositePositionAfterStoplossEA opens the opposite position when closing the current stop loss.


Opens the opposite position(deal) immediately after receiving the stoploss of the previous deal (position) without using indicator signals.
If the last position were closed by stoploss, the Expert Advisor would immediately open the opposite position.
ONlyOnePosbySignalTrade only 1 current main position in one direction.

If the Expert Advisor opens the SELL position, then all other signals on the SELL will be ignored.

If the Expert Advisor opens the BUY position, then all other signals on the BUY will be ignored.
OnePosPerDirectionOpening 1 deal in 1 direction,


e.g.:
if OnePosPerDirection = true 
and ONlyOnePosbySignal = false 
then the EA can open 1 Buy deal (position) on a signal and 1 Sell deal (position) on a signal;


if OnePosPerDirection = false 
and ONlyOnePosbySignal = true 
then the EA can only open one deal(position) at a signal, either Buy or SELL;


if OnePosPerDirection = false 
and ONlyOnePosbySignal = false 
then the EA can open any deals(positions) for each new indicator signal;
OnlyOnePositionPerMagicOpening of 1 position on 1 magic.


The Expert Advisor checks whether there are open positions(Deals) for this magic number in other currency pairs.


 If there is no position, the advisor will open the deal at the signal, and the remaining advisors will wait for the completion of this deal.


If OnePosPerDirection = false, then OnlyOnePositionPerMagic = true works like this: 1 position by magic number is allowed;


If OnePosPerDirection = true, then OnlyOnePositionPerMagic = true works as follows: 1 position of each direction (Buy and Sell) is allowed by a magic number;
OnlyAlternateSignalsAllows you to open positions only one by one.

If the last closed position was SELL, the next could be opened only BUY!

It is necessary to trade the main indicator in No Signal mode. (IndSigToTrade=No Signal)
MAX_BUY_POSITIONThe parameter for limiting the maximum number of BUY deals (positions).


The positions opened by signals of indicators are taken into account. 
The averaging and additional positions are not taken into account.
MAX_SELL_POSITIONThe parameter for limiting the maximum number of SELL deals (positions).


The positions opened by signals of indicators are taken into account. 
The averaging and additional positions are not taken into account.
MaxSpreadToNotTradeThe maximum spread at which the advisor can open a position.


If the current spread at the time of receiving the signal is greater than the specified value, the indicator signal is ignored until the spread is less than the specified value.
MinSpreadToNotTradeMinimum spread, in which the advisor can open a position.

Warning: This filter is only used To open positions by signal, averaging, and additional opening. 

All other functions work in the normal mode.

Warning: This filter is for Positions only!

For pending orders, this filter does not matter. 
Therefore, the filter works only when you use the Positions.
Include_Commission_SwapTake into account the author’s calculation of the Commission and the swap when the functions are turned on: BreakEven (stop loss on the breakeven Point(Pips)), Trailing stop, Averaging.


The author’s calculation of the Commission is based on the formula for calculating the value of 1 Point(Pips) from the open positions for this symbol and the magic; a negative swap and Commission participate in the calculation.
The function returns the cost of a negative swap and Commission in Point(Pips) and takes this into account when working with the Breakeven functions (stop loss on the Breakeven Point(Pips) ) and trailing stop.


Attention: If you have a floating spread on your broker, the settlement of the Commission is executed and set at the moment of the operation of the Breakeven functions (stoploss on the breakeven Point(Pips) ) and trailing stop, but the spread may increase, which will incur additional loss Point(Pips).


This is not a calculation error! Also, it is worth considering that when a swap occurs, the advisor recounts the line Breakeven (stoploss on the breakeven Point(Pips) ) and establishes new stops if the server allows it. (Restriction to the minimum stop level for your StopLevel broker). If the server does not allow to set a breakeven and returns a minimum stop level error, the EA will not be able to modify the position, and you can receive additional loss Points (Pips).


To avoid receiving a loss when using a commission with a commission and when receiving a negative swap, we recommend that you increase the distance between Breakeven (stoploss on a breakeven Point(Pips) ) or trailing stop. The level of Breakeven (stop loss on the breakeven Point(Pips) ) ( LevelWLoss ) can be calculated independently, given the Commission.


For example, the Commission for opening and closing a position = 2 dollars (EURUSD) per 1 lot.
So, in order to cover the loss on the Commission, you need to set LevelWLoss = 2 (Point(Pips) ) +1 (control points) = 3 Point(Pips).
Thus, the advisor will install a breakeven (StopLoss at the breakeven Point(Pips) ) by +3 Point(Pips), which in turn will cover the loss on the Commission.

Closing options 

ClosePosifChangeClosing the positions when the general indicator signal is reversed.


The difference between 
ClosePosifChange and ClosePositionifChangeOWNSignal is that with ClosePosifChange(true) – a signal change is considered for all filters + the primary(Main) signal.

When ClosePositionifChangeOWNSignal (true)– the signal change is considered only on the Main indicator (IndSigToTrade).


It also works for pending orders.
ClosePosition_After_X_MinutesEA can close the position after the set number of minutes.


Also, the Expert Advisor checks the turned-ON CloseChangeOnlyInProfit parameter: 
EA can Close only profitable positions.
CloseChangeOnlyInProfitEA can Close deals on a return signal (Changing the direction of the signal) only when the current position is in profit.

Pending orders option 

StopOrderUSEOpen pending orders or limit orders instead of positions.

1. FALSE: Open Positions BUY SELL;

2. TRUE: It allows you to open a pending or limit order for the received signal at a distance StopOrderDeltaifUSE Point(Pips). 
Thus, we recheck the signal for profitability.

If the signal is opened in the right direction of price movement, then the pending order will work through StopOrderDeltaifUSE Point(Pips).

3. Use Virtual Stop Orders: Exposes a virtual pending stop order at a distance StopOrderDeltaifUSE Point(Pips); 

4. Use Virtual Limit Orders: Exposes a virtual pending limit order at a distance StopOrderDeltaifUSE Point(Pips) ;

Caution: (Use Virtual Stop Orders) and (Use Virtual Limit Orders) only work in visualization mode or on live graphics when the terminal is working on your computer.
It does not work in optimization mode!
StopOrderDeltaifUSENumber of Points (Pips) for a stop or limit order.
Distance from current price.
StopOrderDayToExpirationStopOrderDayToExpiration = number of days for the order expiration.


– 0 – ORDER_TIME_GTC The order will be in the queue until it is removed ;
– 1 – ORDER_TIME_DAY The order will be valid only for the current trading day; 
– X – ORDER_TIME_SPECIFIED The order will remain valid until the expiry date. 
 
If you get a Rejected error and when you hover over the order in the history, you see this: (incomplete FOK information of the order),
If you have a BCS broker or Open broker, then you need to install:
 TypeFilling= ImmediateOrCancel or TypeFilling = Return
 DayToExpiration= 1
StopOrderBarToExpirationThe expiration of the pending order in the bars.


If StopOrderBarToExpiration 10 is specified, and TF = M1, then the Pending order will be removed after 10 minutes after installation.


Attention: Each broker has its minimum time parameter for expiration time.
ReInstallStopOrdersNewSignalAppearsReset pending orders if a new signal from the indicators is created.


It allows you to delete the current BUYSTOP pending order and install a new BUYSTOP at a new level when the indicators create a new signal.

Trading options 

MagicThe magic number of the positions opened by the advisor EA.
SlippageThe level of the maximum possible deviation in price when opening and closing positions (in Points). 


Example: 
Slippage = 1 
Maximum deviation in price when opening a position = Opening price + -1 point(pips). 
Slippage = 100 
Maximum deviation in price when opening a position = Opening price + -100 points(pips). 
For example, the price of opening a position when sending a deal to the server = 1.12345 
But, if during the time of sending and opening a position (deal), the price has changed within 100 points (Requote), then the position (deal) will open with the price of within 1.12245 – 1.12445
MarketWatch
For opened positions with stop-loss / take-profit on an account with MARKET execution. 


First, an EA can open the position (Deal), and after the successful opening, the levels of StopLoss and TakeProfit are modified in this position (deal).

True – for ECN brokers and accounts in which it is forbidden to set stops at the same time as opening a position.

If your account is in the ECN or NDD group, you must set the option to true
CommentToOrderAdditional comments on the opened positions.


You can specify here an additional comment that will be added to the opened position to differentiate the settings, for example.
Standard comment: “The X”+CommentToOrder
RoundingDigits
EA can be rounding all prices when opening and modifying orders and positions (deals). 

Options:
No rounding, 
Rounding up to 1 digit,
Rounding up to 2 digits. 


The function is created for Gold and Silver, as well as for brokers, where a specified accuracy of ticks is required. 


Example: 
Deal open price = 1.12345 
Rounding to 1 digit = 1.12340 
Rounding up to 2 digits = 1.12300
TypeFillingThe type of fill positions and orders. 
It is used for the MT5 terminal. 
In AUTO mode, the Expert Advisor tries to determine the fill type automatically. 
But, in some situations, you need to set the fill type yourself. 


If you get an error when opening a position 10030 TRADE_RETCODE_INVALID_FILL, An unsupported type of execution of the remainder order is indicated. 
Set the type of fill that your broker rules. 


Example: 
FillOrKill 
This execution policy means that the order can be executed only in the specified amount. If the market currently does not have a sufficient amount of a financial instrument, then the order will not be executed. The required volume can be made up of several offers available at the moment in the market. 




ImmediateOrCancel 
It means the agreement to make a deal on the maximum available volume on the market within limits specified in the warrant. In case of impossibility of full execution, the order will be executed for an accessible volume, and the unexecuted order volume will be canceled. 




Return 
This mode is used for market, limit, and stop-limit orders and only in the modes “Market Execution” and “Stock Execution”. In case of partial execution, a market or limit order with a residual volume is not withdrawn but continues to operate. 
For stop-limit orders, the corresponding limit order with the execution type Return will be created upon activation.

Stops options 

VirtualStopsThe function of turned ON of Virtual stoploss / TakeProfit / trailing stop instead of real.


Using virtual (invisible) levels Stoploss/TakeProfit/Trailingstop/BreakEven (StopLoss at breakeven)


We have completely redesigned the algorithm of Virtual StopLoss /TakeProfit / TrailingStop / Breakeven (installing stoploss on the breakeven point).


Now, all virtual stops are displayed on the chart and are the key when closing positions on these levels.
All Data about Virtual Levels is added in the form of lines (Chart) and global variables.


Note: If you delete a stop line on the chart and global variables – Virtual closing on this line will not work.


Attention: Check your experts and indicators to remove lines from the chart and global variables!
Attention: Virtual levels are triggered at the current price, after which the closing occurs.
During the closing, there may be slippage in a couple of points!
Attention МТ4: In optimization mode, the virtual stoploss / takeprofit does not work.
Attention: When you enable VirtualStops, the testing speed is significantly lower.
Attention: Virtual SL/TP/TS do not have restrictions and server prohibitions. Therefore, they can be set at the current price! Then, there is an immediate closure.
SetMinStops

Automatically normalize all parameters of the Expert Advisor to the minimum acceptable stop levels. 


With virtual stops – this parameter does not affect. 


With AutoSetMinLevel, stop levels will be brought to the lowest possible levels allowed on the server; 


If Stop Loss or Take Profit level is less than the minimum stop level on the server, then Stop Loss/Take Profit level = Minimum Stop Level (Spread*2 or fixed level on the server) + Spread.

When using ManualSet, the user will receive a message that the EA stop levels are less than the minimum, and the EA will receive an error from the server.


If the stop level on the server is floating, then the minimum stop level calculated automatically = Spread*2.
StopLossStoploss of each position(deal) you open in Point(Pips).
TakeProfitTakeprofit of each open position(deal) in Point(Pips).
ForcedModifySLTPForced modification of positions, set the stop loss, and take profit.


Expert Advisor will forcibly modify the StopLoss and TakeProfit to all its positions.


For example
If the broker’s server opened a Deal but did not return its ticket, then the expert will forcibly check all his positions. 
If EA finds out that the StopLoss or TakeProfit of the position is 0, the Expert Advisor will force the Stoploss and TakeProfit modification.
TimeToCheckAverageSpreadThe algorithm for the function is taken from our automated tickSniper scalper sales advisor.


Added parameters to the Stops (SL TP TS) options block:
– TimeToCheckAverageSpread: The number (milliseconds, 20,000 = 20 seconds) for determining the average spread
– AutoCheckLowSpread Auto-determination of the low spread.
Automatically determines the spread to be too low (Less than 1 point (Pips) ) and sets all system settings to the lowest possible spread.
It allows you to protect the system from reducing the spread of the broker.


How to use:
For the parameter calculated in Point(Pips) to be calculated from the average spread of the currency pair, you need to specify the setting with the sign “-“


For example:
StopLoss = 2000 means that the StopLoss of each position will be 2000 points(Pips)!
StopLoss = -100 means that the StopLoss of each position will be equal to 100 * Average spread, which was calculated by the Expert Advisor for TimeToCheckAverageSpread milliseconds.


If the spread is 20 Points (Pips), then the Stoploss at the time of opening will be 2000 Points (Pips).
With a floating spread, this value always changes.


The parameters available for setting in the spread mode: Distance, DistanceAdditionalOpening, StopOrderDeltaifUSE, StopLoss, TakeProfit, TrailingStop, TakeProfitALL, StopLossALL, LevelWLoss, LevelProfit.


The average and current spread, as well as the level of the Auto Spread Low spread, will be displayed in our panel in the section Strategy Info

Lots options 

LotsA fixed lot(Volume) is used to open a position (Deal) or order.
 AdditionalLots – An additional lot(Volume) that will be added to each new deal based on a new signal.


CoeficienteLots – Lot coefficient, by which the lot will be multiplied for each new deal on a new signal.


Work only (When the advisor is allowed to open more than one position for each signal ONlyOnePosbySignal = false / OnePosPerDirection = false)
DynamicLotA dynamic lot, Autolot, for an open position.
You can turn ON dynamic lot calculation in percent of free margin and other factors.
Calculation of our autolot.

Autolot calculation type:
BALANCE – Autolot is calculated from the current balance. Lot calculation from account balance! If there are open positions on the account, then the next lot will be approximately the same because the balance does not decrease from the number of current open positions!
FREEMARGIN – The standard lot calculation from the current free margin is that the more open positions on the account, the smaller the lot calculated for the next position. Because when opening a position, the free margin decreases, respectively, each new open position has a smaller lot when calculating the autolot
LotBalancePercentPercent for autolot.
RiskRateThe rate of your currency against the dollar (Or your account currency). 

By default, RiskRate = 0, which means that the Expert Advisor will try to find the correct rate in the Market Review. 
For Autolot to work well with all currency pairs, you need to turn ON the “Show all currency pairs” in the Market Watch.
MaxLotThe maximum lot that an Expert Advisor can open when calculating an autolot and martingale for the first main position.
MartinMartingale. The standard multiplication of the lot of the last closed position at a loss.


If Martin = 1, then the martingale does not turn on (Fixed lots (Volumes)).
If Martin = 0, then the Expert Advisor can not open the next position.
If Martin = 2, then the first lot = 0.1, the second lot = 0.2, and so on, 0.4 – 0.8 – 1.6 – 3.2 – 6.4…..
If Martin = 0.5, then the first lot = 1, the second lot = 0.5, and so on, 0.25 – 0.125.

Averager options: The block of functions for averaging positions, opening positions against the trend

Read More: Exp – Averager. Averaging trading positions. Opening deals against the trend and on the trend!
UseAverAdditionalOpeningOrderinOneThe number of positions (deals) is considered common for both the Additional deals and the Average deals.
Attention! Only for the MT4 version!
AverageUSETurn on the averaging function.
If the Main position is lost at a certain number of Points (Pips), our Expert Adviser opens a position of the same type (against the trend). 
Thus averaging the first position.
All the functions of the Expert Advisor (Trailing Stop, Breakeven (StopLoss on the breakeven point …) will work already from the Average (middle) line of positions, which is calculated from all positions(Deals) of the same type.


For example:
You open a BUY position at a price of 1.600 ;
The Price goes down to 1.500, and the current loss is -100 points;
Breakeven point(Average Price) = 1.600 ;
To modify Stop Loss to the Breakeven level, we need to rise 100 points up trend;
If we open the BUY position at the Price of 1.500, then our position is averaged, and the Breakeven can be set to 1.550 ;
To close two deals, the Price must move up 50 points, not 100 points.
The Expert Advisor (EA) activates the Trailing Stop, and two positions gain profit to increase it.




Attention: For different lots(Volumes) of positions, the average Price is calculated using a mathematical formula.
TakeProfitALLTotal take-profit for all positions.
Takeprofit, which will be exposed to the distance   TakeProfitALL   points from the average price of opening positions
If you set the TakeProfitALL    = 5 points, this means that take profit will be set from the middle line at a distance of 5 points.
DistanceThe distance of the open positions of the averaging grid. 


After how many points are against the trend, open the next averaging position (Deal) from the last open position of one type for averaging.


You can set 100 Points (Pips). 
Then, each new averaging position will be opened after 100 Points (Pips) of loss from the last open position.

You can set 50 points(Pips). 
Then, each new additional position(Deal) will be opened through 100+50 loss points from the last open position. (100,150,200,250,300)
DistanceMartinThe increase factor is the distance from the average for each deal.


You can set it at 1.5.
Then, each new averaging position will be opened through 100 +50 (100*1.5) loss Points (Pips) from the last open position (100,150,225,337,506).
LotsMartinCoefficient: Increase the lot(Volume) for the grid positions. 
The coefficient of increase Lots of each next averaging position.
For example
Starting Lot(Volume) of the main position = 0.1 
LotsMartin = 2, then
The next lot(Volume) of the opened averaging position will be 0.2, 0.4, 0.8, and so on. 


Attention: The middle line will be calculated using the formula using lots. 
It allows you to bring the break-even level (middle line) closer to the current price. 


But martingale can be dangerous to your account. 
Please calculate this parameter so that your deposit will withstand such a load.
LotAdditionalAdditional lot(Volume) for the next averaging position. 
For example
Starting lot(Volume) of the main position = 0.1; 
LotAdditional = 0.05, then
The next lot of the opened averaging position will be 0.15, 0.2, 0.25, and so on.
MaxOrdersOpenMaximum number of positions for this currency pair in 1 direction (separately for BUY and SELL)


If the position grid is MaxOrdersOpen, then the following averaging deals are ignored.

Additional opening Block of functions for additional opening of positions on a trend

Read More: Exp – Averager. Averaging trading positions. Opening deals against the trend and on the trend!
AdditionalOpeningEA can Enable the opening of additional deals.
If the Main position goes into profit by a certain number of deals, our advisor opens a position of the same type. 
Thus averaging the first position.
This helps to top up with a lucrative signal.
All the functions of the Expert Advisor (trailing stop, Breakeven (the breakeven point) …) will work from the middle line of positions, which is calculated from all positions of the same type.


For example:
You open a BUY position at a price of 1.600 ;
The Price goes up to 1.700, and the current profit is +100 points;
Breakeven point(Average Price) = 1.600 ;
If we open the BUY position at the Price of 1.700, then our position is averaged, and the Breakeven can be set to 1.650 ;
Expert Advisor opens 3 additional positions(deals).
Price rollback.
The Expert Advisor (EA) activates the Trailing Stop, and 5 positions gain profit to increase it.


Attention: For different lots of positions, the average Price is calculated using a mathematical formula.
StopLossALLTotal stop-loss for all positions.
Stoploss that will be put up for a distance   StopLossALL   points from the average price of opening positions
If you set the StopLossALL    = 5 points, this means that Stoploss will be set from the middle line at a distance of 5 points.
DistanceAdditionalOpeningThe distance for the open positions of the additional grid. 
After how many points on trend, open the next additional position (Deal)

You can set 50 points(Pips). 
Then, each new additional position(Deal) will be opened through 100+50 loss points from the last open position. (100,150,200,250,300)
LotsMartinAdditionalOpeningCoefficient: Increase the lot(Volume) for the grid positions. 
The coefficient of increase Lots of each next additional position.
For example
Starting Lot(Volume) of the main position = 0.1 
LotsMartinAdditionalOpening= 2, then
The next lot(Volume) of the opened additional position will be 0.2, 0.4, 0.8, and so on. 


Attention: The middle line will be calculated using the formula using lots. 
It allows you to bring the break-even level (middle line) closer to the current price. 


But martingale can be dangerous to your account. 
Please calculate this parameter so that your deposit will withstand such a load.
LotAdditionalOpeningAdditional lot(Volume) for the next additional position. 
For example
Starting lot(Volume) of the main position = 0.1; 
LotAdditionalOpening= 0.05, then
The next lot of the opened additional position will be 0.15, 0.2, 0.25, and so on.
MaxOrdersOpenAdditionalOpeningMaximum number of positions for this currency pair in 1 direction (separately for BUY and SELL)

If the grid positions are equal to MaxOrdersOpenAdditionalOpening, then the following additional positions are ignored.
  

Time Trade options: The block of work with the time of trade, the time limit.

TradeStartStopbyTimeTimeTrade is the function of working EA on time limits.


If TradeStartStopbyTime false, then the Expert Advisor trades around the clock.
If TradeStartStopbyTime true, then the trading time limit is enabled:
SeveralTimeWorkYou can also specify several time slots for trading in the SeveralTimeWork parameter.


Recording format: HH: MM-HH: MM;
where:
Hour Start trading : Minute start trading – Hour stop trading : Minute stop trading.


For example,

 SeveralTimeWork = 3:00-5:00;7:30-8:50;12:00-15:00;
then the Expert Advisor will trade 3 pieces of time. 
From 3 hours to 5 hours; 
from 7:30 to 8:50; 
and from 12:00 to 15:00. 


The Advisor will not open new deals the rest of the time. 
OpenHour OpenMinuteThe Expert Advisor checks the trading time according to the parameters:


OpenHour:OpenMinute – the beginning of the trade and ;
CloseHour:CloseMinute – the end of the trade for 1 day.


For example:  OpenHour = 5 and OpenMinute = 0, and also CloseHour = 18 and CloseMinute = 59, 
Then, the EA will trade every day from 5:00 to 18:59.
ClosePeriod_MinuteIf you want to specify the trading period from the start time, you can set the parameter ClosePeriod_Minute, which is the period in minutes.


For example,OpenHour = 6 and OpenMinute = 0 and ClosePeriod_Minute = 180. 
Then, the advisor sets the trading time from 6:00 to 9:00 (6 + 180 minutes = 9 hours).
CloseAllTradesByOutOfTimeAlso, you can close all open trades and pending orders during non-business hours if CloseAllTradesByOutOfTime = true.


In this case, the Expert Advisor will trade at the time specified above, and when the trading time is over, the advisor will close all open positions and orders.


– Not Use = Do not use the function;
– Positions and Orders = Close positions and pending orders;
– Only Positions = Close only positions (BUY and SELL);
– Only Orders = Close only pending orders (BUYSTOP, SELLSTOP, BUYLIMIT, and SELLLIMIT);
TradeByDaysIn this block of work on time, YOU can specify Trading days for trade: TradeByDays.


For example
TradeByDays true and Days 1,2,3 
– in this case, the Expert Advisor will trade only on MondayTuesday, and Wednesday, according to the time set above. 


Or trade around the clock for these 3 days if time is not set.


If you set Days 1,2,3,4,5 but the parameter TradeStartStopbyTimeFriday false, the Expert Advisor will not trade on Friday.
DayForOptimizationAlso, you can set 1 day for optimization in the parameter DayForOptimization.

This option is useful to determine which days on the optimization were the most profitable.


For example
if DayForOptimization 3, then the EA will only trade on Wednesdays.
TradeStartbyTimeMondayThe Expert Advisor starts working on Monday if set by TradeStartbyTimeMonday true by the time OpenHourMondayOpenMinuteMonday.


For example
OpenHourMonday and OpenMinuteMonday 40, then the EA starts trading on Monday at 03:40 on server time.


(The time of your broker, as indicated in the market review).
TradeStartStopbyTimeFridayTradeStartStopbyTimeFriday – Trading time for Friday.


In our Expert Advisor, YOU can set the time for trading by EA on Friday.


Time options for Friday: OpenHourFridayOpenMinuteFriday – CloseHourFridayCloseMinuteFriday


For example, if you need the advisor not to open new deals on Friday after 18:00, then you can set:
OpenHourFriday 0: OpenMinuteFriday 
– CloseHourFriday 18CloseMinuteFriday 0
In this case, the advisor will not open new deals after 18:00
CloseFridayAlso, you can close all open trades and pending orders on Friday at the set time of 18:00 If CloseFriday true.

BreakEven WithoutLOSS options: Block of work with breakeven (Set stoploss to break-even at a specific moment) 

MovingInWLUSEEnable the break-even function.

The function modifies the stop loss in LevelWLoss points when the position dials the LevelProfit of the profit items.
Functional features of experts from www.expforex.com


Example:
LevelWLoss = 50 LevelProfit = 200
As soon as the position accumulates 200 points of profit, the StopLoss of the position will be modified to the opening price of the position (+ spread) + 50 points.


Example:
LevelWLoss = 0 LevelProfit = 100
As soon as the position accumulates 100 points of profit, the StopLoss of the position will be modified to the opening price of the position (+ spread)


Attention: If the averaging or additional function is turned ON(true):
Then, when you open 2 or more positions, the advisor turns ON a breakeven function from the middle line and not from the opening price of positions.
LevelWLossThe level of profit (LevelWLoss) in points on which the Stop Loss is set when this function is enabled.


1 = 1 point of profit;
0 = Automatic minimum profit mode. 
If it is 0, then the number of points of profit for the breakeven (stoploss on the breakeven point) = Spread of the current currency pair.
LevelProfitThe number of profit points (LevelProfit) gained by the position for setup a stop-loss in the LevelWLoss of profit points(Pips).
LevelProfit must be greater than LevelWLoss

Standard Trailing options 

(Trailing positions, by modifying Stoploss into profit!)

TrailingStopUSEYou can turn ON the standard Trailing Stop function.


Note: If the averaging or additional function is enabled, if you open 2 or more positions, the Expert Advisor turns on the trailing stop function from the middle line and not from the open position price
The average price is displayed on the chart.
IfProfTrailIf “true”– when the Expert Advisor starts modifying only from the moment the position is installed to the Breakeven (stoploss on the breakeven point) + TrailingStop of profit Point(Pips).


If “false,” the TrailingStop works right after the position is positioned, and the position is put into profit and pulled after the price.
TrailingStopDistance in points from the current price to the stop-loss.
If the current profit is 200 Points (Pips), and TrailingStope = 100, then the stop-loss will be set at +100 points.


Thus, we give the price the possibility of a rollback of 100 Points (Pips) maximum. 
In the other case, StopLoss will work, and the position will be closed at +100 Points (Pips).
TrailingStepStep of StopLoss when the trailing stop function is enabled.
SaveTPafterTrailingStopWhen enabled, the Take Profit of the modified positions will not be modified after TrailingStop.


For example:
SaveTPafterTrailingStop = false: 
When running a Trailing Stop, the takeprofit of the modified position will be deleted (Set to 0);


SaveTPafterTrailingStop = true: 
When the Trailing Stop is running, the takeprofit of the modified position will be saved.

TrailingStop by SAR Parabolic 

(Set and modifying stoploss on the Parabolic SAR indicator Point)

TrailingStopSARYou can Enable (true) the Trailing Stop function on the Parabolic SAR indicator.


Attention: If the indicator is at a loss for the position, the Expert Advisor (EA) waits until the parabolic point is profitable for the position.


If we have 2 or more positions of the average, then the breakeven (stop loss on the breakeven point) is considered from the Average Price of the positions.
TrailingStopSAR_TimeFrameTimeframe for indicator Parabolic.
maximumParabolic Indicator settings.

CloseALL when Profit or LOSS options 

Closing positions in MetaTrader upon reaching the total profit/loss with the profit trailing function.
This function from CloseIfProfitorLoss with Trailing. Control of the total profit or loss with profit trailing.
TypeofCloseType of closing on the total profit or loss, in dollars (deposit currency), Point(Pips), percent of the balance, percent equity.


The block allows you to close all positions on this symbol if the total profit or loss of all positions is equal to the set value.
SeparateBuySellSeparate calculation and closing of positions in two different directions, BUY and SELL.




If SeparateBuySell=true, then Expert Advisor (EA) separately closes two directions (BUY and SELL separately) for total profit or loss.


If SeparateBuySell=false, then Expert Advisor (EA) together closes two directions (BUY and SELL together) for total profit or loss.
In order for the Expert Advisor to close two types of positions (deals), BUY and SELL, the total profit of these two positions must be higher than the set value.


Actual, If ONlyOnePosbySignal = false and OnePosPerDirection = false.
Or any settings that allow you to open more than one direction and more than one position in the direction.
CloseProfitClose positions with a total profit. 
True – enable, 
False – disable.
prifitessssThe number of units (dollars (or deposit currency), Points (Pips), and percent) for closing.


If the total profit on the positions of the currency pair is greater than or equal to the value of the prifitessss, then all positions will be closed.
CloseLossClose positions at a total loss.
True – enable, 
False – disable.
lossssThe number of units (dollars (or deposit currency), Points (Pips), and percent) for closing.


If the total loss on the positions of the currency pair is greater than or equal to the value of the lossss, then all positions will be closed.
TrailOptionsYou can Turn ON trailing the total profit when overreaching prifitessss units.


This option means the distance from the prifitessss parameter to turn ON Profit Trailing.


For example, 
prifitessss = $ 100 (deposit currency) TrailOptions = $ 10
then, when the position gains a profit of $ 100, the Expert Advisor will not close these positions but will set a profit level of $ 90.
Further, if the profit increases by 1 dollar and becomes 101 dollars, the profit level will be fixed at 91 dollars.
If the profit goes down and reaches 91 dollars – all positions will close at this level.
TrailOptionsStepThe step of increasing the fixed profit level.
BalanceStartThe starting balance, from which the percentage of the balance will be calculated. 

If 0 =, then the current account balance is set.
ForcedCloseForced closure of all positions (deals) after the price reaches a total profit or loss.
MailSendSend MAIL when closing positions (deals) by Total Profit or Loss.
OrderdeleteDelete pending orders when closing positions (deals) by Total Profit or Loss.
OFFAfterClosePROFDisable the Expert Advisor (EA) after closing on the total profit.

Expert Advisor will stop its work and will not open new positions(deals) and orders!
OFFAfterCloseLOSSDisable the Expert Advisor (EA) after closing for the total loss.

Expert Advisor will stop its work and will not open new positions(deals) and orders!
CloseTerminalAfterClosePROFClose the terminal after closing on the total profit.
CloseTerminalAfterCloseLOSSClose the terminal after closing for a total loss.

Limiting losses and profits


Limitation of losses and profits for a certain period Limit loss and profit for 1 day/week/month.

Limiting LimitFor – Limit type day/week/month;
LimitForLosses – Limit on loss;
LimitForProfits– Limit on profit;
LimitType – Limit type by Dollars, Points, Deposit Interest;
ClosebyLIMITING – Close the advisor’s deals when the Limit is exceeded;
UseCurrentProfit – Take into account, when calculating the Limit, the current profit/loss;


This function is able to turn off the work of the Expert Advisor if the Expert Advisor gained a certain profit/loss in the deposit currency for the day/month/week.
The next work of the Expert Advisor will be the next day, week, or month.




For example, LimitFor DAY, LimitForProfits 1, LimitForProfits = 10 dollars;
Also, you can select LimitType limit type for calculations( In dollars, points, percent of the balance of the account).


If you need to close and delete all deals for this Expert Advisor, if you exceed the limits, you can put ClosebyLIMITING = true.


The UseCurrentProfit Enable/Disable calculation of the current floating profit/loss for this Expert Advisor.
  

Drawdown options


The block for controlling the opening of positions in the drawdown


DrawDown_Level – turn on the drawdown control block;
Type_DrawDownHR – the type of drawdown calculation based on deals in history and current deals;
DrawDown_Level_One – the first level of drawdown in percent ;
Type_Deal_Level_One – action when passing the first level of drawdown (turn off new signals, turn off averaging of deals or additional opening, close all deals);
DrawDown_Level_Two – the second level of drawdown in percent ;
Type_Deal_Level_Two – action when passing the second level of drawdown (close all profitable positions, close all loss-making positions, close all );


For example:

DrawDown_Level = true

DrawDown_Level_One = 50

Type_Deal_Level_One = No_NewDeal,

DrawDown_Level_Two = 90

Type_Deal_Level_Two = Close_All


With these settings, as soon as the current drawdown of deals in history and current deals exceeds the level of 50% of the current deposit, EA can not open new deals on new signals. 
At the same time, the averaging functions will work. 


When the drawdown exceeds 90%, EA immediately closes all deals.
  

Virtual Withdrawal



A virtual withdrawal tool is used in strategy testing to simulate the work with a deposit (Deposit Topup, Deposit withdrawal).
Added a virtual withdrawal of funds in the tester:


Withdrawal – Enable virtual withdrawal of funds when testing in the strategy tester;
Withdrawal_mode – withdrawal mode, in the deposit currency, as a percentage of the current balance (currency/percentage);
Withdrawal_amount – Number of withdrawals;
Withdrawal_periodicity_days – Frequency of withdrawal in days;
Withdrawal_Max – Maximum withdrawal amount;
Withdrawal_EndOfTest – Withdrawal after the end of testing;

OnTester_Custom

  
In the Tester block, the variable OnTester_Custom_max is added, in which you can write down your criterion of genetic
optimization.
More details about the test results: Statistics
A record in the form of a formula.
For example :
OnTester_Custom_max = “STAT_PROFIT * STAT_TRADES / STAT_EQUITY_DD”
It is mandatory to specify the names of variables, as in the reference book!


You can set the minimum values at which the optimization will take into account the result during genetic enumeration!
In other words, You can set a condition: “the minimum number of deals” (or other parameters),
upon which this run will be counted as a result.
If, during selection, the advisor opens fewer deals than specified in the settings, then this run of the optimizer will not be counted as a result!
–Attention! For advanced users only.
OnTester_Min_Trades = 0; // Min Deals for optimization
OnTester_Min_Profit = 0; // Min Profit for optimization
OnTester_Min_ProfitFactor = 0; // Min ProfitFactor for optimization
OnTester_Min_Balance = 0; // Min Balance for optimization
OnTester_Min_Equity = 0; // Min Equity for optimization
OnTester_Max_Balance_DD = 0; // Max Balance DD% for optimization
OnTester_Max_Equity_DD = 0; // Max Equity DD% for optimization
Detailed USER GUIDE for this

FAQ

Which indicator should I use?

Which filter will match my indicator?

Where can I find a good indicator?

Can you create a strategy?

Do you program to order?

Hello.

I will try to respond to your comment in more detail:

15 years ago, I started doing custom programming. Customers sent me terms of reference, and I programmed an Expert Advisor for this job.

I have carried out many programming orders.

Many orders were similar to each other.

With the same work functions.

Then, I was tired of programming because each task was similar to the previous one.

So, I made this xCustomEA Expert Advisor so that users could customize it themselves.

And the most important rule here is that the EA has no trading strategy. It is pure.

And its main function is to trade on your indicators. It trades on your strategy.

I do not have any specific indicators-filters that will filter “all indicators from the market.”

Why do I say “ALL“?

Because it is a universal Expert Advisor, it has no strategy. It trades on the signals of your indicator, the one you will write in its settings.

I gave up programming because I didn’t have any more power to program to order.

Now, I only program my tools and make my programs for trading.

Is your indicator, which gives signals, not profitable enough?

So, you need to look for those indicators that will be profitable and will give you profit that will please you.

I do not have such indicators.

This advisor is a universal trading advisor, which trades on your indicators.

This is a template for a robot.

In the video, I tried to explain the most important thing: why I created this program.

I will answer your questions and try to help you with programming your indicators.

But please do not ask me a question about which filter indicator to use for your signal.

I don’t know what filter to use for your signal.

These are your signals.

I can tell you about the functions of my Expert Advisor.

I can try to help you program your strategy.

But if you want to know my signals, it is better to use my strategy, TickSniper – A fully Automatic trading robot.

What are the values ​​in the parameters in points or pips?

In points! The item is taken from the value of the Point () variable

  • If you have a 5 or 3-digit broker, then 1 point = 0.00001 0.001
  • If you have a 4 or 2-digit broker, then 1 point = 0.0001 0.01

You write the value (in the field) that you need on a particular broker.

There is a lot of debate about what a point is and what is a pip.
I have universal values (Point = Pips).

These values are equal to the values of your broker.

Do you have the kits and settings for this Expert Advisor?

No, I created the Expert Advisor as a Builder. 

This EA requires your optimization. 

According to your strategy and according to your capabilities, but using our functions.

More on Optimizing and Testing The X Advisor

Do you not want to optimize? Download my beginner advisor: Tick Hamster or TickSniper.

Why are the test results in mt4 and mt5 terminals different?

Because they are different terminals with different histories of quotations and different principles of the strategy tester.

What settings do you use on your signal?

Default settings.
I only test the correctness of the functions and not the profitability of this advisor.

Why?

Because this advisor was created as a Builder, each user must find their strategy.
Want my strategy? TickSniper already set up an automatic trading robot

Why are the results with Virtual StopLoss and real Stoploss very different?

A virtual stop loss can not receive an error of order modification due to spread increase, increase of stop level, or change of quotations.
He always modifies at any situation to the level he needs.
All the advisor entries were written to the global variables.
A real stop-loss can receive modification errors due to a spread increase, an increase in the minimum stop level, and price changes. Therefore, it can only modify to the level that the server allows it.
Because of the shift, when closing such positions, virtual time closures can have completely different time intervals. Real stoploss can be closed at other times. This violates the entire logic of opening and closing positions.
As an example, While one position is open, the second one is not open!

Why are the results of the new version and the older version different?

We are updating our program to correct minor errors and nuances of the functions.

Changing one function and fixing one error can cause the results between the old version and the new version to be different.

However, the purpose of our update is to fix bugs and improve the functionality of the functions.

We regret that the results of the old version may differ from the results of the new version. But we will update our program in any case.

I want you to make several changes to the EA

I take new functions very carefully only when these functions will be useful to most users of the system.

Unfortunately, I can not program each function separately for each user.
I can add a couple of functions only when I see a sense in these functions. Excuse me.

When will you add more indicators?

I add only those indicators I think are necessary.

Unfortunately,

I can not add all the indicators to the Expert Advisor.

The advisor is so crowded with external parameters.

This function does not work for me!

I can help you only when you provide a full report on errors

Can I use the Set file with advisor settings between the MT4 and MT5 terminals? Why do not the settings work from mt5 to mt4?

Yes, you can use SET files with settings between two terminals. All variables are the same.

But there is one problem:

Terminal MT5 works with any encoding, and MT4 works only with ANSI text. 

Therefore, the settings file saved in the MetaTrader 5 terminal will not be opened in the MetaTrader 4 terminal.

For the file with the settings from the terminal The X MT5 loaded in the terminal MT4, you need to open this Set file and save it in the ANSI encoding.

Changelog

Version 24.126 2024.01.26

EAPADPRO v47
DynamicLot for Non-Currency Symbols fixed

New inputs:
Commission_Coefficient –> Commission coefficient (default 2)
DynamicLotStopLoss –> The calculation lot from StopLoss and free margin

Version 23.913 2023.09.19

-EAPADPRO v44
——————————
-Last Build Compilation

Version 23.101 2023.01.08

-EAPADPRO v43 (Added new languages)
-Last Build Compilation

Version 22.130 2022.01.30

Обновление индикатора ZigZag

Version 22.110 2022.01.12

Fixed a bug with drawing objects for new versions of MT5 terminal

Version 21.971 2021.11.10

Update EAPADPRO

Version 21.958 2021.10.28

-EAPADPRO v42 (Added new languages, Added Auto-pause when opening a new bar in the Strategy Tester)
-MT5:
Added the type of indicator signals (xColorArrow with 1 Buffer and 2 colors), for which the signal arrows have 2 different colors (DRAW_COLOR_ARROW)
When using the xColorArrow signal type, you need to set the following values:
SignalBuferforBUY = Buffer number for arrows (Check with the author) or by empirically calculating this buffer number.
SignalBuferforSELL = The number of the color buffer for these arrows (Check with the author), usually following the arrow buffer.
Attention! This type supports 2 colors, where:
0 (the first color of the arrow) is a signal to open a BUY;
1 (the first color of the arrow) is a signal to open SELL;
If your indicator has these colors reversed, then you can additionally use the Signal_Reverse parameter
For more information, we have made an example of using such an indicator with a DRAW_COLOR_ARROW buffer!
An example of using: https://www.mql5.com/ru/market/product/32116#!tab=comments&page=13&comment=25503972

Version 21.953 2021.10.23

-Модернизация сигнала от xArrow для некоторых индикаторов.

Version 21.923 2021.09.24

Recompiling in the latest version of the terminal

Version 21.904 2021.09.04

Recompiled in the latest version of the MetaTrader terminal

Version 21.813 2021.08.13

–Global update of The xCustomEA!
In the block for selecting the type of signal / filter SignalTypeIndicator / FilterTypeIndicator:
Added signals and filters for standard indicators from our Expert Advisor The X!
$$$ THE X MT4: https://www.mql5.com/en/market/product/11536
$$$ THE X MT5: https://www.mql5.com/en/market/product/1230
All 20 standard signals and filters have been added as the main signal / Filter / Signal to close positions!
You can use the standard indicator signals and filters from our The X along with your custom indicator signals.
This means that you can filter custom indicator signals from the market or the Internet using our standard filters.
And also use our standard strategies from The X as the main signal and apply a custom indicator as a filter!
A description of each signal and filter can be found in the user manual for The X: https://www.mql5.com/en/blogs/post/680043
Attention: when you select Standard Indicators, the SignalNameIndicator / SIGNALStrategyInputs / SignalBuferforBUY / SignalBuferforSELL fields do not work!
Attention: when you select Standard Indicators, the FilterNameIndicator / FilterStrategyInputs / FilterBuferforBUY / FilterBuferforSELL fields do not work!

– Added the TrailingStart = Starting point for the start of the Trailing function to the Trailingstop block.
The Expert Advisor will turn on the TrailingStop function when the position gains TrailingStart profit points.
If TrailingStart = 0 then TrailingStart = TrailingStop !!!

Version 21.724 2021.07.24

Added handling of SIGNALStrategyInputs settings for .wav and .bmp files

Version 21.616 2021.06.16

Update for Update

Version 21.612 2021.06.12

EAPADPRO v40 update, according to the new rules for using the MQL5 Market

Version 21.527 2021.05.27

Исправлена работа ClosePositionifChangeOWNSignal = OnlyIfProfit при работе с TypeTradeBUYSELL = Only Sell

Version 21.520 2021.05.21

A new parameter has been added to the “Averaging” block:

— CloseFirstAfterMaxAverage – Close the first averaging deal (the very first of the currently open averaging deals),

when the advisor has opened the maximum number of deals with the MaxOrdersOpen parameter.

If you want to keep a fixed number of Averager grid items (e.g. 5 grid items),

the smallest element must be closed with a loss when the 6th element is opened.

For example:

CloseFirstAfterMaxAverage = false MaxOrdersOpen = 5:

If the EA opens the maximum number of averaging deals, which is set by MaxOrdersOpen = 5,

then the next averaging deal cannot be opened.

CloseFirstAfterMaxAverage = true MaxOrdersOpen = 5:

If the EA opens the maximum number of averaging deals, which is set by MaxOrdersOpen = 5,

then the first averaging trade is closed and the next trade is opened.

================================================== ================================================== ======================

– A new parameter has been added to the “Additional opening” block:

— CloseFirstAfterMaxAdd – Close the first additional opening deal along the trend (the very first of the current open deals),

when the EA opened the maximum number of deals with the MaxOrdersOpenAdditionalOpening parameter.

Same as CloseFirstAfterMaxAverage Paramter.

Version 21.517 2021.05.17

— EAPADPRO v39

— Added custom optimization criteria in genetic mode when choosing the Custom Max optimization mode.
You can set the minimum values ??at which the optimization will take into account the result during genetic enumeration!

In other words: You can set a condition: “the minimum number of deals” (or other parameters),
upon which this run will be counted as a result.

If during selection the advisor opens fewer deals than specified in the settings, then this run of the optimizer will not be counted as a result!

–Attention! For advanced users only.

OnTester_Min_Trades = 0; // Min Deals for optimization
OnTester_Min_Profit = 0; // Min Profit for optimization
OnTester_Min_ProfitFactor = 0; // Min ProfitFactor for optimization
OnTester_Min_Balance = 0; // Min Balance for optimization
OnTester_Min_Equity = 0; // Min Equity for optimization
OnTester_Max_Balance_DD = 0; // Max Balance DD% for optimization
OnTester_Max_Equity_DD = 0; // Max Equity DD% for optimization

– You can find a detailed description of this block of settings in the user manual!

Version 21.425 2021.04.25

Work with the StopTrading button has been modernized. Fixed a bug with random permission of signals to open positions when minimizing the panel.

Version 21.313 2021.03.13

EAPADPRO v38
–Fixed the main signal reversal error when using the Signal_Reverse (true) and ClosePositionifChangeOWNSignal (OnyProfit) functions.

Version 21.216 2021.02.16

Added new parameters of Lots when opening a position by signals:
AdditionalLots – An additional lot that will be added to each new deal based on a new signal
CoeficienteLots – Lot coefficient, by which the lot will be multiplied for each new deal on a new signal
(When the advisor is allowed to open more than one position for each signal ONlyOnePosbySignal = false / OnePosPerDirection = false)

Version 20.731 2020.07.31

MT5: Fixed the conflict of the Additional Opening when using a common stop loss (StopLossALL) and a common trailing stop.

Version 20.608 2020.06.08

Компиляция 2485

Version 20.220 2020.02.19

Dear friends!
We made a very important and difficult decision regarding The X/The xCustomEA for MetaTrader 5 and the use of the multi-currency mode (PAIR1-PAIR12)
Due to the fact that the use of different methods of multi-currency operation does not bring 100% accuracy in obtaining quotes,
we were forced to turn off this mode.
We explored many topics on the forum about the problem of using multi-currency mode in MetaTrader!
Each method of implementing a multi-currency trading mode has its pros and cons!
But in each of these methods there are Cons: Reward resources on computers, skipping ticks, looping the main trade flow.
We made the decision: Remove the multi-currency trading algorithm in The X/The xCustomEA to eliminate trading problems on real charts!
We apologize for any inconvenience caused.

IMPORTANT: As soon as we find the ideal solution for working in multi-currency mode (PAIR1-PAIR12) we will turn on these parameters again, for the convenience of taming and optimization.
IMPORTANT: On a real chart, I recommend installing an adviser on each chart of a currency pair separately from each other (do not use PAIR1-PAIR12)

Version 20.216 2020.02.16

Forced modifying comment length CommentToOrder up to 12 characters!
If the comment is longer than 12 characters, then the advisor will trim the extra characters.
Attention! For the EA to work correctly, set a comment no longer than 12 characters.
eg:
Right: ExpforexTheX
Not Right: Expforex The X Set # 12345

Version 20.212 2020.02.12

– EAPADPRO v35
– Fixed the Work on time error if the advisor TF is greater than the Minutes of the time function.
(For example, closing at 22:49 and TF = H1)

Version 19.994 2019.12.05

Added parameter Send_Push_without_opening_positions:
Sending PUSH notifications to the phone instead of opening positions!
When this parameter is enabled, the adviser will not open a new position on a signal, but only notify the user that
that a new signal has appeared. At the same time, all other functions will work as usual.
Allows the user to open a position on their own if the EA gives a signal.
But the adviser does not make this transaction and does not open a position, but only notifies the user about the signal.

Version 19.905 2019.09.05

Исправлена ошибка алертов при открытии и закрытии позиций.

Version 19.903 2019.09.03

IfProfTrail:
– if true, the Advisor starts the modification only when the position is gaining profit to Breakeven (setting stop loss on the break-even point) + TrailingStop profit points.
– if false – TrailingStop starts working immediately after opening a position and making a profit of 0 points and leaving a position as a profit.
In other words: IfProfTrail = false, then the trailing stop starts working immediately after the position is in profit.

Version 19.820 2019.08.20

-. Alert has been added if the specified indicator is not found!
The adviser will check the existence of the indicator and give a message stating that the indicator was not found with a request to check the correctness of the name!

1. Function ControlNewBarforSIGNAL Changed:
Added values:
ControlNewBarforSIGNALType = 1 = True smallest TF of the settings: New mode!
The EA selects the smallest TimeFrame, which was set by the parameters TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2 ….
In this mode, the EA does not check the signal on the currently set TimeFrame, but on the TimeFrame for receiving a signal from indicators!
This mode is useful for those who use TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2, other than Current.
ControlNewBarforSIGNALType = 2 = True current bar of the current TF: Old mode!
In this mode, the EA checks signals every new bar of the current TimeFrame!
If you use TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2 other than Current, the results on each TimeFrame may be different.
We advise you to install the adviser on the TimeFrame M1!
ControlNewBarforSIGNALType = 1 = False: Do not use the control of the new bar to determine the signal!
Attention: When off, the EA checks signals every new tick! There may be delays in tapping and optimization!

2. Added variable ControlNewBarforOpenbySignal:
ControlNewBarforOpenbySignal = true: Old mode! Open positions on a signal only every new current bar of the current TimeFrame!
The EA opens positions, if there is a signal, only when a new bar of the current TimeFrame arrives!
ControlNewBarforOpenbySignal = false: New mode! Open positions on a signal every new bar from the signal Timeframe!
The EA opens positions, if there is a signal, immediately upon detection of a signal.
This mode is useful for those who use TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2, other than Current.

Version 19.816 2019.08.17

Fixed bug:
When two different directions BUY and SELL are in operation and averaging works, then BUY does not allow to modify the take profit for SELL positions!

Version 19.814 2019.08.14

Update Update

Version 19.808 2019.08.07

Added DistanceMartinAdditional – Coefficient of distance for additional order opening.
Added MinTimebeforenextAverage – Minimum time to the next averaging in minutes.

Code optimization, increased testing speed and optimization.
Starting the calculation of the average spread only when the user uses at least one parameter for the average spread.

EAPADPRO v31.

Version 19.525 2019.05.25

Added function to check different take profit for the averaging function.
If the positions have a different take profit, then the expert sets a single total take profit.

Version 19.517 2019.05.17

Forced modification only when stop loss = 0 or take profit = 0

Version 19.514 2019.05.16

Fixed double opening of averaging deals on accounts with MARKET execution.

Version 19.123 2019.01.23

Indicator example file updated! + StrategyShift removed from indicator file !!!
Added operation mode for the current zero bar(Shift=0)!
Attention! The current bar only forms a signal, so we do not recommend using Bar # 0(Shift=0) to receive signals!
Attention! Some indicators forcibly do not draw a signal at 0 bar! – It is right. Therefore, the adviser will not open positions using Shift = 0.

Version 19.111 2019.01.10

The SaveTPafterTrailingStop function has been updated to work in virtual stop loss / take profit mode with VirtualStops = true

Version 19.110 2019.01.10

ReloadReload

Version 19.107 2019.01.07

– The ClosePositionifChangeOWNSignal parameter is divided into 3 values: False (disabled), True (enabled), OnlyifProfit (Only if the positions are in profit);
– EAPADPRO v25 update
– Additional languages added to the panel: Spanish, Portuguese (Brazil), German, Chinese, Japanese;
The translation was made using the GOOGLE Translator + MQL + Terminal site!
If you find an error in your language, please report it in messages. Thank!
– Increase the speed of the panel;

Version 19.0 2018.12.29

Fix Fix Fix

Version 18.999 2018.12.28

– Optimization of the code, increasing the speed of testing.
– When you first start the advisor, an indicator template file is created for programming your strategy.
A file is created in your terminal Files folder with name “Ind – The xCustomEA TEMPLATE.mq*”
You can open this file and follow the programming instructions of your custom strategy.

Version 18.998 2018.12.28

– Optimization of the code, increasing the speed of testing.

Version 18.992 2018.12.23

– The ability to specify and fill in external variables (which can be configured from the advisor) has been added to the xCustom signal type
SIGNALStrategyInputs, CloseStrategyInputs, FILTERStrategyInputs can now be used with indicators written in our example (xCustomEA)
– In connection with the update of the sample files and our custom indicator Ind – The xCustomEA TEMPLATE, we updated all the variables of the adviser and added an additional type: to the SLTPTypeIndicator type xCustomEA, to call from our example indicator.
Also added is the variable SLTP_IndSigToSlTp to specify the strategy number in the Ind file – The xCustomEA TEMPLATE

Version 18.988 2018.12.10

– Fixed bugs according to user messages
– Reworked system for receiving signals
– Modified indicator indicator files for receiving signals for the operation of new functions and blocks! Be attentive!
================================================= ===============================
– Update EAPADPRO to version 23:
Added controls for speed testing and pause in the strategy tester;
Added a table of current open positions in the strategy tester;
================================================= ===============================

– Added block control signal closure for custom indicator.
This block allows you to close open positions by signals of a custom indicator.
It is used if a custom indicator provides signals for closing positions (separately from the signals for opening a new position).
If you need to tell the adviser signals to close positions, then you need to specify: the indicator name (may be identical with the indicator name for closing positions), a set of parameters (If they differ from the default indicator parameters), TimeFrame, Bar Shift, and number buffers to receive signals for closing. Separately for BUY and SELL positions.
Attention: If you want to close a position when receiving the opposite signals, then you do not need to use this block.

– External parameters Signal for Close options:

CloseNameIndicator = “”; // CloseNameIndicator -> Indicator name to get the signal to close pos
CloseTypeIndicator = xArrow; // CloseTypeIndicator -> Type of indicator signal to close
CloseTimeFrame = PERIOD_CURRENT; // CloseTimeFrame -> TimeFrame of signal to close
Close_shift = 1; // Close_shift -> Bar number to receive signal to close
CloseStrategyInputs = “”; // CloseStrategyInputs -> Inputs Of Ind, separated by commas
CloseBuferforBUY = 4; // CloseBuferforBUY -> Buffer number for close BUY
CloseBuferforSELL = 5; // CloseBuferforSELL -> Buffer number for close SELL
Close_IndSigToClose = 0; // Close_IndSigToClose -> Indicator number to get Close signal
================================================= ===============================

– Added Stop Loss and Take Profit control unit based on custom indicator signals.
This block allows you to set a stop loss or take profit when opening positions on the signal, which can be taken from the values ​​of the custom indicator buffers.
If the Custom Indicator has separate buffers for getting Stop Loss or Take Profit, you can use these values ​​when opening a new position.

Attention: Stoploss or take profit is set only when a new position is opened using a new signal. The functions of averaging, additional opening use the parameters of stop loss and take profit from past variables. Stoploss and take profit obtained from the custom indicator in Averaging and additional opening are not accepted.
Stop loss and take profit from a custom indicator is also set when using the ForcedModifySLTP function.

If you need to tell the adviser the stop loss and take profit values ​​from the custom indicator, then you need to specify: the indicator name
(may be identical with the name of the indicator for opening / closing positions), a set of parameters (If they differ from the parameters of the indicator by
default), TimeFrame, Shift bar, and the number of buffers to get values. Separately for BUY and SELL positions and separately for StopLoss and TakeProfit.

– External parameters Custom StopLoss and TakeProfit from Indicators options:

SLTPNameIndicator = “”; // SLTPNameIndicator -> Indicator name to get the signal of SL / TP
SLTPTypeIndicator = xPrice; // SLTPTypeIndicator -> Type of indicator signal of SL / TP
SLTPTimeFrame = PERIOD_CURRENT; // SLTPTimeFrame -> TimeFrame of signal of SL / TP
SLTP_shift = 1; // SLTP_shift -> Bar number to receive signal of SL / TP
SLTPStrategyInputs = “”; // SLTPStrategyInputs -> Inputs of the ind, separated by commas
SLTPBuferforBUY_StopLoss = -1; // SLTPBuferforBUY_StopLoss -> Buffer number of SL for BUY
SLTPBuferforSELL_StopLoss = -1; // SLTPBuferforSELL_StopLoss -> Buffer number of SL for SELL
SLTPBuferforBUY_TakeProfit = -1; // SLTPBuferforBUY_TakeProfit -> Buffer number of TP for BUY
SLTPBuferforSELL_TakeProfit = -1; // SLTPBuferforSELL_TakeProfit -> Buffer number of TP for SELL
================================================= ===============================

Version 18.970 2018.11.10

– Global update and improvement of the working code.
-Add EAPADPRO v21 panel
-Add short hints to external variables
-Add parameters for calling indicators SIGNALStrategyInputs, for indicators with the type SignalTypeIndicator = xArrow
Read more in our blog.

Reviews about xCustomEA

Atila R Akdeniz

⭐⭐⭐⭐⭐


Atila R Akdeniz 2018.12.28 10:01
I just bought the EA. I have been using The X Universal for a long time now, with great results. This EA does everything TheX Universal does and much more, including integration of other EA's and signals and independent strategies etc. I guess there will be a little bit of a learning curve to understand its full functionality and use it to its full power. 5 stars for such an innovative product from a great designer.

ROBERT URBANSKI

⭐⭐⭐⭐⭐


ROBERT URBANSKI 2022.12.02 18:40
I rent this EA for one month for testing. I give 5 stars in begin for Suport. After month I will update info about EA but now I can tell. It have many interesting settings. I tried work with many custom indicator (not build). Works very impresive.

DadeSubandryo

⭐⭐⭐⭐⭐


DadeSubandryo 2022.09.04 12:56
Great support for consumers. still learning stage & EA started to work as i want. I will update the stars & comments if necessary. Thank you

189114nickynomates

⭐⭐⭐⭐⭐


189114nickynomates 2020.11.26 03:06
This has opened up a whole new world to my trading. The concept is pure brilliant. The forums very informative and you always get help to questions detailed in the correct way. The biggest gain I have received is widening my understanding of the scope that can be achieved in cleaver trading with this ea. Keep up the good work.

Sammy Boy

⭐⭐⭐⭐⭐


Sammy Boy 2020.10.28 12:00
Excellent EA. Vladislav has put in great effort to come up with such sophisticated EA

Pia Basson


Pia Basson 2022.08.23 18:17
I bought this EA hoping to convert my indicators into trading EAs. No luck, it does not work, and the instructions are incomplete and half translated from Russian , and when I requested support, I followed their instructions to provide full descriptions of problem together with screen shots, they then replied and wrote that they don't support this product - they don't support users to even get started or learn to make their software work - how useless. I strongly do not recommend this product. It shows promise but does not deliver. I am sure that just a proper user manual would solve this problem - I checked all their links, blogs, etc. I am now $129 out of pocket a week of time wasted trying to make it work.
Vladislav Andruschenko
Reply from developer Vladislav 2022.08.23 20:20
I don't have the technical ability to help. before buying, you can use the product for free. until we have peace, I cannot work. sorry.

Franco Alves

⭐⭐⭐⭐⭐


Franco Alves 2020.07.08 20:09
Very good!!

Stanimir Stanchev

⭐⭐⭐⭐⭐


Stanimir Stanchev 2020.06.29 09:55
I am using xCustomEA for two months and i am extreamly happy with it and the support i'd received from Vladislav. His Exp4 Tester PAD for Strategy Tester is also very useful when it comes to test a strategy in visual mode. My favorite developer as of now!

Valter Oliveira

⭐⭐⭐⭐⭐


Valter Oliveira 2020.06.01 01:09
Excellent product for implementing Expert Advisors (EA) using existing indicators in the MQL5 market. I thank the developer for making this tool available to us.

Hanxyork

⭐⭐⭐⭐⭐


Hanxyork 2020.01.31 03:00
I purchased the xCustomEA few days ago, Vladislav answered all my questions quickly, he is very professional, responsible, knowledgeable, honest and dedicated, he helped me to start up my xCustomEA in a VPS. I am buying more of his products, definitely. Thank you very much Vladislav.

Vasil lupanov

⭐⭐⭐⭐⭐


Vasil lupanov 2020.01.16 19:45
Friends, don't bother looking for experts and utilities. Look for Vladislav !!!! He has everything! Five gold stars for his products and 10 stars for him !!!

Victor Volovin

⭐⭐⭐⭐⭐


Victor Volovin 2019.12.23 11:52
Советник с неограниченными возможностями.

Mohamed Irushad Rasheed

⭐⭐⭐⭐⭐


Mohamed Irushad Rasheed 2019.10.14 22:54
looks promising . i will update the review after a month.

Al Bundy


Al Bundy 2021.08.14 09:26 ==================================================================================================================== ***** Very best EA on market. With new update, you are topping yourself :-)) ! Congratulations! I am very ambitious, but it's so rich with features for grid, averaging, ... I can only be satisfied. Technically I just have one wish: one (or a few) of parameters for custom indicators in separate fields, for iterations of strategy tester. (1. Field for custom indicator, 2. Replaces {with comma separated} custom parameter x) If I will be unsuccessful in trading, it is certainly not due to this advisor! Al Bundy
Update 3.4.2022 Zero stars Complete useless EA... Meanwhile I programmed my own EA and so I know, how easy my suggestions could have been implemented. The indicators are worthless, because no good parameters to set. Some are buggy. Even a single moving average trend filter is not possible to set. Update 18.11.2021 Issue 7 solved. Stars upgraded. My wish for hedging same pair in direction of trend is also obsolete. I studied the mathematical theory and it can gain nothing. (+1 -1 = 0) (+1 -1.1 = -0.1) == (+0 -0.1 = -0.1) but additional spread,slip,commission, lower equity, margin. This understanding has burst my illusion... ======================================================================= Update 17.11.2021 *---- Not one single issue is solved so long - very bad support. Mainly Gold for 10.000 sells - I'm so proud of you - this should only given for 10.000 succesful traders or solutions... Meanwhile my real account is 25% in draw down, because this expert has only very risky averaging martingale against the trend. EA can nothing do to solve this big issue! I have to solve it with another EA or manually. Shame it! Till there is no function for opening a position with the trend when reaching stop loss (instead of closing position), this EA is NOT to recommend. For instance ADX is not usable for me without two additional fields: 1. Time frame (I want to filter with W1) 2. ADX minimum level. The standard (25) is not good. Many thanks for your advise to use strategy tester with cloud network (in your manuals and web page of your expert advisor). There is no negative balance protection and this is not communicated. So my test run 45 minutes and I'm billed with $812,- I would like this advisor, but all these issues reduces my score again. Maybe eventually I get support or this EA will be better, than I think of better rating again. I'm tired to read always why something doesn't work. Best regards ========================================================================================================== Update 14. Oct 2021 ***-- Next star is gone, because an EA without a good indicator is useless... It seems, that many functions are not possible to function if one uses a custom indicator with this EA. See following issue number 7. Since it is not possible to optimize parameters (see 16) and others are too complex, it lacks of at least four major functions. So it seems better to use an EA with integrated indicator signals. ========================================================== 14.10.2021 Addition to issue 6. Sometimes the calculated values of my indicator are changed or not used. My indicator delivers stop loss. I check stop level but nonetheless xCustom uses SL=0 !!!!! This is a NO GO! Journal: 2021.10.14 22:01:12.612 2021.09.20 21:24:03 OPEN DEAL sy=EURUSD op=1 ll=0.16 sl=-1 tp=-1 But I have set an Indicator and a buffer number for stop loss! Issue 18. In strategy tester virtual stop loss doesn't work! ==================================================================================================================== 7.10.2021 BUMP - When are you willing to answer all my questions? Seems as there is no support... ==================================================================================================================== 2021-09-27 ****- Meanwhile there are several inconsistencies, which I recognized. It is possible, that the causes are elsewhere, but so long I can't find out. 5. I have written an indicator with arrow buffers, but not all arrows are caught - what can be wrong? (Some can bet got with OWNSIGNAL_shift=0!) 6. I deliver SL and TP, but they are sometimes not set. I have included spread and corrected the values against stoplevel. In journal there is no error. 7. With another indicator I use iCustom with a second indicator to convert non-arrow buffers to arrow buffers. My indicator receives the signal at bar 1. The bar number to receive the signal in xCustomEA can't be lower than 2 to get the signals - is this a fact? If so, double indis are not usable. 8. Some times there are errors related to the parameter without error number and metatrader freezes. They are gone if SignalStrategyInputs="". 9. in Strategy Tester visual mode it trades normal, in non visual I get a flat line. How comes? 10. If I set OnTester_custom_max = STAT_PROFIT_TRADES_PERCENT I always get 0. 11. I want to filter trades with FilterTypeIndicator = "Moving Average". If SMA200 goes up it should allow buy, if it goes down it should allow sell. Other should be prohibited. How can I do this? 12. I want the simplest setup: Indicator with up/down arrows, SL=50, TP=50, no other confounding factors. I couldn't find out since 3 months! Is this not possible? That just can't be true! 13. Documentation lacks at a few places - TrailingStart, standard indicators. 14. I can't find out how to set parameters so, that trailing starts at 0. It is too complex for me to understand MovingInWLUse + LevelWLoss + LevelProfit + TrailingStart + TrailingStep. There should be a few examples in documentation for different usage. I need 3 cases: Trailing starts at SL, Trailing starts at 0, Trailing starts at 50. Rest is ballasted. 15. I need a solution for stopping multiple consecutive stop losses like written before (2021-09-20)! 16. It is awfully well to make fields for parameters and to optimize them. I have written an EA with 60 int, 60 double and 60 bool parameters, which are compound to 60 and delivered to iCustom. They can be optimized. After 3 months 12 hours per day 7 times the week learning trading, learning MQL5, coding, testing, trying, I have no satisfying combination from bought or self made indicators with xCustomEA. Either no/poor profits or large draw downs. Maybe this is forex...   ================================================== 2021.09.20 00:10 #237 DE - copy from comments ***-- Hi, after heavy strategy testing I have a few wishes: 1. Your EA has "Open Opposite Position After Stop Loss" - I'm missing "Open Opposite Position After Close Pos If Change". 2. I can't get rid of cascades of Stop Loss losses (eg.: March 2020, Feb 2021, July 2021 , which egalize all previous profits. So I wish "Minutes Pause from Trading After (multiple/heavy) Stop Loss", to wait till the time of worst trading is over. 3. Withdrawal in tester: starting balance 1000. If balance greater than 1100 withdraw to 1000. I think this is how many trader are doing. 4. Don't trade during important news. I hope you can see the importance of these enhancements. Many thanks in advance BUMP, because of long time no response!
Vladislav Andruschenko
Reply from developer Vladislav 2021.11.18 15:38
Hello, thank you. Unfortunately this is not possible. Optimization of indicator parameters in the Expert Advisor is not available. Because the advisor does not initially know the number and type of parameters. Parameters are filled in as a string and passed as variables to the indicator. there are many nuances here. You're lying! I answer every question you have. First, you gave me 5, then you started to lower the grade for not answering you, but this is not true! I answer every question you have! https://www.mql5.com/en/market/product/32116#!tab=comments&page=13&comment=25238753 next Answer: https://www.mql5.com/ru/market/product/32116#!tab=comments&page=14&comment=25950119 next answer: https://www.mql5.com/en/market/product/32116#!tab=comments&page=13&comment=25822275

jewboy


jewboy 2019.07.22 17:50
i bought this EA yesterday and with the help of Vladislav, it is working smoothly. I will make it work on different fx pairs. Thanks again for your time Vladislav

talha8877

⭐⭐⭐⭐⭐


talha8877 2018.12.16 18:49
I was using The X Universal EA and it was great, but it was missing the ability to add custom indicators. Now the Author created this expert and it's possible to add those custom indicators or other Experts for signal triggers. It requires a bit more effort to learn how to integrate those additional functions but thankfully the author has very detailed documentation about the EA.

mckingwo

⭐⭐⭐⭐⭐


mckingwo 2018.11.27 09:31
This Ea is good !

Comments

Leave a Reply

Extra

Navigation by tabs

Main Documentation Settings FAQ Changelog Reviews Comments Extra

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


    This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.
    Read more