try this buytime = timenum()<=122900; selltime =timenum()>=124400; buycondition = cross(a,b); buy=buycondition and buytime;
good luck Rajiv To: [email protected] From: [email protected] Date: Sun, 25 Jan 2009 10:39:03 -0800 Subject: [amibroker] intraday time control I need a little help in defining intraday time for trading control. I want to prevent entries after 12:29 and exit positions after 12:44. This is what I have tried so far and it does not work: (conceptual example) time = Now(4); Buy = Cross(A, B) AND time <= 1229; Short = Cross(B, A) AND time <= 1229; Sell = Cover = time >= 1244; Cheers, Sid _________________________________________________________________ HotmailĀ® goes where you go. On a PC, on the Web, on your phone. http://www.windowslive-hotmail.com/learnmore/versatility.aspx#mobile?ocid=TXT_TAGHM_WL_HM_versatility_121208
