I need my slave EA to calculate the time difference between The master Time and Slave Time. If the difference is more than 10 min. then slave must return(0),
Any feed back about the code please.
datetime says all
I need my slave EA to calculate the time difference between The master Time and Slave Time. If the difference is more than 10 min. then slave must return(0),
Any feed back about the code please.
Did you mean, Master's position open time ?, However what data that are transferred/read from Master to Slave, - symbol(), open price, SL, TP - and what else ? Try https://docs.mql4.com/dateandtime
Did you mean, Master's position open time ?, However what data that are transferred/read from Master to Slave, - symbol(), open price, SL, TP - and what else ? Try https://docs.mql4.com/dateandtime
Yes, the time which is send to slave by master program. Then slave must subtract the Mater Time from it's current time. For example Master Time is 2012.05.22 12:30:27' and salve time is 2012.05.22 12:31:28' Then the result or time difference will be 1 min. and 1 second. I need to write a code to calculate the minute difference only and if it is above 10 min it should return (0).
Yes, the time which is send to slave by master program. Then slave must subtract the Mater Time from it's current time. For example Master Time is 2012.05.22 12:30:27' and salve time is 2012.05.22 12:31:28' Then the result or time difference will be 1 min. and 1 second. I need to write a code to calculate the minute difference only and if it is above 10 min it should return (0).
I gave you the link, didn't I. Let's see ... 10 minutes are equal with 600 seconds. So if Master Time minus Slave Time is bigger-or-equal than 600 second, then you must do something.
Script sample :
double gap = TimeLocal() - TimeCurrent(); Alert ("Local - Server ",gap," seconds ",(gap/60)," minutes ",(gap/3600)," hours");
I gave you the link, didn't I. Let's see ... 10 minutes are equal with 600 seconds. So if Master Time minus Slave Time is bigger-or-equal than 600 second, then you must do something.
Script sample :
Thank you very much. I will try it out and see if it works. Thanks again. By the way, I am sending the signal from master to slave using the same computer. Is there any other system that I could use to link the master and slave on two separate systems?
and please onewithzachy can you write me that code also .....
LOL
and please onewithzachy can you write me that code also .....
LOL
and please onewithzachy can you write me that code also .....
LOL
Thank you very much. I will try it out and see if it works. Thanks again. By the way, I am sending the signal from master to slave using the same computer. Is there any other system that I could use to link the master and slave on two separate systems?
Ever heard FTP ?, Look at MetaEditor on common function. I never use it so I can't really answer that.
Thank you very much. I will try it out and see if it works. Thanks again. By the way, I am sending the signal from master to slave using the same computer. Is there any other system that I could use to link the master and slave on two separate systems?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I need my slave EA to calculate the time difference between The master Time and Slave Time. If the difference is more than 10 min. then slave must return(0),
Any feed back about the code please.