Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 333

 
Vitaly Muzichenko:

Find the code you need here


Thank you!

 
Alexey Kozitsyn:

For you and for the person you wanted to help: it doesn't work that way. You will get an error.

And it is desirable to deal with it, because it is the basis of working with all arrays in mql.


I know how to work with arrays, but I didn't know how OrderSelect works

 
Aleksey Vyazmikin:

I know how to work with arrays, but I didn't know how OrderSelect works

Then (assuming you know how to work with arrays) why don't you know how trivial selection in an array by index works?

And, please, if you still do not know how to correctly select an order from an array, then do not give advice - people will then believe that they have been correctly advised, and will not understand why it does not work correctly, or the program crashes due to a critical error.

 
There is an option in the terminal to assign a stop trawl to trades. This is done for each trade separately. Is it possible to automate this process with a script? Is there such a command in MQL?
Thank you.
 
Vladimir Tkach:
The terminal has the ability to assign a stop trawl to trades. This is done for each deal separately. Is it possible to automate this process using a script? Is there such a command in MQL?
Thank you.

There is no such command in MQL, but there are a huge number of different trawls.

Look for it in kodobase.

 
Artyom Trishkin:

Then (assuming you know how to work with arrays) why don't you know how trivial array selection by index works?

And, please, if you still don't know how to correctly select an order from an array, no need to give advice - people will then believe that they have been correctly advised, and will not understand why it does not work correctly, or the program crashes due to a critical error.


You won't believe me, but I don't have an attitude that all functions in MQ4/5 are implemented exactly by array rules, i.e. with zero index - if this is true, I'll take it as an axiom.

And, again, I have warned that the solution may not be correct.

I accept your complaint, and will no longer offer the code without certainty that it will work.

 

I am still waiting for help with the counter https://www.mql5.com/ru/forum/160683/page331#comment_5870993 .

If there are no answers, I will open a separate thread, as it is possible that not all smart people are here.

 
Aleksey Vyazmikin:

I am still waiting for help with the counter https://www.mql5.com/ru/forum/160683/page331#comment_5870993 .

If there are no answers, I will open a separate thread, because it is possible that not all smart people are here.

Didn't Viktor give you a hint?

I accept your claim and will not offer any more code without confidence in its work.

Thank you.

 
Artyom Trishkin:

Didn't Victor give you a hint?

The question is about the counter - how to make it - what is the logic there, so that you can work with any numbers...
 
Alexey Kozitsyn:

Do you synchronise the number of bars between the indicator and the EA?


How do you suggest?