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 is strange. I read somewhere in the help that if an indicator is already running, no copy is created. I do not understand it.
I must have misunderstood something. I checked this hypothesis, made an indicator with two buffers, one is filled from OnCalculate() and the other from OnTimer(), script, Expert Advisor... I used iCustom() to print the value of the buffer filled in OnCalculate() and empty value is deduced from OnTimer(). At the same time the indicator is in the chart where I place the script or EA.
Conclusion: when calling the indicator by iCustom(), the OnTimer() event is not executed in the indicator.
Maybe this is the reason why it is written in documentation
Function OnTimer() is called when an event occurs Timer, which is generated by the system timer only for Expert Advisors and indicators - you can not use it in scripts.
And it doesn't mention indicators in any way.
Apparently, there are some useful undocumented features in mql, as well as undocumented complications...
An indicator is placed on the chart. It is redrawn by Timer, ChartEvent and Calculate events.
I need a script to read the current values of its indicator buffers(INDICATOR_DATA) which can be seen by CTRL+D. Is it possible to do this in MT4?
Reads and writes and does not need a DLL
Well, where is the example?
Unfortunately, in this case
is not going to help.
Where is the indicator?
Why doesn't it help?
Subject:
Strange. I read somewhere in the help that if the indicator is already running, a copy is not created. Maybe I'm missing something.
Recently I posted an indicator, it just displays a text string. And when calling it through iCustom the indicator lines on the chart and iCustom interfered with each other, I had to make only one output programmatically.
Maybe, a copy of the code is not created in the memory, but the recalculation goes with its parameters
https://www.mql5.com/ru/code/14737/83151#!tab=code
Subject:
Recently I posted an indicator, it just displays a text string. And when calling it through iCustom the indicator lines on the chart and iCustom interfered with each other, I had to make only one output programmatically.
Maybe, a copy of the code is not created in the memory, but the recalculation goes with its parametersCopy
https://www.mql5.com/ru/code/14737/83151#!tab=code
The code copy can't not be created, because it's a dynamic load.
Verbal assertion, or are you an MQ developer? :))
Although, I think so myself, by analogy with DLL, where program code is in one instance, and data instances are created for clients.
In short, the practical point is that if there is an index on a chart, iCustom takes data not from it, but from a separately created instance.