It must watch all pending or open orders in the chart, and if it is one of all orderSymbol which match a symbol in the chart, then nothing happens.
If all OrderSymbols don't match symbol in the chart, then do other function.
This is my code, but it doesn't do like I want.
When it is one chart and match OrderSymbol, function works fine. If more than one and all that Symbols match with OrderSymbols, the function founds only one chart.
"For" cycle must look for all Symbols. " If" condition looks for only first true condition, And if it met, it doesn't look again, so their mix, would do, what I want, but don't do, maybe it is a mistake, which I don't find.
int total = OrdersTotal();
if (total>0)
{
for(int i=total-1;i>=0;i--)
{
if( OrderSymbol() != Symbol())
My_function();
}
}
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.
I want to write a function, which do:
It must watch all pending or open orders in the chart, and if it is one of all orderSymbol which match a symbol in the chart, then nothing happens.
If all OrderSymbols don't match symbol in the chart, then do other function.
This is my code, but it doesn't do like I want.
When it is one chart and match OrderSymbol, function works fine. If more than one and all that Symbols match with OrderSymbols, the function founds only one chart.
"For" cycle must look for all Symbols. " If" condition looks for only first true condition, And if it met, it doesn't look again, so their mix, would do, what I want, but don't do, maybe it is a mistake, which I don't find.