Errors, bugs, questions - page 2690
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
Hi.
What could be the error? I place two copies of the same indicator on the chart, I change the colour of the lines in the first indicator, the colour of the lines also changes in the second, but I do not change anything in the second. There are no global variables.
I don't see any logic in it.
For simple types, firstly, you can do so:
secondly, it is:
and it's not all crutches.
result in both cases:
17*256+92=4444The logic is that if you can write data into an array for structures within one function, it should be the same for simple types.
Okay, the situation here is quite simple.
The logic is that if data can be written to an array for structures within a function, it should be the same for simple types.
I'd like to confirm this logic with something other than your opinion.
google "C# struct to byte array" if you're interested.
Note that C# is a brainchild of Microsoft for all non-programmers, and what in MQL is done in a couple of lines, in C#, in fact, simply not provided - in googled examples everything is done via Marshal, and this is work with unmanaged code, that is, it's outside of .Net - in MQL terms - "this is a .dll call".
that's how it's logical...
I'd like to confirm this logic with something other than your opinion.
google "C# struct to byte array" if you're interested.
Note that C# is a brainchild of Microsoft for all non-programmers, and what in MQL is done in a couple of lines, in C#, in fact, simply not provided - in googled examples everything is done via Marshal, and this is work with unmanaged code, that is, it's outside of .Net - in MQL terms - "it's a call of a .dll".
That's how it's logical...
There's a lot of that in there:
Lots of overloaded methods:
There's such a thing:
Lots of overloaded methods:
https://metanit.com/sharp/tutorial/5.6.php
This is analogous to working with files in MQL with flag FILE_BIN
If I'm not mistaken, you didn't want to work with files, but just serialize a simple data type into a byte array
https://metanit.com/sharp/tutorial/5.6.php
This is analogous to working with files in MQL with flag FILE_BIN
If I'm not mistaken, you want to serialize a simple data type into a byte array
FileStream
MemoryStream
Both files and memory.
Why do you have such a dislike for C# :)?FileStream
MemoryStream
Both files and memory.
Why do you have such a dislike towards C# :)?About the hostility you invented, I just wrote that the language is for non-programmers, which corresponds to a very friendly to the user, to be specific
about file streams, you've made a simple task quite complicated
The essence of my question to you is that MQL is a very advanced language in terms of "raw data" processing, one more example - MQL has no default structure alignment, it's convenient for users
I just wrote that the language is for non-programmers, which corresponds to a very user-friendly, to be specific
about file streams, you've made a simple task quite complicated
The essence of my question to you is that MQL is a very advanced language in terms of "raw data" processing, one more example - MQL has no default structure alignment, it's convenient for users
There is an analogue of file stream only in RAM.
Why? Mostly simple types can be converted to bytes this way:
this code (first part) should work in C# as well, at least I never had any problems with integer types, it seems like variant #3 already
you can wrap my code in a loop to make it a bit more compact
UPD:
Note that C# is the brainchild of Microsoft for all non-programmers, and what in MQL is done in a couple of lines in C#, in fact, is simply not provided for