IncDeMarkerOnArray – library MetaTrader 5

CDeMarkerOnArray class is designed for calculation of DeMarker values on indicator buffers.

Usage:

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

  • int aPeriod – indicator period.
  • ENUM_MA_METHOD aMethod – smoothing method.

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 aP[] – intermediate buffer for a positive component;
  • double aM[] – intermediate buffer for a negative component;
  • double aPS[] – intermediate buffer for a smoothed positive component;
  • double aMS[] – intermediate buffer for a smoothed negative component;
  • double aDeMarker[] – the buffer with the indicator calculated value.
  Donchian channel - extended, multi time frame version - indicator MetaTrader 5
Additional methods:
  • int BarsRequired() – returns the minimum number of bars for the indicator calculation;
  • string Name() – returns the line with the indicator name;

Test_DeMarkerOnArray.mq5 is a sample indicator showing CDeMarkerOnArray class application. IncDeMarkerOnArray file must be placed to MQL5\Include\IncOnArray of the terminal data folder (IncOnArray folder must be created). CMAOnArray class from the IncMAOnArray file is needed for the proper work. It can be found here.

Demarker Technical Indicator (DeM) is based on the comparison of the current period maximum with the previous period maximum.

IncDeMarkerOnArray


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