array out of range in (41,47)

 
double FastEMAValue[2], SlowEMAValue[2], ATRValue[1], TrendEMAValue[1], HigherTimeframeEMAValue[1];
    double MACDValueMain[2], MACDValueSignal[2];

int copiedFastEMA = CopyBuffer(FastEMAHandle, 0, 0, 2, FastEMAValue);
    int copiedSlowEMA = CopyBuffer(SlowEMAHandle, 0, 0, 2, SlowEMAValue);
    int copiedATR = CopyBuffer(ATRHandle, 0, 0, 1, ATRValue);
    int copiedTrendEMA = CopyBuffer(TrendEMAHandle, 0, 0, 1, TrendEMAValue);
    int copiedHigherTimeframeEMA = CopyBuffer(HigherTimeframeEMAHandle, 0, 0, 1, HigherTimeframeEMAValue);
    int copiedMACDMain = CopyBuffer(MACDHandle, 0, 0, 2, MACDValueMain);
    int copiedMACDSignal = CopyBuffer(MACDHandle, 1, 0, 2, MACDValueSignal);

if (copiedFastEMA < ArraySize(FastEMAValue) || copiedSlowEMA < ArraySize(SlowEMAValue) ||
        copiedATR < ArraySize(ATRValue) || copiedTrendEMA < ArraySize(TrendEMAValue) ||
        copiedHigherTimeframeEMA < ArraySize(HigherTimeframeEMAValue) ||
        copiedMACDMain < ArraySize(MACDValueMain) || copiedMACDSignal < ArraySize(MACDValueSignal)) 
    {
        Print("Insufficient data in one or more buffers.");
        return;
    }
    

Does someone knows if i made a mistake here and it show me this error? array out of range in (41,47)

 
manosgk: Does someone knows if i made a mistake here and it show me this error? array out of range in (41,47)
  1. How can we possibly know what line 41 is. Your posted code has no array references.
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

    We can't see your broken code.


  2. Why did you post your coding question in the MT5 General section (a miscellaneous catch-all category) instead of the MT5 EA section (non-indicator coding)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
    Next time, post in the correct place.