When I cant set time for the expiration of pending order less than 600 second, how to set it in EA? I need to close/delete pending order 1,2 or 3 minutes after entering. How to do it?
When I cant set time for the expiration of pending order less than 600 second, how to set it in EA? I need to close/delete pending order 1,2 or 3 minutes after entering. How to do it?
THX
Check that the OrderType() is not OP_BUY or OP_SELL ( that means that the order has not been triggered)
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.
In this example, the expiration time is 0. I need example of pending order "Good for the Day Only".
Did you read what error 147 means ?
as RaptorUK wrote
RaptorUK 2012.01.12 12:45
so, call your broker
So simple and effective.. Great!
Thanks.
Check that the OrderType() is not OP_BUY or OP_SELL ( that means that the order has not been triggered)
if TimeCurrent() -OrderOpenTime()>=nMinutes*60
Delete the order
It works like this (so far :)
THX
if (OrderType() == OP_BUYSTOP || OP_SELLSTOP)Nope. Zero is false, non-zero is true. (OrderType() == 4 || 5) equals (OrderType() == 4 || true), and (anything or true) is always true.