Declare the variable Globally, then give it the value in init.
Be aware though, if the EA/indicator is attached to a chart when starting MT4, TimeCurrent may be wrong.
Declare the variable Globally, then give it the value in init.
Be aware though, if the EA/indicator is attached to a chart when starting MT4, TimeCurrent may be wrong.
I need it just to show an actual date on Indicator properties window, not oldest date... run it as you say still show 1970.01.01 00:00 on the properties page. See:
Sorry, I misunderstood. You want to be able to change it?
I don't think it's possible to have it default to TimeCurrent()
I need to show the current time, not 1790.01.01 00:00
I just need to show the TODAY time on properties... it's boring select the right date, because every time the indicator is added on graphic, it's shows 1970 date... not today
Explain why it is so important to have today's date and someone may be able to help you with a work_around
As an user, i hate it... just imagine 10 datetime fields that you need to change all of them manually from 1970 to now...
As an developer, Thinking in a good user experience, i think if i solve this issue will be a good idea to make the users more happy
Sorry for my bad english! Using google translator!
extern string begin = "TODAY"; // YYYY.MM.DD [HH:MM] datetime when = (date == "TODAY") TimeCurrent() : StringToTime(begin);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hy guys...
There is a way to initialize an external datetime variable with the current time ?
I'm try something like this:
But returns me the following error: 'TimeCurrent' - constant expected
I need to show the current time, not 1790.01.01 00:00