Errors, bugs, questions - page 1679
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
It would be good to make it private in the descendants too. For better understanding. Not the point, in short.
It has to be summoned in the descendants. )
The whole point is precisely that you don't have to. See my example.
Error in indicator buffers
Result in log
The debugger stubbornly says that Buf.Buffer ALWAYS is dynamic array[0],I. I.e. is an indicator buffer. But of a zero size, as it turns out.
It turns out that the debugger writes more to the log than the release does. The release doesn't report such things
Is it possible to set the indicator buffer in MT5 only once?Why the complications, if it's not a secret? Well, apart from the interest of research, of course.
Instead of this (which, by the way, is wrong in principle, because reinitialisation may be required during operation, not only at startup):
Just like this:
Why the complications, if it's not a secret? Well, apart from the interest of research, of course.
I have cases where a dynamic array, fixed as an indicator buffer, is deleted. Then you have to create a dynamic array again and assign it as an indicator buffer. The debugger shows that it is assigned. But only its size is zero. This is an error.
The problem is old, as it turns out.
Forum on trading, automated trading systems & strategy testing
How to hide "Indicator buffer #x detached" message
Konstantin Ivanov, 2015.02.17 21:18
In my indicator I store arrays-buffers in instances of the object.
When deleting an object in OnDeinit(), a message is displayed for all arrays linked to buffers (SetIndexBuffer()):
"Indicator buffer #x detached"
How to detach an array from a buffer without this message?
Or how to hide this message?
Found the branch http://forum.mql4.com/63975, but the suggested option to save buffers in a global context doesn't work for me.
The option to save buffers in a global context doesn't work for me either. Interestingly, it works in MT4.
article A step-by-step guide to writing EAs in MQL5 for beginners There is code:
Isn't it necessary to divide at three digits?
article A step-by-step guide to writing EAs in MQL5 for beginners There is code:
Isn't it necessary to divide at three digits?
Now we have to make ugly things:
I don't suggest it for internal inline functions, but for imported functions it should be safe.