Alexey Viktorov: Can you not do it through the OnTimer()?
I'm doing it by timer. Already figured it out, thanks, I just needed to add ChartRedraw function in each time loop to update the chart. Damn, they added a lot of complexities in mql5 after mql4, but maybe it's for the best...
Another question, how can a date-time variable (datetime type) be converted to NUMBER of seconds after 1970? Because if you equate the time to a regular integer, this int-variable will indeed be equal to this number of seconds, but there will be a warning"possible loss of data due to type conversion", it is a bit annoying, is there any way to solve the problem?
loleg1991: Another question, how can a date-time variable (datetime type) be converted to NUMBER of seconds after 1970? Because if you equate to a regular integer time value, this int-variable will indeed be equal to this number of seconds, but there will be a warning"possible loss of data due to type conversion", it is a bit annoying, is there any way to solve the problem?
Read "Numeric type conversion" in the documentation
loleg1991: Another question, how can a date-time variable (datetime type) be converted to NUMBER of seconds after 1970? Because if you equate to a regular integer time value, this int-variable will really equal this number of seconds, but there will be a warning"possible loss of data due to type conversion", it is a bit of a nuisance, is there any way to solve the problem?
loleg1991: Another question, how can a date-time variable (datetime type) be converted to NUMBER of seconds after 1970? Because if you equate it to a regular integer value of time, this int-variable will really equal this number of seconds, but there will be a warning"possible loss of data due to type conversion", it is a bit annoying, is there any way to solve the problem?
If you mean not as date, but as number of seconds, then explicitly convert it to long type.
Hello, could you please tell me if it is possible for the Expert Advisor to add an object such as a button or toggle switch to the chart, and if so, how?
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.
Dream11:
Good afternoon, here's the problem... there's a trailing stop function...
How to change it to trawl an unlimited number of orders instead of just one ...
I've got one of these, it fucks everything.
Can you not do it through the OnTimer()?
I'm doing it by timer. Already figured it out, thanks, I just needed to add ChartRedraw function in each time loop to update the chart. Damn, they added a lot of complexities in mql5 after mql4, but maybe it's for the best...
Another question, how can a date-time variable (datetime type) be converted to NUMBER of seconds after 1970? Because if you equate to a regular integer time value, this int-variable will indeed be equal to this number of seconds, but there will be a warning"possible loss of data due to type conversion", it is a bit annoying, is there any way to solve the problem?
Another question, how can a date-time variable (datetime type) be converted to NUMBER of seconds after 1970? Because if you equate to a regular integer time value, this int-variable will really equal this number of seconds, but there will be a warning"possible loss of data due to type conversion", it is a bit of a nuisance, is there any way to solve the problem?
datetime is the number of seconds
https://www.mql5.com/ru/docs/basis/types/integer/datetime
.
https://www.mql5.com/ru/docs/convert/stringtotime
Another question, how can a date-time variable (datetime type) be converted to NUMBER of seconds after 1970? Because if you equate it to a regular integer value of time, this int-variable will really equal this number of seconds, but there will be a warning"possible loss of data due to type conversion", it is a bit annoying, is there any way to solve the problem?
If you mean to display the number of seconds, but not the date, then explicitly make it a long type.
Yes, I meant about the display, thank you, that helps.
Hello, could you please tell me if it is possible for the Expert Advisor to add an object such as a button or toggle switch to the chart, and if so, how?