Errors, bugs, questions - page 1667
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
Of course, I don't understand a lot, but I think, for some reason, that the indicator copies created by different "masters", even with the same parameters and applied to one and the same chart, will have different handles. In principle, they don't know about the already existing copy of the indicator, and they should not. When drawing, they will simply overlap each other.
I may be wrong. But logic suggests that it must be so, as written in the previous paragraph.
I'm certainly not an MQ developer, but as far as this process has been explained to me, Five has done an effective caching of indices, so there will always be only one "same" indent, and several "masters" will get a link to it. Maybe the handles will be different - I haven't checked - but inside it will be the same entity. Nobody said anything about "they should know about the copy that already exists" - please don't speculate. Absolutely, no one but the "host" knows their indicators, and for an indicator a reference count is maintained for it from different "hosts", but it doesn't know the hosts.
As practice shows, logic varies from person to person. For example, very often my logic does not coincide with that of MQ, but here I am just telling what I have heard from them.
I'm certainly not an MQ developer, but as far as this process has been explained to me, Five has done an effective caching of indices, so there will always be only one "same" indent, and several "hosts" will get a link to it. Maybe the handles will be different - I haven't checked - but inside it will be the same entity. Nobody said anything about "they should know about the copy that already exists" - please don't speculate. Absolutely, no one but the "host" knows their indicators, and for an indicator a reference count is maintained for it from different "hosts", but it doesn't know the hosts.
As practice shows, logic varies from person to person. For example, very often my logic does not coincide with that of MQ, but here I am just telling what I have heard from them.
All functions like iMA, iAC, iMACD, iIchimoku, etc., create a copy of the appropriate technical indicator in the global cache of the client terminal. If a copy of the indicator with these parameters already exists, a new copy is not created, but the counter of references to this copy is increased.
I managed to make a test script close to the source program with an error during execution
Result: invalid function pointer call in 'Script2.mq5'.
build 1405. The error itself remains - moved to another part of the program - I'll deal with it later
But new ones have appeared that were not there before
Result: invalid EX5 file (8)How can I make Shift+F9 array elements visible in debugging?
In fact, 99% of the time calling IndicatorRelease is a logical programmer error.
Indicator creation is one of the most expensive operations that start very deep mechanisms of their calculation. Attempting to close an indicator handle is also a very expensive operation, if you think about the real underlying processes of its implementation. The frequent creation and closing of indicators shows that the developer does not understand the essence of operations at all.
It is very easy to understand.
Do I understand correctly that when using iCustom instead of IndicatorCreate, the user shifts the responsibility for IndicatorRelease to the universal (therefore, not optimal) developers' solution?
In which the created indicators are stored for some time, while they are called with a certain frequency. If they are not called for some time, then there is a forced IndicatorRelease. Right?
I.e., iCustom should be used optimally, taking into account the golden mean between the complexity of implementation and performance. But if you want the maximum speed, you better try to do everything through IndicatorCreate, creating your own faster (not universal) algorithm of indicators, knowing the peculiarities of their use.
Have I got it right?
Do I understand correctly, that when using iCustom instead of IndicatorCreate, the user shifts the responsibility for IndicatorRelease to the universal (therefore, not optimal) solution of developers?
In which the created indicators are stored for some time, while they are called with a certain frequency. If they are not called for some time, then there is a forced IndicatorRelease. Right?
I.e., iCustom should be used optimally, taking into account the golden mean between the complexity of implementation and performance. But if you want the maximum speed, you had better try to do everything through IndicatorCreate, creating your own faster (not universal) algorithm of indicators, knowing the specifics of your own use of indicators.
Have I got it right?
No, you are not.
The two functions are absolutely equal. Both functions return the indicator handle
No, wrong.
Both functions are absolutely equal. Both functions return the indicator handle
IndicatorRelease should be done after iCustom?
Basically it turns out that it is quite possible to run MT4 EAs in MT5. For those who do not use other indicators internally - very easy. Those who use them - create an analogue of the MT4-iCustom storage. The question of data unpreparedness is also quite possible.
Write such an adapter and any MT4-indicator will successfully run in MT5. But in this case Nikolay Kositsyn will lose his job... no, better not.
IndicatorRelease should be done after iCustom?
Basically it turns out that it is quite possible to run MT4 EAs in MT5. For those who do not use other indicators internally - very easy. Those who use them - create an analogue of the MT4-iCustom storage. The question of data unpreparedness is also quite possible.
Write such an adapter and any MT4-indicator will successfully run in MT5. But in this case Nikolay Kositsyn will lose his job. No, I'd rather not.