Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1218
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
I don't understand, an array index is an index from 0 to N. And what you want is more like a dictionary with hashes. I don't know how to do this in an array and I don't think it can be done in a regular array. There's a Generic class library with dictionaries in MT. That should help.
Thanks for the valuable information. Everything is clear and straightforward on this point. That is, a strict sequence of index values of any array (necessarily starting with 0) is an inherent property of any array.
If you're not too much trouble, please give me another answer to the following question: .... There is a unsorted one-dimensional array, say, with 10 elements, which are all filled with values. Using the ArraySort(S_L,10,0,MODE_DESCEND) function
this array is sorted in descending order, and after the sorting the order of array element values has drastically changed.
Q. After this array has been sorted, can I use some function to return the array to the state it had before sorting, i.e. the former sequence of values and the former sequence of indices should be.
Thank you.
Thank you for the valuable information. Everything is clear and straightforward on this point. That is, a strict sequence of index values of any array (necessarily starting from 0) is an inherent property of any array.
If you're not too much trouble, please give me another answer to the following question: .... There is a unsorted one-dimensional array, say, with 10 elements, which are all filled with values. Using the ArraySort(S_L,10,0,MODE_DESCEND) function
this array is sorted in descending order, and after the sorting the order of array element values has drastically changed.
Q. After this array has been sorted, can I use some function to return the array to the state it had before sorting, i.e. the former sequence of values and the former sequence of indices should be.
Thank you.
I don't know such a function, in general, in such tasks, a copy of the array is saved, and if you need the original, a copy is used.
Any sorting function is a series of comparative operations and permutations or, correctly, reassignment of array values that are not memorized. Therefore, there is no way to do it without a copy of the original.
And there is no such thing as an index sequence. The sequence of indexes is always the same, from 0 to N in ascending order. We can flip the array, but this is reassigning the value of the Nth element to the zero one and beyond.
I do not know such a function, in general in such tasks, a copy of the array is stored and if the original is needed, a copy is used.
Any sorting function is a series of comparative operations and permutations or, correctly, reassignment of array values, which are not remembered. Therefore, there is no way to do it without a copy of the original.
And there is no such thing as an index sequence. The sequence of indexes is always the same, from 0 to N in ascending order. We can reverse the array, but it is reassigning the value of the N-th element to the zero one and so on.
I see. Thanks, so I need to copy the array to another array first, and then send the first array to sort.
Thanks again.
returned values
iok is 2
fok is 1
gtc is 0
Is this correct? Can't there be two policies available?
Yes, it can.
The function in this mode returns policy flags.
I don't get a lot of replies here, so I'll make a new topic every time.
Because you're asking questions that are covered with examples in the help.
Or do you want me to read them out loud to you?
Because you are asking questions that are covered with examples in the help.
Or should I read them out loud to you?
There was also a question that wasn't covered in the help. I understand of course that there are many like me here and you are tired of repeating the same thing. But you could have explained it to the man in more detail than in the fact sheet. But of course this is at your discretion. But again, there was a question that is not reflected in the briefing, whether there is more than one enforcement policy. Is it your responsibility to answer questions that are not on the brief? Is it your responsibility to be rude? Instead of being rude, you can explain more than in the fact sheet. But it is a question of personalities.
You don't even read the forum, not just the documentation.
Here's the answer
This is the forum for trading, automated trading systems and strategy testing.
Any questions from newbies on MQL4 and MQL5, help and discussion of algorithms and codes
Artyom Trishkin, 2020.07.17 13:31
Yes, it can.
The function in this mode returns flags of policies.
You don't even read the forum, not just the documentation.
Here's your answer
This is the answer after the flood, if a person does not think it is necessary to answer a question, let him say so. But he is silent, and then he allows himself to be rude. I understand, of course, corporate solidarity above all.
It's answer after flooding, if the person doesn't think it's necessary to answer the question, let him say so. But he keeps his mouth shut and then allows himself to be boorish. I understand, of course, corporate solidarity above all.
Ward 6.
Do you think that someone should sit at the monitor and wait for your question? If there is no answer for 3 minutes, that's it? A disaster? You first got an answer and then an explanation of why there is no response. Instead of thanking you, you're being unreasonable. And what does corporate solidarity have to do with it? What corporation are you referring us to?
It's answer after flooding, if the person doesn't think it's necessary to answer the question, let him say so. But he keeps his mouth shut and then allows himself to be boorish. I understand of course, corporate solidarity above all.