Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | Interpolation

The real author:

Gryb Alexander

The Lagrange interpolating polynomial is used to determine the functions by the specified points. In fact, the indicator takes the coordinates of price points between input int ibegin and input int iend (They are drawn by red and blue lines in the chart) and with the help of the Lagrange interpolating polynomial it calculates the coordinates of the next points.

Remarks:

  • iend-ibegin = the degree of the polinomial. That is, if the distance between ibegin and iend is equal to two, then the chart will be a parabola, if the three, it will be hyperbola, etc.

Indicator input parameters:

//+----------------------------------------------+
//|  INDICATOR INPUT PARAMETERS                  |
//+----------------------------------------------+
input uint inumPrognoz=2;  // Number of predicted bars
input uint ibegin=0;       // Starting bar for the analysis
input uint iend=5;         // Last bar for the analysis

This indicator was first implemented in MQL4 and published in Code Base at mql4.com on 15.11.2008.

MetaTrader Experts, Indicators, Scripts and Libraries

Fig.1 The Interpolation indicator

1662

Best MetaTrader Indicators + Profitable Expert Advisors