Questions about MQL4 - page 2

 
After displaying the object in the main window by software, the object is only displayed with the appearance of a new tick. Is there any way to get an image of the object before the tick, at the moment of its creation?
ObjectsRedraw();


And in passing. This grey marker at the top right triangle, shifts to the left of the graph, is it controlled in any way programmatically?
no
 
Yep, that's it. Thanks again!:)
 
Is it possible to trace the on/off button of the EA from the EA?
 
Is it possible to trace the EA on/off button from the EA?

only on. if the EA is started, it means that the authorisation to start EAs is on
 
Slawa,
thank you very much for the consultation. It is very important to me if a developer answers.

Please confirm, please.
If Expert Advisor contains a fairly long (let's say 10 sec) processing cycle...
If at the same time, let's say, on the third second of its operation, the STOP button is pressed.
Then: The Expert Advisor will work up to the end of its cycle, up to the 10th second (all coded trade functions will be executed), and then it will be disabled?
Am I right to think that the command to actually disable the EA (if the Disable button is pressed) is when the EA reaches the return operator of the start() function?

Thank you in advance.
 
The EA will work its cycle to the end, up to the 10th second. The EA will not shut down, just with the arrival of the next tick the EA will not be started.
I do not understand the last question.
 
Slawa,
You have answered my question completely.
Thank you again.
 
Is there any regularity between the start() time (in milliseconds) in expert and start() time in the custom indicator, in case they are both attached to the window?

Would it be correct to expect that the codes of Expert Advisor and indicator below will give a stable result A=1 ?

Expert Advisor code
int start() { GlobalVariableSet("Start",1); Sleep(500); GlobalVariableSet("Start",0); return; }



Indicator code

int start() { int A=0; Sleep(100); if (GlobalVariableGet("Start")==1) A=1 ; Alert("A=",A); return; }



(the task is actually simple: to inform the indicator that the Expert Advisor is disabled by a button)

 
Would it be correct to expect that the following expert and indicator codes would give a stable result of A=1 ? <br/ translate="no">

No. In the current implementation, Global Variables are not safe from the point of view of accessing shared resources from concurrently running indicators and Expert Advisors.
 
Irtron,
thank you, that's understandable. That's not what I meant.
Reason: