Can an indicator called from iCustom be "busy"? - page 2

 
shawnh:

Hi guys, just FYI, I made a little mod to my EA and it appears to have fixed up 95% of the problem (only rarely now do I get "0.00" returned). What I did was simply "prime" (for lack of a better word) my indicator by calling it with dummy input parameters during the INIT stage of the EA. For some reason, this seems to get it all "initialized" better so when it is called for real during the START function, it performs properly. Weird I know, but it seems to have worked.

It still however returns 0.00 rarely (I can live with this though). I was thinking of maybe putting a SLEEP(5) statement in between each call to the indicator... just to see if it makes any difference.

Indicators can not sleep. Documented. Indicators can not loop, must return from start, or GUI freezes.

Are you accessing different time frames or pairs. It takes time for them to be come available.

If your EA returns from start, then indicators buffers will be updated before the EA start. If the EA doesn't then race conditions are possible.

iCustom just reads out of the indicator's buffer.

 
WHRoeder:

Indicators can not sleep. Documented. Indicators can not loop, must return from start, or GUI freezes.

Are you accessing different time frames or pairs. It takes time for them to be come available.

If your EA returns from start, then indicators buffers will be updated before the EA start. If the EA doesn't then race conditions are possible.

iCustom just reads out of the indicator's buffer.

Is it better then, to embed indicator inside EA and emulating IndicatorCounted, etc. over calling iCustom?
Reason: