one file cannot be included more than once in the code. so it has to be: - or make several files with different names of global variables and functions (this is a lamer version =) - or design logic so that there is no overlap when calling from different functions (this may require some work, but it's a good solution ;)
And you can not say something more exact without examples, error descriptions or complete code (best of all) =)
The Expert Advisor and the looped script are running in the window at the same time. Is it correct to assume that while the Expert Advisor is waiting for the server to respond to a trade operation the script continues to work as usual without any stops and delays, perform its calculations (not trading operations)?
SKif: The Expert Advisor and the looped script are running in the window at the same time. Is it correct to assume that while the Expert Advisor is waiting for the server to respond to a trade operation the script continues to run its course without any stops and delays, perform its calculations (not trade operations)?
Yes. both the Expert Advisor and the script work in their own threads.
OK, thank you. Should we consider it normal when the start time of the indicator and EA does not match when the EA button is switched on? Maybe I am misunderstanding something or am doing something wrong, but it turns out that the time difference may be more than 250ms.
Also. Does the status of the EA button have any effect on the operation of the indicator? Is it possible to track the state of this button from the indicator?
And here are the results: During the period highlighted in red, the mouse simply moved in a circle of 50mm diameter at 3 revolutions per second. There was no impact on the terminal.
It turns out that during a "normal" quiet period the lag is approx. 20-60 ms, and even more during the period when the user is in contact with the terminal. Besides, I found out that indicator's start() is started in period of window's resizing and when switching between windows. --------------- I'm mainly interested in legality of this delay, "normal" and "unusual". And I'd like some comments from the developers - how appropriate it is to the intent.
OK. In the absence of any other option, I was guided by the option of measuring the lag time of EA and indicator signals, in order to judge whether the EA button was off. This time was supposed to be very short. But it varies too much.
It's very interesting, what you will find out. (In general, I need this whole kitchen to answer one simple question: EA button status )
Experts work in their own threads independently of other tasks. It turns out that CPU load is caused by mouse movement, when hundreds of mouse move commands are sent en masse. Among these "mouse" commands are also commands to refresh EAs, which leads to delays.
So, we should assume that the non-simultaneous operation of the script, the indicator and the Expert Advisor is a common phenomenon? So... how does one live in the world?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Who knows if this is correct?
so it has to be:
- or make several files with different names of global variables and functions (this is a lamer version =)
- or design logic so that there is no overlap when calling from different functions (this may require some work, but it's a good solution ;)
And you can not say something more exact without examples, error descriptions or complete code (best of all) =)
Is it correct to assume that while the Expert Advisor is waiting for the server to respond to a trade operation
the script continues to work as usual without any stops and delays, perform its calculations (not trading operations)?
The Expert Advisor and the looped script are running in the window at the same time.
Is it correct to assume that while the Expert Advisor is waiting for the server to respond to a trade operation
the script continues to run its course without any stops and delays, perform its calculations (not trade operations)?
both the Expert Advisor and the script work in their own threads.
Should we consider it normal when the start time of the indicator and EA does not match when the EA button is switched on?
Maybe I am misunderstanding something or am doing something wrong, but it turns out that the time difference may be more than 250ms.
Also. Does the status of the EA button have any effect on the operation of the indicator?
Is it possible to track the state of this button from the indicator?
Placed an indicator in the window:
Put an EA in the window:
And a script with a snippet like this:
And here are the results:
During the period highlighted in red, the mouse simply moved in a circle of 50mm diameter at 3 revolutions per second.
There was no impact on the terminal.
It turns out that during a "normal" quiet period the lag is approx. 20-60 ms, and even more during the period when the user is in contact with the terminal.
Besides, I found out that indicator's start() is started in period of window's resizing and when switching between windows.
---------------
I'm mainly interested in legality of this delay, "normal" and "unusual".
And I'd like some comments from the developers - how appropriate it is to the intent.
In the absence of any other option, I was guided by the option of measuring the lag time of EA and indicator signals, in order to judge whether the EA button was off. This time was supposed to be very short. But it varies too much.
It's very interesting, what you will find out.
(In general, I need this whole kitchen to answer one simple question: EA button status )
It turns out that CPU load is caused by mouse movement, when hundreds of mouse move commands are sent en masse. Among these "mouse" commands are also commands to refresh EAs, which leads to delays.
So... how does one live in the world?