Hi adamuu,
I'm using Vista HB 32 install MT5 on C:\Program Files\... but I change the security description.
Could you please attach the mq5 and the compiled .ex5 ? We may have different compiled result.
I had print problem here https://www.mql5.com/en/forum/6985#comment_215269
:D
Hi adamuu,
I'm using Vista HB 32 install MT5 on C:\Program Files\... but I change the security description.
Could you please attach the mq5 and the compiled .ex5 ? We may have different compiled result.
I had print problem here https://www.mql5.com/en/forum/6985#comment_215269
:D
Okay, if it helps.
How can I get the MetaTrader 5 developers to notice this thread? Is this the correct channel for reporting bugs?
- www.mql5.com
I am checking copyclose result in both instances. If it's zero in either instance, i'm not going to compare the output, closes1[0] and closes2[0]. (see the if's)
There is no point in GetLastError() if CopyClose returned nonzero. Right?
I see, CopyClose returns -1 in case of error. Let me see if I can still reproduce this problem.
Yes. All CopyXXX functions return -1 on error and set last error to non zero value. In this case there is no sence trying to use values in output array. They might be wrong.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have reduced a bug in an indicator I am working on to a reproducible case of unexpected behavior with CopyClose.
Steps to reproduce:
1. Set debugger options to use specified symbol and period: EURUSD, M1.
2. Set max bars per chart at 500k.
3. Pre-load chart data for EURUSD and AUDNZD.
4. Set breakpoint at the print statement.
5. Start debugger.
Observed:
On some runs, indicator stops at the breakpoint, in various states. This is non-deterministic.
Example error state 1:
Example error state 2:
Example error state 3:
etc.
Sometimes it runs without error repeatedly. In that case, I can do something in the MetaTrader Terminal, such as open and close a few charts. Then, the unexpected behavior will re-appear.
By the way, this has been an extremely elusive bug to isolate without proper debugging tools.