Open order after certain time

Examples step by step how to make your own automated strategy or user indicator
Message
Author
plasmon
Posts: 14
Joined: Mon Apr 15, 2013 2:45 pm

Open order after certain time

#1 Postby plasmon » Fri Dec 13, 2013 7:27 pm

Hi All,

I have tried different time functions, but am just not able to open an order after a certain number of hours have passed after the previous order has closed. Could anyone please help?

E.g. open order only if ten hours have passed since previous order closed.


Thanks.

plasmon
Posts: 14
Joined: Mon Apr 15, 2013 2:45 pm

#2 Postby plasmon » Sun Dec 15, 2013 9:40 am

I have been trying this code, but it does not work:


var

TimeAfterPause:tdatetime;

hours:integer;

begin



hours:=1;

TimeAfterPause:=OrderCloseTime+((1/24/60)*60*hours);



And ((iTime(Symbol,1,0) > TimeAfterPause)


Return to “Programming lessons”

Who is online

Users browsing this forum: No registered users and 4 guests