Errors, bugs, questions - page 2347
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
But I didn't manage to implement it for different libraries either. To connect several libraries with such macros in one line and to call OnTick for all libraries.
I don't really understand even an example, what I want to get. Can you show me?
ZZZ As for the manager, see. EventBase.mqh here. Stupidly made everyone an heir and when a new object appeared, its pointer went to a common list, which was called by a for loop in each On-event.
I can't even get an example of what I want to get. Can you show me?
MyClass_1.mqh:
MyClass_2.mqh:
Expert.mq5:
To get all 3 printers as a result of execution: "Init 1", "Init 2" and "Init EA"
Hi all.
I callIndicatorParameters function from expert, but get error 4014. What is it may be - please advise? Build 1960.
To connect several libraries with such macros in one line, and to call OnTick to call all libraries OnTick.
Make a macro wrapper around the import which forms a class by name of the library (class##libname) and uses the context for the call inside the wrapper (libname::oninit)
and the class is dumped to the above manager.
but for each lib a separate line.
Make a macro wrapper around the import that forms a class by the name of the library (class##libname)
This is a bit tricky for me, so I'll google it.
Hi all.
I callIndicatorParameters function from expert, but get error 4014. What is it may be - please advise? Build 1960.
If you have 3 inludniks, then my code should work, but for each class should prescribe macro substitutions, here is my example, it seems to work, but I will check yet:
and in the Expert Advisor code I just include one #include <fileMyclass.mqh>
in your example, all three files must be closed (at the very bottom of the code) with my macro substitutions (and substitute the names m_class2 , m_class3...)
Already suggested solution for one-type class: inherit it from CObject, and add macro substitution to class manager which will store all added instances in CArrayObj, loop through it and call required OnXXX function.
I haven't managed to implement this for different libraries either. To connect several libraries with such macros in one line, and to call OnTick of all libraries.
example is needed, I don't know how and didn't work with "macro substitution in class manager"
To get all 3 printers: "Init 1", "Init 2" and "Init EA" as a result of execution
Do manager. The example of the source code above has shown. Macros are for other things, though.
It's a bit complicated for me, so I googled it.
It's not going to be pretty, but you can cut it down to something like this:
Here is a direct call and example of implementation without manager.
If ImportFrom class has manager registration and non-static functions, everything can be called automatically for all imported either
Here is a direct call and example of implementation without manager.
If ImportFrom class has manager registration and non-static functions, everything can be called automatically for all imported either
Got the idea, thanks.
Not 100% transparent, but better than it is at the moment.