Questions from Beginners MQL4 MT4 MetaTrader 4 - page 221
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
What is the best way to access a property of a class to another property of the same class?
That is, instead of "this", I would like to use something like "parent".
I used ArraySetAsSeries( array[], false) in indicator. In indicator I need to use iMa(...,i), it turns out indexing in another way. Can I also change the indexing order for iMa() as ArraySetAsSeries?
So far I did it like this: rates_total-i (count at the other end), but I'm not sure if this is the right solution?What is the best way to access a property of a class to another property of the same class?
That is, instead of "this", I would like to use something like "parent".
Learn the math)
Guys. Can you please give me the code to bind an indicator to an account number, and in addition to binding to an account, you could add a license key?
A question, how do I refer to a structure element by substituting its name as a string?
Whoever can tell me, well done!I used ArraySetAsSeries( array[], false) in indicator. In indicator I need to use iMa(...,i), it turns out indexing in another way. Can I also reverse the indexing order for iMa() as ArraySetAsSeries?
So far I did this: rates_total-i (count from the other end ), just not sure if this is the right solution?Let me answer myself (maybe somebody will need it too). You can create (remake) data buffer by example include MovingAverages.mqh (SimpleMAOnBuffer) and don't even bother with ArraySetAsSeries, because it already has ArrayGetAsSeries in the example.
A question, how do I refer to a structure element by substituting its name as a string?
Who will prompt, it will be well done!No variable names after compilation,
I need to invent something with macrosubstitutions.
i don't likestring type, i always expect a lot of unexpected things with it:
UPD:
although it would be more logical to put a method of working with fields in the structure, i.e. so:
there will be no variable names after compilation,
I see, Igor, I guess it won't work gracefully. I thought I would shorten the path to the data for clarity, but I'll get sheets of case and macro substitutions. I'll probably settle for a long record. I'll think about it though, it's an interesting solution. Thanks!
A question, how do I refer to a structure element by substituting its name as a string?
Whoever can tell me, well done!