[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 408
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
There is a TimeCurrent() function that turns the current time into seconds since 1970. Is there a function that turns these seconds (int) back into datetime? Or you need to separately parse seconds, minutes, hours...? Thank you.
ahem. you don't understand what datetime is probably. it's an int. it's the number of seconds since 1970.
what are you going to turn into and what? int into int ?
or confused TimeCurrent with StrToTime.
figure it out
int Timm = TimeCurrent(); //Alert (Timm); I get 1306360846.
Timm=Timm+600; // I add 10 min. and now I need to go back to datetime, but don't know how. Thanks.
Look at TP and SL for a start. What and where to change depends on the logic of the Expert Advisor. For example TP and SL may be expressed not in points, but in percentage of deposit or price and it won't depend on the number of digits of brokerage companies.
what does datetime have to do with it... TimeCurrent simply returns the number of seconds since Christmas...:-))
that's how you do it... it's not datetime, it's just int...
Change
a little bit
datetime Timm = TimeCurrent(); //Alert (Timm); I get 130636084.
Timm=Timm+600; // I add 10 min. and now I need to go back to datetime.
The Point variable usually helps
Here's the test schedule on the 4-digit
and this is on five.