[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] RE: intraday time control



PureBytes Links

Trading Reference Links

Thanks Ed, Rajiv, Barry:
 
Taking a little from each of you I think the final solution looks like this:
 
starttime = 063000;
endtime = 122900;
 
// Use for backtesting
tradetime = TimeNum() >= starttime AND TimeNum() <= endtime;
exittime = TimeNum() >= 122900;
 
// use for real time trading
//tradetime = Now(4) >= starttime AND Now(4) <= endtime;
//exittime = Now(4) >= 122900;
 
Buy = Cross(A, B) AND tradetime;
Short = Cross(B, A) AND tradetime;
Sell = Cover = exittime;
 
Cheers. SId
__._,_.___

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___