imux: 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 ?
KONDOR: 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.
Please see here an open code of this EA, maybe you can correct it...
с чего Вы взяли, что советник не работает на пятизнаке?
double fPointX()
{
double PointX = 0;
if(Digits==5 || Digits==3)
{
PointX = Point * 10;
}
if(Digits==4 || Digits==2)
{
PointX = Point;
}
return(PointX);
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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.