Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1177
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
Have you tried slipping a string as #define str "long long string" or even as two strings via + or string function.
After all, Comment is also limited in the length of the string, but variables can be shoved so much that it does not fit on the monitor in a few lines.
Thanks, indeed the shorthand works, the compiler does understand but does not accept decoded functions (I think that's what it's called) with @. And the old compiler accepts such functions but does not add to import replacements taking them literally. If I import functions like in dll documentation, i.e. "TRANS2QUIK_CONNECT" instead of " _TRANS2QUIK_CONNECT@16", it returns 2 (TRANS2QUIK_QUIK_TERMINAL_NOT_FOUND). I don't understand the difference.
Thanks, the reduction does work, the compiler does understand but doesn't accept decoded functions (I think that's what it's called) with @. And the old compiler accepts such functions but doesn't add to import replacements taking them literally. If I import functions like in dll documentation, i.e. "TRANS2QUIK_CONNECT" instead of " _TRANS2QUIK_CONNECT@16", it returns 2 (TRANS2QUIK_QUIK_TERMINAL_NOT_FOUND). I don't understand the difference.
I don't know where it says so in the documentation, but the wildcard must be preceded by a slash. That's why the address line should look like this: C:\folder\file
So try writing it like this:"_TRANS2QUIK_CONNECT\@16"
Actually, I'm not very good with .dlls. So if that doesn't work, then...
@Maxim Kuznetsov I opened dll in WinHex and Dependency Walker it generates Ordinal, Hint, Function, Entry Point and it generates function names like(_TRANS2QUIK_CONNECT@16) with them the old compiler works and returns dll results. Do you mean these symbolic names?
@Alexey Viktorov I am not an expert in programming myself, but my modest knowledge was quite sufficient to handle my idea. Shielding \\ does not work.
Found automatic proxy dll generator in python https://github.com/mavenlin/Dll_Wrapper_Gen . Thought it works for me basically change only function names in the built dll. Tried to build it without changes compiler swears at @ in function names. Generated cpp piece
Piece of the generated def file
I understand that_TRANS2QUIK_CONNECT@16 _wrapper is the name of functions that will be visible from proxy dll. So I cut it down toCONNECT. The dll is built, but terminal showsTRANS2QUIK_QUIK_TERMINAL_NOT_FOUND. I guess it is not for my brain. I will have to check trading system manually and order dll there.
@Maxim Kuznetsov I opened dll in WinHex and Dependency Walker it generates Ordinal, Hint, Function, Entry Point and it generates function names like(_TRANS2QUIK_CONNECT@16) with them the old compiler works and returns dll results. Do you mean these symbolic names?
@Alexey Viktorov I am not an expert in programming myself, but my modest knowledge was quite sufficient to handle my idea. Shielding \\ does not work.
Found automatic proxy dll generator in python https://github.com/mavenlin/Dll_Wrapper_Gen . Thought it would essentially work for me to change just the function names in the assembled dll. It built a project for visual studio. Tried to build it without changes compiler swears at @ in function names. generated cpp piece
Piece of generated def file
I understand that_TRANS2QUIK_CONNECT@16 _wrapper is name of functions that will be visible from proxy dll. So I cut it down toCONNECT. The dll is built, but terminal showsTRANS2QUIK_QUIK_TERMINAL_NOT_FOUND. I guess it is not for my brain. I will have to check trading system manually and order dll there.
You have not said a word about the bit depth of terminal and DLL. And this is important.
@Koldun Zloy Tried Trans2QuikAPI_1.2 it is 32 bit with mt4 and quik 7, and also Trans2QuikAPI_1.3_x64 with mt5 and quik 8 it is like 64 bit only. I have enabled external transactions in quik itself. I thought that I have wrong function to import. I wrote it myself.
Kind of equivalent data types. If it wasn't right, I don't think it would have worked with the old compiler.
You need to decrease the testing speed at a certain moment. Manually it's hard to catch all such moments...
Hello! I have created a panel consisting of background and buttons in MQL5. When I drag the panel, only the background moves and the buttons stay where they are, and only on the next tick they move behind the background to the desired place. Please advise how to make buttons and background move simultaneously. Thanks in advance!
are we talking about the tester or online?
If online - look at the code, somewhere the move event is not routed normally. Panels by the way on the site only five different libraries, what do you mean?
And in the tester - it seems there is no way, and why.