Exp - The xCustomEA Advisor on the PipFinite Trend PRO automatic EA

Exp – The xCustomEA Advisor on the PipFinite Trend PRO automatic EA

Programming your strategy in 10 steps with Universal Expert Advisor The X!
Exp – Partial Close and Trailing. Partial closing of positions on rollbacks
Programming your strategy in 10 steps with Universal Expert Advisor The X!
Exp – Partial Close and Trailing. Partial closing of positions on rollbacks

Description

An example of programming a strategy for the PipFinite Trend PRO indicator and trading using our universal trading system Exp – The xCustomEA.

In this article, we will analyze in detail the custom indicator PipFinite Trend PRO, downloaded from the market mql5.

Let us analyze the ways of working with the Indicator and options for calling it in our Expert Advisor Exp – The xCustomEA.

Start

When developing the Exp – The xCustomEA Expert Advisor, we knew that most of our users do not learn how to program!

But do you need to have the programming knowledge to trade on the Indicator?

We have done everything to make use of our advisor easy and affordable.

Programming advisor on the Indicator for 20 minutes? Easy!

Especially If the entire program code has long been executed flawlessly.

In our instructions for Exp – The xCustomEA, we have written the steps for programming strategies most clearly!

The first Indicator that we will use in our example, we have chosen not by chance.

The fact is that in the mql5 market, there are a lot of indicators for MT5 and MT4.

But we chose one of the most popular indicators of the market, which has 1000 reviews and is distributed for the MT4 and MT5 terminals.

The author of the Indicator also began to hide signal buffers and even wrote the numbers of these buffers! What is very important when developing an advisor on the Indicator?

 PipFinite Trend PRO

To start working with the Indicator, we need to install it in our terminals!

How do you install the Indicator from the market?

Go to the indicator page for mt5 https://www.mql5.com/en/market/product/26889

Go to the indicator page for MT4 https://www.mql5.com/en/market/product/26888

Press the button Download TRIAL or Free DEMO.

We confirm the loading of the Indicator in our MetaTrader terminal

After downloading the Indicator from the market, it will appear in the folder of your Indicators \ Market terminal.

To test the Indicator, you need to right-click on the Indicator – Test

The strategy tester should open, where our Indicator will be selected.

Definition of signal buffers

After that, we need to figure out which signal buffers the Indicator uses to display information about the signals.

We need buffer numbers.

Initially, I tried to figure out the buffer numbers myself, but it took a lot of time because the buffer numbers are not standard!

After reading the instructions for the Indicator, I found that the author did the right thing. He wrote the number of buffers for work from the advisor. For this huge Respect.!

To find out the number of buffers for signals, we need to run the Indicator in the Visualization mode and open the Data Window.

With these numbers, we will continue to work!

I want to note that all buffers start at 0!

In this case, the BUY signal buffer number 8.

Buffer for SELL signals at number 9.

This Indicator is very beneficial for our example because we can use two types of programming Expert advisors on the Indicator:

  1. Signal programming in our Indicator Ind – The xCustomEA for signals ( xCustomEA )
  2. Installing PipFinite Trend PRO as the main Indicator without separate programming ( xArrow )

xArrow Work on the Indicator without programming

Let’s start with the simplest direct indication of the PipFinite Trend PRO custom indicator as xArrow

So, as we know the number of buffers for the signals and also know that the adviser sets the arrows on the signal, the following process of setting up our advisor will take 10 seconds:

Opening Positions Signals

for MT4, we specify the name Market\\PipFinite Trend PRO

for MT5, we specify the name Market\\PipFinite Trend PRO MT5

Parameter SignalTypeIndicator = xArrow

Next, we need to specify the number of buffers to open positions!

The author of the Indicator has kindly provided these numbers, and we can easily see them in the market review:

  1. SignalBuferforBUY = 8
  2. SignalBuferforSELL = 9

All other default settings!

Looks like that:

  1. SignalNameIndicator = Market\\PipFinite Trend PRO MT5
  2. SignalTypeIndicator = 2
  3. TF_IndSigToTrade1 = 0
  4. OWNSIGNAL_shift = 1
  5. SIGNALStrategyInputs =
  6. SignalBuferforBUY = 8
  7. SignalBuferforSELL = 9

We checked the work of the adviser and determined that the adviser is trading on our Indicator for sure!

The results of the adviser’s work on the PipFinite Trend PRO indicator will be presented below!

Closing Positions Signals

for MT4, we specify the name Market\\PipFinite Trend PRO

for MT5, we specify the name Market\\PipFinite Trend PRO MT5

  1. CloseNameIndicator = Market\\PipFinite Trend PRO MT5
  2. CloseTypeIndicator = xArrow
  3. CloseTimeFrame = 0
  4. Close_shift = 1
  5. CloseStrategyInputs =
  6. CloseBuferforBUY = 9
  7. CloseBuferforSELL = 8

Next, we need to specify the number of buffers for closing positions!

The author of the Indicator has kindly provided these numbers, and we can easily see them in the market review:

  1. CloseBuferforBUY = 9
  2. CloseBuferforSELL = 8

As you can see, to close positions based on indicator signals, it is enough to turn over the numbers of buffers (By default, our adviser returns signals and closes positions using the opposite signal, but if you have special buffers to complete by certain rules, you can use them)

All other default settings!

Trend Signal Filtering

for MT4, we specify the name Market\\PipFinite Trend PRO

for MT5, we specify the name Market\\PipFinite Trend PRO MT5

  1. FilterNameIndicator = Market\\PipFinite Trend PRO MT5
  2. FilterTypeIndicator = 2
  3. FILTER_TF_IndSigToTrade1 = 0
  4. FILTERSIGNAL1_shift = 1
  5. FILTERStrategyInputs =
  6. FilterBuferforBUY = 10
  7. FilterBuferforSELL = 11

Next, we need to specify the number of buffers for filtering positions!

The author of the Indicator has kindly provided these numbers, and we can easily see them in the market review:

  1. FilterBuferforBUY = 10
  2. FilterBuferforSELL = 11

These values are similar to the values when opening positions. They can be used with other indicators.

For example, to open one Indicator to indicate and to filter signals to show this Indicator with filters.

The author specifies these filters as UpTrend and DnTrend lines.

All other default settings!

StopLoss and TakeProfit from the Indicator

for MT4, we specify the name Market\\PipFinite Trend PRO

for MT5, we specify the name Market\\PipFinite Trend PRO MT5

  1. SLTPNameIndicator = Market\\PipFinite Trend PRO MT5
  2. SLTPTypeIndicator = 1
  3. SLTPTimeFrame = 0
  4. SLTP_shift = 1
  5. SLTPStrategyInputs =
  6. SLTPBuferforBUY_StopLoss = -1
  7. SLTPBuferforSELL_StopLoss = -1
  8. SLTPBuferforBUY_TakeProfit = 13
  9. SLTPBuferforSELL_TakeProfit = 13

Next, we need to specify the number of buffers to get the take-profit values!

The author of the Indicator has kindly provided these numbers, and we can easily see them in the market review:

  1. SLTPBuferforBUY_TakeProfit = 13
  2. SLTPBuferforSELL_TakeProfit = 13

Here, we specify the same buffer. The author gives us a TakeProfit for the price, and at the time of the new signal, buffer number 13 is filled.

For stoploss, the author does not specify the buffer number. Stoploss is not provided in this strategy! You can set your stop loss in our advisor’s settings in the Stops section.

The author also pointed out two TakeProfit buffers to us.

Middle at number 12

Far at number 13

We used the long-range take profit. You can specify 12 for the near TakeProfit !!!!

The result of the closing by take profit indicator:

All other default settings!

Testing Advisor PipFinite Trend PRO

After verifying the correctness of the signals, we will run the expert advisor test on the Indicator on EURUSD H1 from 2018 01 01 to 2018 09 27

By the way, We see that the adviser works almost equally on the two terminals, MT4 and MT5.

Findings

We will not conduct numerous tests of this Indicator; you can use our example of working with this Indicator and optimize the parameters of our advisor with different options for employing functions.

Remember that for the Indicator and advisor to work on your demo account or live account. You need to buy Exp The xCustomEA and the PipFinite Trend PRO indicator for the terminal with which you will work!

Buying our Exp The xCustomEA, you can program any strategy using any indicators!

How do you load the PipFinite indicator with custom settings in MT5?

Many users want to download Pipfinite with preferences.

In MT5, you can use the SIGNALStrategyInputs parameter and list the parameters, separated by commas!

There are rules for writing parameters. You can read them here: Exp – The xCustomEA Expert Advisor,

EXAMPLE:

SIGNALStrategyInputsExternal 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. Variable typeRecordImportantExampleintx 110777doublexxBe sure to specify through the point.0.21.10 String “x” In MT5: Be sure to specify the string (not numbers). You can write as “X”
In MT4: Attention! In the version for MetaTrader4, it is forbidden to transfer string parameters! When passing string parameters, the Indicator may not load correctly! “XXX””TEST SAME”datetimeD’year.month.day ‘Mandatory indication of D and single quotesD’2018.11.08 ‘D’2015.01.01 ‘colorC’red/green/blue ‘Mandatory indication of C and single quotes.
Color enumeration through slash /C’0 / 128/128 ‘C’0 / 256/0 ‘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! 
An example of how to do this:   1eg
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  

How do you use the Indicator PipFinite with custom settings in MT4?

Do many users want to use xCustom with Pipfinite settings?

In the MT5, You can use the  SIGNALStrategyInputs and list the parameters, separated by commas!

Warning! In the version for MetaTrader4, passing string parameters is forbidden! When transferring a string parameter (string), the Indicator can be loaded correctly!

Therefore, we need to program the MT4 indicator with its indicator parameters.

STEP 0 in  Step MT4 0 add variables (strictly in the order presented indicator parameters)

e.g.:

string ___1;
int Period_1=30;
double Factor_1=1.00000000;
int Lookback=5000;
string ___6;
int Misc_1=1;
int Misc_2=1;
int Misc_5=1;
int Misc_3=1;
string ___2;
int Show_1=1;
int Show_12=1;
int Show_7=1;
int Show_4=1;
int Show_3=1;
int Show_10=1;
int Show_9=1;
int Show_8=1;
int Show_2=1;
int Size_1=8;
int Show_11=1;
int ChartFG=0;
string ___3;
color Color_bull_1=25600;
color Color_bear_1=128;
color Color_bull_2=65280;
color Color_bear_2=255;
color Color_bull_3=16776960;
color Color_bear_3=65535;
color Color_bull_4=16776960;
int LWidth_bull_4=2;
color Color_bear_4=255;
int LWidth_bear_4=2;
color Color_bull_5=16776960;
int LWidth_bull_5=0;
color Color_bear_5=255;
int LWidth_bear_5=0;
color Color_exit_1=65535;
int LWidth_exit_1=0;
color Color_exit_2=65535;
int LWidth_exit_2=0;
color Color_exit_3=65535;
int LWidth_exit_3=0;
color Color_exit_4=65535;
int LWidth_exit_4=2;
color Color_exit_5=16711935;
int LWidth_exit_5=1;
color Color_3=5197615;
color Color_1=8388608;
color Color_2=5197615;
color Color_7=128;
color Color_win_1=65535;
color Color_loss_1=16711935;
string ___4;
int Show_5=1;
int Show_6=1;
int Size_2=8;
int XCoordinateOffset=8;
int YCoordinateOffset=8;
double YCoordinateSpacing=2.00000000;
double BG_X_Size_Factor=20.00000000;
int Display_1=0;
color Color_4=0;
int Use_1=1;
color Color_6=16777215;
int Use_2=1;
color Color_8=65280;
color Color_9=255;
color Color_10=65535;
color Color_5=5767168;
string ___5;
int Alert_1=1;
int Alert_2=0;
int Alert_3=0;
int Alert_4=0;
string SoundFile="alert.wav";
int Alert_5=0;

So, we need only the first 4 parameters because the other parameters are drawing (we do not need.) We use only 

string ___1;
int Period_1=30;
double Factor_1=1.00000000;
int Lookback=5000;

Adding these parameters in STEP  Step MT4 5

It will be like this:

 custom_buffer_for_Open_BUY[inum]=iCustom(StrategySymbolString,StrategyTimeFrame,"\\Market\\PipFinite Trend PRO",___1,Period_1,Factor_1,Lookback,8,StartCopyI+inum);
 custom_buffer_for_Open_SELL[inum]=iCustom(StrategySymbolString,StrategyTimeFrame,"\\Market\\PipFinite Trend PRO",___1,Period_1,Factor_1,Lookback,9,StartCopyI+inum);

Now, our Indicator will load the PipFinite Trend PRO indicator with parameters!

After that, we will use our Indicator. 

Therefore, we adjust adviser xCustom to work with our new Indicator:

Check that it worked:

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