Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 572
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
Sorry, I don't understand why you can't.
you can, but it won't exactly be a timer
there you go... What if the tick didn't come? You need to "start" without a tick.
the first tick is for synchronization, and if the start tick did not come, the market is closed, there is nothing to do there
Good evening!
Again I have to ask for help:
One order has to be opened in a certain time range, if an order has already been opened in the last 30 minutes with this magik, then no order has to be opened. Writing like this:
If you leave only the first part, the problem is that if a stop/take position closes in that half hour, another one opens. So I added the 2nd part to get into the order history and if there was already an order in the last 30 minutes with this mag, then don't open it. But something is wrong with the second part - it still opens.
Please advise!
you have to count in seconds.
You have to count in seconds.
Unfortunately it didn't work.
Tried this again, also no:
Unfortunately, it didn't work.
I tried this again, but it didn't work either:
Why are you comparing all the lines? Taras said correctly - count in seconds. His version did not work, because you still haven't got to the account history:
This is a cycle of working orders. If we look at the history, the loop will be as follows:
Then we should take the order close time instead of its open time in the loop.
Why are you comparing all the lines? Taras was right when he said count in seconds. His version did not fit, because you never got to the account history:
This is a cycle of working orders. If we look at the history, the loop will be as follows:
Then in the loop, we should take the close time of the order and not its open time.
If I understood correctly, you meant TimeToStr, i.e., you have translated it into text?
Corrected it, but still:
Sorry, if I am completely stupid.
If I understand correctly, you mean TimeToStr - i.e. translated into text?
Corrected, but still:
I'm sorry if I'm completely stupid.
Say your condition out loud and you'll see what's going on.)
If one of the previous indicator buffer values is assigned an empty value, will it be deleted from the chart?
or will there be an empty value in the buffer and the drawing will remain on the chart?
If I understand correctly, you mean TimeToStr - i.e. translated into text?
Yes. There is no point in converting time to a string, because time is a number of seconds. This number is much easier and faster to work with than strings.
Corrected, but still:
Sorry if I'm completely stupid.
You've corrected one thing and spoiled another.)
In the second part instead of:
bring it back:
You had this line correct in your previous attempt.