Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 450
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
And I have several fields of the same type. I don't think that's going to help.
I found thishttps://www.mql5.com/ru/code/16282
I decided to pass its address (offset) in bytes instead of field name.
I see. You don't seem to have a full understanding of what you have and what you want to get.
Or tell me, how can I get a structure field knowing its string name?
here i have a value
string field="dval";
I want to query this particular structure field.
There are no variable names in the translated program. Address reference. and you can, for example, like this.
test x; if(number=1) y=x.num; or if(name="num") y=x.num; Byte-by-byte access to the structure is also an option
Can you tell me how to find the ratio of 2 time periods? (I need a ratio of bars between 2 periods)
I wrote it like this, but it gives 0. Time1>Time>Time3 always
Tried without explicit type conversion, and (double) tried to write
Can you tell me how to find ratio of 2 time periods?
I wrote it like this, but it gives 0. Time1>Time>Time3 always
tried without explicit type conversion, and (double) tried to write
and what is Time1?
What is Time1?
This is where the time value is stored, like the other variables
This is where the time value is stored, like the other variables
How about datetime instead of double?
Where do I write this? I don't really understand.
Can you tell me how to find the ratio of 2 time periods? (I need a ratio of bars between 2 periods)
I wrote it like this, but it gives 0. Time1>Time>Time3 always
Tried without explicit type conversion, and (double) tried to write
Said he had tried it that way before, nothing