Execute EA without waiting for a tick? - page 2

 
Alireza Yadegar #:

hi

for this problem, is there any other way?, that have no need to add an external script.
somethings like putting a simple function in EA itself.

my problem isو i draw some objects like Buttons using EA, when user click on a button, or just change something in EA setting, these objects need to re-draw by new calculations immediately, but it will wait until a new tick and during this time user may think EA stop working or thinks it is working very heavy.

i tried RefreshRates() and also WindowRedraw(). but not solved.

I'm usually using OnTimer, it works for almost drawing case, for instance drawing for the timer seconds. 

 
Indra Lukmana #:

I'm usually using OnTimer, it works for almost drawing case, for instance drawing for the timer seconds. 

Dominik Christian Egert #:
You have multiple options.

OnChartevent ()

OnTimer()

For both go to the docs and read about the event handlers an EA can have.



thanks for your help guys

can you show me an example.


i have OnChartEvent > if (id==CHARTEVENT_OBJECT_CLICK) on my code.

but i did not understand your mean that how we can use these functions to force EA to execute without waiting for a tick

currently when user click on the object, EA will wait for a new tick to re-draw new calculated objects, and user think EA stoped or hanged.

thanks