Error 4806 0n Heikenashi indicator (MQL5) : "indicator not ready" bug

 

Don't know what am i doing wrong :

Handle & everything else is all okay, still its saying : "indicator data absent"/"indicator not ready" etc.  I assume.

ResetLastError();
  
   double haOpen[],haClose[];
   int hndl= iCustom(_Symbol,_Period,"Examples\\Heiken_Ashi");
   if(hndl==INVALID_HANDLE)Alert("invalid handle");
   CopyBuffer(hndl,2,1,WHOLE_ARRAY,haClose);
  
   //haClose[] is still all empty_values or garbage numbers
  //tried changing buffer index--didn't work
 //BarsCalculated(hndl) returns -1
 

just pinging.............................

Anyone???????

Any clue??????

 
Maybe sma4
 
Marco vd Heijden:
Maybe sma4

hi Moderator,

not sure if its related to ma's. If you are not talking about MA's, would you elaborate what did you mean?

MT5 seems to be a bit complicated for me, i must admit> its increasingly hard to trace issues, sometimes.

Anyway, if iCustom doesn't work on heikenashi, i'll need to manually implement the whole heikanashi logic//

 
Tusher Ahmed:

hi Moderator,

not sure if its related to ma's. If you are not talking about MA's, would you elaborate what did you mean?

MT5 seems to be a bit complicated for me, i must admit> its increasingly hard to trace issues, sometimes.

Anyway, if iCustom doesn't work on heikenashi, i'll need to manually implement the whole heikanashi logic//

Already discussed, please do some researches to find the topic(s) where it's all explained, you have to adjust your code.

Reason: