Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1118
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
There is no need to guess. You have to think and understand what is being done and for what purpose. When something needs to be written and when it doesn't need to be.
It is thinking that the print should contain a string and any numeric value should be cast to a string.
But this example showed that the compiler is getting sluggish. And how can we not guess when the compiler skips and when it doesn't.
It would seem that the print should be converted to string, so any numeric value must be cast to string.
But this example showed that the compiler gets obtuse. How not to guess when the compiler skips and when it doesn't.
Again - the code here - what's not clear?
ZS. If it's about this:
... I didn't check it - just retyped it in the post.
Make functional conversion to string:
Friends!
I'm struggling with the problem of connecting a DLL to MQL. I am describing my problem:
1. At first I tried to write a .dll library in C#. I have found that MQL4 does not "eat" such libraries, since all methods inside dll are closed, if written in C#. I started to actively search for a solution to the problem. I found several variants on the Internet, like the connection of the "DLL Export" library, downloaded from NuGet. Tried different ways, it didn't work. I really don't want to have a "fragile" solution to this problem, by the principle "it works today and not tomorrow". Tried it this way, and there's actually a lot of how it works otherwise:
2. Figured out that I'd most likely have to write a stable-working C++ library. Plugged it in from the 1st time, test queries went through without any problems. But when I started trying to return a text message (to MQL) with a method (from DLL), I encountered a new problem - the MQL response I got was"?????‡?-". I tried to decode the message, but it didn't work! I tried to return the value via a function parameter - I got "?". I searched a lot of things and still haven't found a solution. This is the variant I've settled on, but it returns question marks:
I'm getting an answer in the form of:
Decoding doesn't help...
What is needed essentially:
1) is there a real solution to this problem via C#? I need a stable beautiful solution! Half-measures, even if they work now, but may fall off with a new build, is not an option.
2) If there is no C# solution, go through C++. How to properly send messages in both directions without losing quality? (MQL - DLL - MQL). I need the variant that equally works with MT4 and MT5.
Again - code here - what is not clear?
It is not clear why constants from H1 and above are returned that do not correspond to the period as before H1
The same is returned by the _Period variable.
It is not clear why constants from H1 and above are returned that do not correspond to the period as before H1
The same is returned by the _Period variable.
Artyom don't freak out ))
Why to M30 exactly the values of TF are displayed
1
5
30
And on H1 it starts with 16385
Well, it's not logical to return the value to minutes first, and then to the hell.
And it doesn't fit the description in the help for _Period as a timeframe return value.
Artyom don't freak out ))
Why to M30 exactly the values of TF are displayed
1
5
30
And on H1 it starts with 16385
Well, it's not logical to return the value to minutes first, and then to the hell.
And it doesn't fit the description in the help for _Period as a timeframe return value.
Timeframevalue. Not the number of minutes. Not the number of seconds, not the number of geese at Baba Nyura's, but the value of the timeframe.
The value of the timeframe. Not the number of minutes. Not the number of seconds, not the number of geese at Baba Nyura's, but the value of the timeframe.
This is what we are talking about, that constants must be equal to timeframe values!
And carry the logical and mathematical meaning of the correspondence.
Because these values are used in the calculations.
M1 = 1
M5 = 5
M30 = 30
H1 = 60
H4 = 240
D1= 1440
Otherwise the meaning of the returned values is lost.
Therefore it is a bug in my opinion.
https://www.mql5.com/ru/articles/18
https://www.mql5.com/ru/articles/5798
I'm surprised you have the patience to repeat it all for such a long time, and in the morning... Although you're already in the morning after another sleepless night.))
At least put him in quarantine for 24 hours to read the documentation carefully. That's a shame... This is the first time such an ace in the C-language varieties has said such nonsense. And this is the first time it's all been explained...
Just imagine that this was figured out in Service Desk. They probably don't have that kind of balance there, that's why they closed it.