Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1736

 
asdkika1 #:
Thank you very much. Sorry I didn't reply straight away - I got distracted.
Tried it out, noticed a little problem...
It only draws if I run it on USDX symbol.
It doesn't show up on EURUSD (it's clear that I'm changing Symbol_2).
See pictures, it may be easier to understand.
Any idea why this is so, how to fix it ?
I have no idea why that is. And I don't know how to fix it.
 
2021.11.09 21:58:09.541 EURUSD,M1: array out of range in 'tutorial.mq4' (93,32)

(93,32) it's in this place code ...High[i].


Please advise what it means. Everything goes well on history, but when I have 14 candlesticks to check (it checks a total of 100), I get this error

 
Ivan Butko #:
2021.11.09 21:58:09.541 EURUSD,M1: array out of range in 'tutorial.mq4' (93,32)

(93,32) it's in this place code ...High[i].


Please advise what it means. Everything goes well on history, but when I have 14 candlesticks to check (it checks a total of 100), I get this error

The value of i is greater than the maximal index of the High array.
 
Ivan Butko #:
2021.11.09 21:58:09.541 EURUSD,M1: array out of range in 'tutorial.mq4' (93,32)

(93,32) it's in this place code ...High[i].


Please advise what it means. Everything goes well on history, but when I want to check 14 candlesticks (it checks a total of 100), I get this error

(93,32)- this is the place where the error goes beyond the array, while the error is in a different place. Code on the studio

 
Sergey Gridnev #:
The value of i variable is greater than the maximum index of the High array.
MakarFX #:

(93,32) is where the array is out of range, and the error is elsewhere. Studio code.

I'm the moron, I didn't put break in the right place, for going into minus.

Thanks for the feedback.

 
Can you tell me what happens to the under-executed code after the OnTimer time has passed? (if there is a lot of it, or it is not optimised). Is the execution forced to stop or does it reach the end?

For example, OnTimer is set to 1 second and the code is executed for 2-3 seconds
 
Ivan Butko #:
Please tell me, after OnTimer time passes, what happens to the under-executed code? (if there is a lot of it, or it is not optimized). Is it forced to stop or does it go to the end?

For example, OnTimer is set to 1 second and the code is executed for 2-3 seconds

Queued for execution

ZS. How much code does it have to be to run for 2-3 seconds?

 
MakarFX #:

Queued up for execution

Thank you, accepted.

MakarFX #:

ZS. How much code does it have to be to run for 2-3 seconds?

I must be misunderstanding the operation of the terminal:

And the log entries, if they go on for a few seconds, do they affect the operation? Or is the code executed regardless of when the terminal reports?
 
Good day to you! I've paid for my EA, but the payment has been frozen for 7 days, can you tell me why?
 
Ivan Butko #:

Thank you, I've got it.

I must be misunderstanding the terminal's operation:

And the log entries, if they are several seconds long, do they affect the operation? Or the code is executed regardless of when the terminal reports?

Of course, the program is not waiting for the terminal in a separate thread to log some data.

Reason: