Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 658
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
Noticed that I'm having trouble going through orders from j=0 to j=OrdersTotal() - the count keeps going off (see pr).
And it may not start at 0 and jump through a few tens.
Most likely it resumes with every new tick, but it's not clear why it doesn't start with 0, but just jumps through several numbers and how to deal with it.
Has anyone encountered this problem? What is the solution to this situation?
Afternoon!!!
I've noticed that I'm not able to go through orders from j=0 to j=OrdersTotal() - the count keeps going astray (see previous one).
And it may not start at 0 and jump through a few tens.
Most likely it resumes with every new tick, but it's not clear why it doesn't start with 0, but just jumps through several numbers and how to deal with it.
Has anyone encountered this problem? What is the solution to this situation?
Orders should be enumerated in a loop, not on every tick... To be more precise, a tick has come and all of your orders have been counted in the loop: for(j=0;j<OrderTotal;j++)
OrdersTotal() shows how many orders are open (including pending orders, including orders on all symbols... in total... Here is how many orders are opened in the terminal - this is how many )))).
The order numbering is like in arrays, from 0 to OrdersTotal()-1 - this is the last order, and you probably have a non-existent ticket number [OrdersTotal()] or some other information that is difficult to guess.
Good afternoon!
Can you tell me how many characters a comment on an order can hold?
Afternoon!!!
Noticed that I'm having trouble going through orders from j=0 to j=OrdersTotal() - the count keeps going off (see pr).
And it may not start at 0 and jump through a few tens.
Most likely it resumes with every new tick, but it's not clear why it doesn't start with 0, but just jumps through several numbers and how to deal with it.
Has anyone encountered this problem? What is the way out of this situation?
On some VPSs, the font of the EA interface is much larger than programmed in the MKL code.
How to change it, who knows?
Question: OnTimer() resets calculations when a tick comes in?
In my OnTick() function I have very big calculations and no data is produced, only after some time, sometimes almost immediately, sometimes a couple of minutes is needed. As far as I know, this is due to the fact that if during the calculation a tick has come, all calculations are stopped and begin again.
But I don't need to make them often, so I would like to put them in a timer?
Question: OnTimer() resets calculations when a tick comes in?
In my OnTick() function I have very big calculations and no data is produced, only after some time, sometimes almost immediately, sometimes a couple of minutes is needed. As far as I know, this is due to the fact that if during the calculation a tick has come, all calculations are stopped and begin again.
But I don't need to make them often, so I would like to put them in a timer?
How do you know this? It doesn't.
Until all calculations that started with the arrival of the tick are completed, all subsequent ticks are skipped.
How do you know that? It doesn't.
Until all the calculations that started with the arrival of the tick are completed, all subsequent ticks are skipped.
Hmm, I saw somewhere that it's the other way around, so I'm wrong.
I wonder, why with the same calculations when I place an EA on a chart, the results are sometimes immediate and sometimes I have to wait for them for a long time?
That's where the tics come in.
Hm, I've seen somewhere that it is vice versa, it means I am wrong
I wonder, why with the same calculations, when I put the EA on the chart, the results sometimes come right away, and sometimes I have to wait for them for a long time?
And the tics come on.
No one can say without the code.
No one can tell you without the code.
I also found a serious drawback, too many calls to CopyClose()
Can you tell me how to copy quotes from an array of currency pairs in a loop?
That would appear to be a double array, but MQL doesn't support it, like %.