vaknineyal: But I may have another orders with different symbols I need to check if I already have open position with the same symbol, if so check for trail stop if not Open position.
Use a proper order select loop. It usually looks like this. Click link below
ubzen:
You may want to read the Book so that you have an idea of Loops and Functions.
I already read most of it ... I am new with programming .... if cannot help thats OK, but please stop send me to read the book, I post here because I don't understand why it's not work for me.
vaknineyal: I already read most of it ... I am new with programming .... if cannot help thats OK, but please stop send me to read the book, I post here because I don't understand why it's not work for me.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
You have to do: if(OrdersTatal() > 0) { ... }
But I may have another orders with different symbols
I need to check if I already have open position with the same symbol, if so check for trail stop if not Open position.
Use a proper order select loop. It usually looks like this. Click link below
https://www.mql5.com/en/forum/139654.
https://www.mql5.com/en/forum/145507.
You may want to read the Book so that you have an idea of Loops and Functions.
I already read most of it ... I am new with programming .... if cannot help thats OK, but please stop send me to read the book, I post here because I don't understand why it's not work for me.
Thanks.
So you want someone to write the codes for you?
No Thanks .... leave it I will find an answer by my self
Thanks any way.
But I may have another orders with different symbols
I need to check if I already have open position with the same symbol, if so check for trail stop if not Open position.
Yeah yeah, I forgot. Here is what you do:
As already pointed out, you need a proper loop for your OrderSelect, using a random number such as 12345 will achieve nothing.
These do not return price values, they return the shift of the bar with the highest and lowest values.
Use MODE_HIGH and MODE_LOW, not MODE_UPPER and MODE_LOWER