datetime variables store the seconds elapsed since 00:00 on 01 January 1970.
long diff_in_mins = (TimeGMT() - GV_FxCal_News1)/60;
Print(diff_in_mins);
Print(diff_in_mins);
honest_knave:
Perfect! Thank you
datetime variables store the seconds elapsed since 00:00 on 01 January 1970.
long diff_in_mins = (TimeGMT() - GV_FxCal_News1)/60;
Print(diff_in_mins);
Print(diff_in_mins);

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have 1 variable times created this way: (picture attached)
I need to calculated the time between now and the last time a news time came out.
when I do this way... it works nicely:
This is working from the EA which creates the global variable called "GV_FxCal_News1"
Problem is here:
Now, I need to get this as well into another EA.
But it doesn't work.
So I printed TimeGMT() and "GV_FxCal_News1"... they both get correct value.
When I do this:
1970.01.01 00:00:15
Please help