Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 666
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
I created a variable in private
I try to work with it in a class method
it says the variable is not declared
???
Where's the code?
Where is the code?
the function must not be accessible from external code
I created a variable in private
I try to work with it in a class method
it says the variable is not declared
???
But it's not right.
Who prevents to use a dynamic array in calculations? The size of a dynamic array (if it's NOT an indicator buffer, which is monitored by a subsystem) you have to watch for yourself, and if necessary, change its size. A static array has a fixed size all the time - it all depends on the task at hand.
What is this unwarranted nonsense? Indicators, in their vast majority, are only calculating and displaying the required and sufficient amount of calculated data. All the time, on every tick.
What are you talking about? Ignorance? Then it's better to remain silent. Then people will say they read it on the official MK forum. Are you deliberately creating a lie?
Artem! Don't bore me.
No one is stopping you from using a dynamic array in your calculations.
But!!! During calculations the processor is busy, and there will be no writing into the dynamic array.
So any data that arrives in a dynamic array during calculations is automatically ignored. (Sometimes they put protection, and write them into a buffer.)
I hope this is clear?
That's why all the data on dynamic arrays are spread over static arrays, so that no data are lost while the processor works.
And that's why all the calculations should be performed in static arrays !
Of course, the size of static arrays should be set "to spare". This is obvious.
But you can calculate in them for as long as you like. Nothing will get lost in the process.
I hope this is clear to you?
the function needs to be inaccessible from external code
Where is the public method to access var ?
It goes something like this:
You use the Var() method to get var;
Artem! Don't bore me.
No one is stopping you from using a dynamic array in your calculations.
But!!! The processor is busy during calculations and there will be no writing to the dynamic array.
So any data that arrives in a dynamic array during calculations is automatically ignored. (Sometimes they put protection, and write them into a buffer.)
I hope this is clear?
That's why all the data on dynamic arrays are spread over static arrays, so that no data are lost while the processor works.
And that's why all the calculations should be performed in static arrays !
Of course, the size of static arrays should be set "to spare". This is obvious.
But you can calculate in them for as long as you like. Nothing will get lost in the process.
I hope it is clear.
Bullshit.
Where is the public method of accessing var ?
It goes like this:
Use the Var() method to get var;
so it will then be accessible from external code? i need these variables only brewed inside the class
so it will then be accessible from external code? I only need these variables to be brewed inside the class
Where is this method defined?
Where is this method defined?
below in the class file
Если говорить об индикаторах, то индикаторы (вообще говоря!) следует вычислять. Но в МТ4/МТ5 мы этого не наблюдаем!
What unfounded nonsense is this? Indicators, in their vast majority, do nothing but calculate and display the necessary and sufficient amount of calculated data. All the time, on every tick.
What's with all the nonsense? Out of ignorance? Then it's better to remain silent. Then people will say they read it on the official MK forum. Are you deliberately creating a lie?
Artem!
Are there static arrays in MT4/MT5 indicators ?????????????????????
In which one, I`d like to know?
What kind of defect? - I told you right away - if there is one, tell me where?
All the indicators in MT4/MT5 that I know are dynamic.
Yes, tracking all the time. Yes, on every tick.
But these are dynamic arrays, not static.
And there's no "disruption" here.
Bullshit.
Well, if it is nonsense, it's experience-tested.
Not just "theoretical nonsense" !!!
- If the calculations are quite long, the ticks are not written to the data array involved.
THIS IS A FACT !!!