Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1522
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
Greetings, could you give me a hint? MT5.
I need to get the values of Bollinger Bands.
I write
Outputs something similar to double_max.
At the same time it gets period, offset, and everything else correct.
Wouldn't it be easier to use iBands()?
Wouldn't it be easier to use the usual iBands()?
When using a class, the writing is minimal.
Can you tell me how to get the data when using a class?
Greetings, could you give me a hint? MT5.
I need to get the values of Bollinger Bands.
I write
Outputs something similar to double_max.
At the same time it gets period, offset, and everything else correct.
The data is not ready in Oninit yet!
Oninit isn't ready yet!
That is not the reason, sir.
That is not a reason, sir.
Lack of data is "not a reason" for what?
Create
Creates an indicator with the specified parameters. UseRefresh() andGetData() to refresh and retrieve indicator values.
GetData
Gets the specified element of the indicator buffer.Refresh() should be called before using it to work with actual data.
Refresh
Refresh indicator data. It is recommended to call before usingGetData().
When using a class, the writing is minimal.
Can you tell me how to get data when using a class?
Right... Minimal writing and maximum headache...
Classes that can be applied and changed at a whim - that might be good for toys.
What kind of classes are these?
What are these classes?
As I, a dilettante, who can't understand the sacred meaning of all classes, and why OOP is needed in our (trading) business in general, I understand - classes are all written (both by MQ and guru) code-libraries, designed to "facilitate" life for "non-guru code-writers".
The trouble is, as I've already said, that using all this "relief" doesn't make writing code any easier. Because you always have to double-check all the orders you send yourself! Because practically everyone insists on me checking some "transactions" too. All the more so because these "...shares" come at random.
I give the order - to hammer a nail in this place at such an angle. That's it. Next I get a reply - the nail is hammered in. And then I get a warning that:
So why do I need such performers (classes)?
I may be exaggerating a little, but the point doesn't change.
And why? Because any data processed in classes can be changed so that this class won't even suspect about the switch.