Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 163

 
ilunga:

Because this function has (...) as parameters and you need the exact composition


reference:

https://docs.mql4.com/ru/basis/preprosessor/import

Because the imported functions are outside the module being compiled, the compiler cannot check the correctness of the parameters passed. Therefore, in order to avoid run-time errors, the exact composition and order of parameters passed to the imported functions must be specified. Parameters passed to imported functions (both from EX4 and DLL modules) cannot have default values.


So I imported the functions correctly, according to:

#import "hoz_LoggingToAnywhere@Library.ex4"
    void fPrint (string& fs_Text);
#import
#import "hoz_HandlingWithErrorS.ex4"
    string fErrorToString(int fi_Error);
    string fErrorDescription (int fi_Error);
#import

The function type and parameters are there... And I already used it this way:

fPrint (StringConcatenate ("fInitBase() => ", fErrorToString (bi_Err)));

In fact here it is obvious that everything in brackets StringConcatenate is type string, I already declared them during import.

//.......................................................................................................................................................................//

Where is the problem? Something comes out a complete nonsense. I changed it to this:

string m = StringConcatenate ("fInitBase() => ", fErrorToString (bi_Err));
   fPrint (m);

And no more errors. But I don't like this look. It's lengthening. Anything shorter?

 
hoz:


Where's the problem?

It's in your approach. To be more precise - in your unwillingness to read the technical documentation. Always the same "rake". If you would be so kind, independently Read when you can pass parameters by reference and when you can't.

https://docs.mql4.com/ru/basis/variables/formal

If it's not clear, just memorise it.

 
VladislavVG:

It's in your approach. More specifically, your unwillingness to read the technical documentation. Always the same "rake". If you would be so kind, independently Read when you can pass parameters by reference and when you can't.

https://docs.mql4.com/ru/basis/variables/formal

If it is not clear, just memorise it.


In fact, you are right somewhere. But it's not an unwillingness to understand, it's just a little absent-mindedness. That's what I'm working on. The question is over. Thank you very much for the rebuke! I'll take it into account.
 
hoz:

In fact, you are right somewhere. But it's not an unwillingness to understand, it's just a little absent-mindedness. That's what I'm working on. The matter is settled. Thank you very much for the rebuke! I'll take it under advisement.
In the corner, on the peas!
 
artmedia70:
In the corner, on the peas!


 

Gentlemen, advise how to set up (close) tab view on fxbook. Thank you.


 
The issue has been resolved.
 

I haven't quite mastered mql4 yet, but I have already made some progress. I like the strategy tester in mql5, in my opinion, it shows a deeper picture and only because of the tester I want to convert EAs to mql5.

But one thing is missing on mql5 forum, there are not many messages, forum is not very active. Is it possible to ask questions on mql5 on this forum?

 
Forexman77:

I haven't quite mastered mql4 yet, but I have already made some progress. I like the strategy tester in mql5, it gives me a deeper view of the situation and only because of the tester I would like to change my EAs to mql5.

The mql5 forum has only a few messages, the forum is not that active. Is it possible to ask questions on mql5 on this forum?

I think MQL4 and MQL5 have divided people into traders and programmers. The MQL5 ones may make all sorts of pretty things and then sell them on the Market. The common trader needs only MQL4, not to mention those who trade by hand. I tried it myself, and even got a little insight into the OOP. Try and learn. It will pay off for you)).

 
Sepulca:

In my opinion, MQL4 and MQL5 have divided people into traders and programmers. In MQL5 , you can make a lot of things and then sell them on the MARKET. While a regular trader needs only MQL4 . Not to mention those who trade by hand. I tried it myself, and even got a little insight into the OOP. Try and learn. It will pay off for you)).

I think mql5 has a very powerful strategy tester, without it you can't check forward tests thoroughly. I optimize Expert Advisors on mql4 and start forward analysis, each worthwhile run takes a lot of time, but mql5 has just launched optimization and let me check all profitable forwards. The question is whether this in-depth analysis will help to make a profitable EA stable. It will be a shame to waste time studying mql5 and then discover that it's all for nothing.