Good Afternoon,
Anyone knows why I cannot use the structure below @OnInit() since it works perfectly on OnTick() ?
The idea is to check handle management BEFORE receiving the 1st tick and realise it will not work due to lack of history.
Thank you and Regards,
MRC
When I place this structure @ the end of OnInit(), CopyBuffer as an integer function returns -1
When I place the exact same structure @ the OnTick(), CopyBuffer as an integer function returns 6
-1 means there is an error, what is the error code ?
ERR_INDICATOR_DATA_NOT_FOUND/ 4806/ Requested data not found
Have you tried a while?
while(CopyBuffer(i_handle,0,0,6,i_buffer)==-1) { Sleep(100); }
Have you tried a while?
ERR_INDICATOR_DATA_NOT_FOUND/ 4806/ Requested data not found
Your indicator is not yet ready.
Seems a lot of Brazilian people are trying to use CopyBuffer() in OnInit().
Sorry, of course it's supposed to add a counter to avoid an endless loop. (Coutinho is an experienced programmer, he would realize that).
My point is that the problem may not be that the data is not available at all, but just not available yet and a loop will solve that.
PS: Never tried and CopyBuffer in OnInit, it's just and idea.
Your indicator is not yet ready.
Seems a lot of Brazilian people are trying to use CopyBuffer() in OnInit().
So ... please, what do you suggest in order to verify if my buffers are ready before OnTick() ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Good Afternoon,
Anyone knows why I cannot use the structure below @OnInit() since it works perfectly on OnTick() ?
The idea is to check handle management BEFORE receiving the 1st tick and realise it will not work due to lack of history.
Thank you and Regards,
MRC