How to convert CloseAvg() function from MQL5 to MQL4?

 

Hi everyone,

Is there anyone that can help me with my problem on how to convert CloseAvg() function from MQL5 to MQL4? I got this from one of the samples from MetaQuotes.  https://www.mql5.com/en/code/316

double CloseAvg(int ind)
{ 
   CIndicatorBuffer *buffer=At(0);
//--- check
   if(buffer==NULL)
      return(EMPTY_VALUE);
//---
   return(buffer.At(index));
}

MQL5 Wizard - Trade Signals Based on Hammer/Hanging Man + MFI
MQL5 Wizard - Trade Signals Based on Hammer/Hanging Man + MFI
  • votes: 15
  • 2011.03.21
  • MetaQuotes Software Corp.
  • www.mql5.com
The generic idea is the following: the class of trading signals is derived from CExpertSignal, the next, it's necessary to override the LongCondition() and ShortCondition() virtual methods with your own methods. The best way is to create the separate class, derived from CExpertSignal for checking of formation of candlestick patterns. For...