Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 850
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
In the loop, when n==0 print the time of bar n - you will immediately understand where the loop starts from.
It seems to show everything correctly.
Starts inspection with the current candle and ends as soon as it finds a non-empty value.
Starts inspection with the current candle and ends as soon as it finds a non-empty value.
What's wrong then?
What's wrong then?
With the scans everything is fine, it looks where it needs to go and when it needs to go.
But there is already a new arrow on the chart, but it is not yet visible in the comments, in the prints.
What's there?
It is highlighted in blue that it polls both according to your option (n==0) and to mine (right after yours) - from the beginning of a new candle. It is correct, I think.
But there is already a down arrow three candlesticks back, and the indexes of the candlesticks with the outermost arrows 12 and 57 on the prints and the comments.
With the scans everything is fine, it looks where it needs to go and when it needs to go.
But there is already a new arrow on the graph, but it is not yet visible in the comments, in the prints.
At what time is this new arrow and at what time does the cycle start?
You have to deal with your own code. Either you print all values and understand where they are coming from, or you put a breakpoint and go to debugger and see all values at each step. But I don't think you need the debugger yet...