Variable Input to delete Pending Orders in Minutes or Seconds after opening.
-
Hello everyone!
I have a fully functioning EA for both MT4 & MT5. MT5 operates 100% perfect but MT4 doesn't. I have a limit order variable to expire pending orders after 'x' amount of time and the MT5 one doesn't have limitations but the MT4 version does. It says a "Minimum of 11 minutes so the minimum was set by default." But, for the MT4 version, I am trying to get the logic right and use the existing 'exp' constant and variable that has worked before to decide when to 'delete' the pending orders instead. Below is a pic of what works on MT5 and how simple it is to have them 'expire.' If anyone has built a delete pending order module, I am willing pay for someone's consultation to rectify this headache of mine. In my head, this doesn't seem hard to fix. But you will see in the shared project that I have tried A LOT of different ways to try and delete the pending orders. I'm trying to learn this program as fast as I can but I may be practising the wrong ways to tie blocks together. Thanks in advance for any help!
http://fxdreema.com/shared/mgvYDLhae

-
@bbmess Could you please share the link to the project?
-
It's right above the picture in the original link.
-
@bbmess Ooops, sorry for my bad attention.
I can't find the block where that variable is used. Which one is it? -
@l-andorrà Thank you for the reply. The picture posted is in both the Buy and Sell pending order block, under expiration mode, set to specified time. I want to know where in the arrangement attempt of blocks for Delete Pending Orders is flawed. I'll use that 'exp' variable in a delete pending order area instead of expiration. I am just struggling to figure out how to arrange the blocks properly to allow me to delete pending orders after 1 minute. Thanks again for any help.
-
@bbmess I don't find those variables used there. I see 'No expiration' option is selected instead. That said, expiratin will not work on the 'on timer' tab. Expiration needs to be used on the 'on tick' tab to be functional.
-
Yes, that is correct. But when I change it to 'Specified Time' that is where the variable is. And the exact same EA in MQL5 operates flawlessly. In MQL4, it operates the same except the minimum expiration for pending orders is 11 minutes. That's why I want to arrange the blocks in the right place to 'Delete Pending Orders' instead of letting them expire. I will resume my test in 'On Tick' as that does make sense and I will see if there's something promising that pops up. All I want is an input that takes 'Minutes' and deletes the pending orders after that many minutes.
-
I've found the arrangement AND I've been able to keep the variable I was using before. This is the precision I needed. Only took 400+ tests.

-
@bbmess Thank you very much for sharing.