IncSAROnArray – library MetaTrader 5

CSAROnArray class is designed for calculation of SAR (Parabolic SAR) values on indicator buffers.

Usage:

Init() method with the following parameter is called in the OnInit() function:

  • double aStep – step;
  • double aMax – maximum step.

Solve() method with the following parameters is called in the OnCalculate() function:

  • const int aRatesTotal is a rates_total variable from the OnCalculate() function parameters;
  • const int aPrevCalc – prev_calculated variable from the OnCalculate() function;
  • double aDataHigh[] – the buffer with the High data for the indicator calculation;
  • double aDataLow[] – the buffer with the Low data for the indicator calculation;
  • double aSAR[] – the buffer with the calculated value.

Additional methods:

  • string Name() – returns the line with the indicator name.

Test_SAROnArray.mq5 is a sample indicator showing CSAROnArray class application. IncSAROnArray file must be placed to MQL5\Include\IncOnArray of the terminal data folder (IncOnArray folder must be created).

Alternative:  Exp_CronexChaikin - EA MetaTrader 5

Parabolic SAR Technical Indicator was developed for analyzing the trending markets. The indicator is constructed on the price chart. This indicator is similar to Moving Average with the only difference that Parabolic SAR moves with higher acceleration and may change its position in terms of the price.

Test_SAROnArray - example of use of the CSAROnArray class

Test_SAROnArray – example of use of the CSAROnArray class


📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks