One-click trading on the Strategy Tester chart. The utility allows you to manually test your strategies in the strategy tester….
MetaTrader Market: How to buy an advisor on mql5.com? How to rent? How to update? How to install it?
Partial Close and Trailing. Partial closing of positions on rollbacks
Table of Contents
Description
In this article, we will analyze in detail the custom Indicator PipFinite Trend PRO, downloaded from the MQL5 Market.
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 programming knowledge to trade on the Indicator?
We have done everything to make using our Expert Advisor easy and affordable.
Programming an Expert 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 on 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 Expert 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 MQL5 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 Download TRIAL or Free DEMO button.
We confirm the loading of the Indicator in our MetaTrader terminal.
After downloading the Indicator from the MQL5 Market, it will appear in the Indicators \ Market folder of your MetaTrader terminal.
To test the Indicator, you need to right-click on the Indicator and select Test.
The Strategy Tester should open, where our Indicator will be selected.
Definition of Signal Buffers
After that, we need to determine which signal buffers the Indicator uses to display information about the signals.
We need buffer numbers.
Initially, I tried to determine 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 the Expert Advisor to work with. Much respect for this!
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 can continue working!
I want to note that all buffers start at 0!
In this case, the BUY signal buffer is number 8.
The buffer for SELL signals is number 9.
This Indicator is very beneficial for our example because we can use two types of programming Expert Advisors on the Indicator:
- Signal programming in our Indicator Exp – The xCustomEA for signals (xCustomEA)
- 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 Expert Advisor sets the arrows on the signal, the following process of setting up our Expert 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:
- SignalBufferforBUY = 8
- SignalBufferforSELL = 9
All other default settings!
It looks like this:
- SignalNameIndicator = Market\\PipFinite Trend PRO MT5
- SignalTypeIndicator = 2
- TF_IndSigToTrade1 = 0
- OWNSIGNAL_shift = 1
- SIGNALStrategyInputs =
- SignalBufferforBUY = 8
- SignalBufferforSELL = 9
We checked the work of the Expert Advisor and determined that the Expert Advisor is trading on our Indicator for sure!
The results of the Expert Advisor’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
- CloseNameIndicator = Market\\PipFinite Trend PRO MT5
- CloseTypeIndicator = xArrow
- CloseTimeFrame = 0
- Close_shift = 1
- CloseStrategyInputs =
- CloseBufferforBUY = 9
- CloseBufferforSELL = 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:
- CloseBufferforBUY = 9
- CloseBufferforSELL = 8
As you can see, to close positions based on Indicator signals, it is enough to swap the numbers of buffers (By default, our Expert Advisor 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
- FilterNameIndicator = Market\\PipFinite Trend PRO MT5
- FilterTypeIndicator = 2
- FILTER_TF_IndSigToTrade1 = 0
- FILTERSIGNAL1_shift = 1
- FILTERStrategyInputs =
- FilterBufferforBUY = 10
- FilterBufferforSELL = 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:
- FilterBufferforBUY = 10
- FilterBufferforSELL = 11
These values are similar to the values when opening positions. They can be used with other indicators.
For example, to use one Indicator to indicate and to filter signals, showing 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
- SLTPNameIndicator = Market\\PipFinite Trend PRO MT5
- SLTPTypeIndicator = 1
- SLTPTimeFrame = 0
- SLTP_shift = 1
- SLTPStrategyInputs =
- SLTPBufferforBUY_StopLoss = -1
- SLTPBufferforSELL_StopLoss = -1
- SLTPBufferforBUY_TakeProfit = 13
- SLTPBufferforSELL_TakeProfit = 13
Next, we need to specify the number of buffers to get the TakeProfit values!
The author of the Indicator has kindly provided these numbers, and we can easily see them in the Market Review:
- SLTPBufferforBUY_TakeProfit = 13
- SLTPBufferforSELL_TakeProfit = 13
Here, we specify the same buffer. The author provides 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 Expert 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 TakeProfit. You can specify 12 for the near TakeProfit!
The result of the closing by TakeProfit indicator:
All other default settings!
Testing Expert 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 Expert Advisor 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 Expert Advisor with different options for employing functions.
Remember that for the Indicator and Expert 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 you will work with!
By 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 custom settings.
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:
SIGNALStrategyInputs |
External parameters for the 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.
|
How do you use the Indicator PipFinite with custom settings in MT4?
Do many users want to use xCustom with PipFinite settings?
In MT5, you can use the SIGNALStrategyInputs parameter 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 may not load 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 for drawing (we do not need them). We use only:
string ___1; int Period_1=30; double Factor_1=1.00000000; int Lookback=5000;
Adding these parameters in STEP 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 the Expert Advisor xCustom to work with our new Indicator:
Check that it worked:
Related Posts
Close Minus by Plus, Closing unprofitable positions by searching and
Closing unprofitable positions by identifying and closing profitable ones. The Expert Advisor (EA) is designed to close unprofitable positions by identifying…
VirtualTradePad (VTP) Trading Panel. Trade Pad for One Click Traiding
VirtualTradePad or VTP – control panel for trade in 1 click in MetaTrader 4 and 5. Trade in 1 click from…
EAPadPRO – Information panel for our experts. Dashboard for Expert
Information panel for all our advisors and utilities for the MetaTrader terminal. Detailed instructions on the basics of managing and using…
The X – Universal Expert Advisor (EA) for Forex Using
Universal Expert Advisor (EA) for MetaTrader with Extensive Functionality The Expert Advisor The X is a versatile trading tool for MetaTrader,…
Trade Report of TickSniper and the best advisors from Expforex
Description We have summed the summary and detailed trading results of our experts TickSniper, Good Santa, Tick Hamster, The X, on our real trading accounts. Trade…
EA The xCustomEA: Universal Trading Advisor for iCustom Indicators. Custom
Universal trading adviser on custom indicators for MetaTrader . Exp – The xCustomEA Universal trading advisor on custom indicators. The xCustomEA works on…
EAPADPRO LIBRARY – Adding our panel to your EA
EAPADPRO LIBRARY – Enhancing Your Expert Advisor (EA) with Our Information Panel EAPADPRO LIBRARY offers a robust solution for traders looking…
InfoPad, Online Information Panel for MetaTrader
InfoPad is a highly useful information panel designed to provide crucial information on the specific currency pair selected in the…
Extra Report Pad – Trader’s Diary. Professionally analyzes your trading
Extra Report Pad – professional solution for analyzing your trading account Today, it is essential to trade at once for several…
TickSniper Automatic Expert Advisor for Metatrader. Tick scalper
Exp-TickSniper is a fast tick scalper that automatically selects parameters for each currency pair separately. The EA has been developed based on…
Duplicator – Duplication of deals/positions on the MetaTrader terminals
The Exp-Duplicator is an automatic Expert Advisor designed to duplicate trades and positions a preset number of times on your…
Partial Close and Trailing. Partial closing of positions on rollbacks
Partial Close and Trailing is an EA assistant that closes a portion of a position (i.e., part of the lot)…
Swing strategy (Pendulum). Automatic opening of 2 opposite pending orders,
The Pendulum or Swing strategy involves the sequential opening of pending orders with an increased lot size. The core principle…
SafetyLOCK PRO Protect your positions by locking using the opening
SAFETYLOCK: Secure Your Trades Against Sharp Market Reversals Trading on financial markets involves high risks, particularly during sharp market reversals. SAFETYLOCK…
This post is also available in: English Українська Portuguese Español Deutsch Chinese Русский Français Italiano Türkçe 日本語 한국어