Error When Backporting Custom Indicator Mt5 -> Mt4

 

Hi,


I'd like to use my Mt5 custom indicators also on Mt4.


They compiled with 0 Errors on Metaeditor 4, however, when applied to a Mt4 chart I get the unspecific error message:

"indicator on custom buffer is not supported yet"


What does that mean?



Thanks, Tim

 
timkrug:

Hi,


I'd like to use my Mt5 custom indicators also on Mt4.


They compiled with 0 Errors on Metaeditor 4, however, when applied to a Mt4 chart I get the unspecific error message:

"indicator on custom buffer is not supported yet"


What does that mean?



Thanks, Tim

please share the code
 
timkrug:

Hi,


I'd like to use my Mt5 custom indicators also on Mt4.


They compiled with 0 Errors on Metaeditor 4, however, when applied to a Mt4 chart I get the unspecific error message:

"indicator on custom buffer is not supported yet"


What does that mean?



Thanks, Tim

sorry, for this absolutely late reply. Just had exactly the same issue and didn't find a solution online execpt of one russian post .. in russian of course :)

it was a copy/past error, more or less.

as you I need to adjust software to run on MT4 and MT5. during this I mistakenly copied the incorrect OnCalculate method parameters to MT4 code

this created the error in the MT4 implementation

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const int begin,
                const double &price[]) {
  // ... whatever code or even empty throws "indicator on custom buffer is not supported yet"
  return rates_total;
}

as soon as I changed this to:


int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{
  // whatever ... 
  return(rates_total);
}

the error disappeared.

Reason: