- [WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you.
- Can anybody help with an EA issue
- Delete an object from only 1 of the open pairs, not all of them...
AMDesai1:
...
I have considered IsConnected(). However, I don't get how this would work. The start() function in an EA executes upon receiving a tick. If MT4 is disconnected there is no tick. If there is no tick start() will not run and IsConnected() can never determine that it's disconnected and re-run a refresh values function upon re-connection.
You can use a script with IsConnected(), start() in script is independant of any tick. You can find here an example script I made to manage IsConnected().
You can use a script with IsConnected(), start() in script is independant of any tick. You can find here an example script I made to manage IsConnected().
Angevoyageur,
Thank you for your reply. Could you please elaborate on how I can use this to solve my issue?
From what I understand about scripts they execute once and unload from the chart. From your instructions, I see that the terminal will load, pull up the chart and execute the script. How does this help me when I am disconnected in the middle of the night while the terminal was already running? I can understand if the script served as a watch dog on the chart and upon disconnect would set a global variable to false so when the EA comes back online it would see this and refresh all values.
Please explain more if you can.
Thank you very much.
************************ EDIT
I'm sorry. I didn't notice the loop. So the script will execute and then loop the whole time the chart is open. Is this resource intensive? If I run this on lets say 10 charts would it be processor heavy?
Thanks.
Angevoyageur,
Thank you for your reply. Could you please elaborate on how I can use this to solve my issue?
From what I understand about scripts they execute once and unload from the chart. From your instructions, I see that the terminal will load, pull up the chart and execute the script. How does this help me when I am disconnected in the middle of the night while the terminal was already running? I can understand if the script served as a watch dog on the chart and upon disconnect would set a global variable to false so when the EA comes back online it would see this and refresh all values.
Please explain more if you can.
Thank you very much.
************************ EDIT
I'm sorry. I didn't notice the loop. So the script will execute and then loop the whole time the chart is open. Is this resource intensive? If I run this on lets say 10 charts would it be processor heavy?
Thanks.
To be honest I do not understand your problem ;-) If it is a connection problem, you could use a script as I give you an example, to detect when you have a disconnection/reconnection and act accordingly. Just an idea.
Haha. Thanks angevoyageur. I have an idea of how to go ahead and solve this issue. I am just always worried about resource issues.
Thanks again.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use