Discussion on "How to write a DLL for MQL5 and exchange data in 10 minutes". - page 11
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
Well, yes, I've seen it without it as well, it doesn't work for me, well, show me what to duplicate, will you point me in the right direction?
https://github.com/Roffild/RoffildLibrary/blob/master/Libraries/Roffild/PythonDLL/public.h
https://github.com/Roffild/RoffildLibrary/blob/c38ba6babd0935704fd30abeb58b953e33ede3e9/Include/Roffild/PythonDLL.mqh#L16
I used this approach so as not to duplicate code in different files.
It's not something I can do.
What libraries do I need to include in c++ to pass dates and strings to dll, and how do I work with colours in c++?
None are needed. __time64_t (datetime) and wchar_t (string) are standard types. The analogue for colour is COLORREF.
None are needed. __time64_t (datetime) and wchar_t (string) are standard types. The analogue for color is COLORREF.
Can't you guys show me how this variable is declared and how its values look like using your recommendations? For dates it must be__time32_t because I'm using 32. Show me how to declare__time32_t, how to declare variable storing date and how it looks like and the same for colours. With strings, I do this
#include<string>
using std::string;
string l="123456 ";
For the dates advised #include<chrono>, but it does not work, but about the colours were given advice even more complicated even write about it will not.
None are needed. __time64_t (datetime) and wchar_t (string) are standard types. The analogue for color is COLORREF.
So, let's see how it works, shall we?
How to implement datetame and color type variable in c++ dll library? How to call Print() function in dll what to replace it with, because c++ doesn't have it?
Print() is a function available only in mql4 and mql5. It cannot be replaced directly, because the output device for it is a log file of the terminal. But it can be called indirectly, if you send a corresponding command to the Expert Advisor (indicator, script), to which the dll is connected. It depends on how the data exchange between dll and the Expert Advisor is implemented.
Also, if there is a task to print something somewhere, not necessarily in terminal journal, there are a lot of possibilities for this: file, printer, display in the end.