faustf:
hi guys i try to close a trade at time ,
i open the trade at time and it works but when i try to close not close
i create a script like this
any one can help me ? thanks
i think you should have to compare date/time, not string.
but i convert o_O why you tell me not compare string ?, and why for open work ???
TimeToString(TimeLocal(),TIME_SECONDS)
faustf: but i convert o_O why you tell me not compare string ?, and why for open work ???
extern string EndTime ="12:00:00"; if(TimeToString(TimeLocal(),TIME_SECONDS)> EndTime)
Because “2020.MM.DD HH:MM:SS” is always greater than “12:00:01” since “20” > “12”
if(TimeLocal() > StringToTime(EndTime)
Because “2020.MM.DD HH:MM:SS” is always greater than “12:00:01” since “20” > “12”
if(TimeLocal() > StringToTime(EndTime)
but if i use this
TimeToString(TimeLocal(),TIME_SECONDS)
the Print return me only a time 21:00:15 (fore example )
i want use only the time not interest a date
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
hi guys i try to close a trade at time ,
i open the trade at time and it works but when i try to close not close
i create a script like this
any one can help me ? thanks