Expiration problems

 

Hi guys,

I want my pending order to expire after 240 minutes...I am pretty sure it should be in seconds so I did it like this :

ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,buystopfinal,3,0,0,comment,Magic,14400,Green);


Problem is I get an error that reads : 2009.05.27 20:00 My_EAv02 EURUSDm,H4: Error opening BUY order : 3


I remove the 14400 and replace with 240 and same error I remove and place 0 it then trades properly but does not expire....


any ideas as to why this is the case?and how to make the order expire after 240min?


thanx...

 
23510:

any ideas as to why this is the case?and how to make the order expire after 240min?

The parameter needs to be a time, not a number of seconds. In other words, add 14,400 to TimeCurrent().

 
jjc:

The parameter needs to be a time, not a number of seconds. In other words, add 14,400 to TimeCurrent().

aah! thank you! Ill try that

 
it worked jjc, thanx for the help! :)
Reason: