PLEASE HELP// Need a code that will DELETE Untrigered Pendin Order after 30minutes.

 

Hi,

I am personally Grateful to everyone assisting others here, and I wish all of you the best you wish yourself.

Please Kindly assist me with a code that will Automatically Delete Pending Orders that were not trigered after 30minutes. i have tried several options within my undestanding using

TimeCurrent() - OrderOpenTime() > 1800;

But the error I get is: "Invalid ticket for OrderDelete() Function"

Please Help,

Thank you,

fxtutor.

 

No need to remove them, just use an ExpiryDate and they 'disappear' on their own :)

extern int ExpirationSeconds = 1800;


datetime ExpiryDate;

ExpiryDate =TimeCurrent()+ExpirationSeconds; // Then use ExpiryDate in your OrderSend

FWIW

-BB-

 
Thank you very much, it works perfectly.