On a new tick, which happens first? Indicators are updated first or EA is called first?

 

When a new tick comes in does metatrader draws the indicators on the chart first or does it call the EA first?

 I want to make sure that when my EA calls an indicator's property thru ObjectGet(), the object is already formed right after the tick comes in.

So is the indicator updated right away with the new tick before the EA is called? 

 
They are not synchronized ... and thats why you have iCustom. Getting values from Objects isn't usually a good idea. Its kinda last result without the Indicator's Code. Anyways, the way I understand, both would fire_up at the same time upon tick. Which-ever code is the fastest would execute first. You can test speeds using GetTickCount. Also, remember if Indicators get interrupted with a new tick, they'll restart from Start(). Experts however will finish the Start() before looking for another tick. 
 
fdeguzman: When a new tick comes in does metatrader draws the indicators on the chart first or does it call the EA first?
  1. When a new tick comes in, all indicators are updated, one after the other.
  2. Then all EAs, not currently running, are started.
  3. Thus if your EA is taking a long time (such as computing or sending orders) indicators could update in parallel. Get your indicator values at the beginning of start.

ubzen: Also, remember if Indicators get interrupted with a new tick, they'll restart from Start().
This can NOT happen, ever. Indicators run in the GUI thread, they must return quickly. While they are updating, the terminal is NOT checking for new ticks.
 
WHRoeder: This can NOT happen, ever. Indicators run in the GUI thread, they must return quickly. While they are updating, the terminal is NOT checking for new ticks.
Yeah that makes sense as that'll cause allot of problems for IndicatorCounted(). I stand Corrected.
Reason: