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.
thanks konstantin but i guess this code
must be written in this way
if ( OrderType()!= OP_SELL || OrderType()!= OP_BUY )continue;thanks for your help
Equivalent
If there is no BUY and SELL then continue . So everything is correct.
Equivalent
ok you are right, thanks pro
If there is no BUY and SELL then continue . So everything is correct.
Equivalent
hi Konstantin
i dont clearly understand why this test :
there are only two situations when we open a trade : buy or sell, arent they ?
why we must test if an open trade has a type different of buy or sell ?
hi Konstantin
i dont clearly understand why this test :
there are only two situations when we open a trade : buy or sell, arent they ?
why we must test if an open trade has a type different of buy or sell ?
OrderType
OP_BUY - buy order,
OP_SELL - sell order,
OP_BUYLIMIT - buy limit pending order,
OP_BUYSTOP - buy stop pending order,
OP_SELLLIMIT - sell limit pending order,
OP_SELLSTOP - sell stop pending order.
I try it but
it collect's the profits of all the opened orders which was opened before the current time ,,i just want the oldest order only sir
Check by tickets. The smallest, is the oldest.
OrderType
OrderType
tnx
OrderSelect(i, SELECT_BY_POS, MODE_TRADES ) gives open and pending orders
Check by tickets. The smallest, is the oldest.
great idea thanks
it works perfectly thanks boss