
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
Excuse me. The line:
needs to be rewritten like this:
(OrderCloseTime()> 0) works, I'll leave it like that then
Thanks again))
Renat Akhtyamov:
закрытие по тикету, переделайте под свой
Also closes fine, but after closing it writes error 4108"Invalid ticket number."
(OrderCloseTime()> 0) works, I'll leave it that way then
Thanks again)))
Also closes fine, but after closing it says error 4108"Wrong ticket number."
So it's really wrong, won't lie.
Look into your code logic.
And you do one command to close or two?
If you've closed it once, there's nothing to do for the second, and the previous ticket will already be invalid.
So it's really wrong, it won't lie.
Look into the logic of your code.
Do you run one close command or two?
If you close once, there is nothing to do for the second, and the previous ticket will already be incorrect.
Your code's"close" variable will never be less than zero, read the help.
Fair points above. Why go through all the orders again if the ticket is already known?
Why search for time? Compare - close - next.
your code's "close" variable will never be less than zero, read the help
read it yourself...
-----------
Return value
Returns true if the function completed successfully or false if there was an error. To get the error information you need to call GetLastError().
Read for yourself...
-----------
Returned value
Returns true if function completed successfully or false in case of error. To get information about the error, call GetLastError().
you don't even know the difference between types of variables)
you need to learn.
so you don't even know the types of variables)
You need to learn.
Forum on trading, automated trading systems and strategy testing
How to implement closing positions one by one after N-minutes ?
Natalya Dzerzhinskaya, 2017.11.22 19:17
(OrderCloseTime()> 0) works, I will leave it that way then
Thanks again)))
Also closes fine, but after closing it writes error 4108"Invalid ticket number."
)
Good luck with your studies!)
Good luck with your studies!Under what conditions could it ever work, even once every 100 years?
Under what conditions could it ever work, even once every 100 years?
Well Vitaly, I don't know...............
You've got it in your post working out......
Careful, the function is on the previous page.Well Vitaly, I don't know...............
You've got it in your post......
Careful, the function is on the previous page.My point is thatclose can only be either 0(false) or 1(true), there is no other.
The same, for reliability it is better to write: