Who can help tell how to get the time period during marketing close? e.g. market close during weekend and holiday, how to detect and calculate the time period? Thanks for help!
- My EA has stopped working
- How can this happen? So strange!
- Why does "nearPosition" become "false" when it should be "true"?
What do you mean by time period?
1) TimeCurrent() is the (broker-) time of the last tick, e.g. Fr. 22:59 (the whole weekend).
2) If the market is closed this isn't changed and OnTick() is not called.
3) The only way you get the actual time is either TimeLocal() (PC-time) or TimeGMT() (PC-GMT-Time).
4) If you know the GMT-Shift of your broker you can calculate the 'theoretical' TimeCurrent() yourself.
You have to calculate that yourself - consider the DST at least in the USA - or you google or seek here for a solution
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