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

[amibroker] Close trades at a particular time



PureBytes Links

Trading Reference Links


Hi all,

i am using 5 sec bars as the base periodicity in the backtester. I 
have written some code to close all intraday trades at 1900 (7pm):

Sell=SellPrice==bestlong OR TimeNum()==190000;
Cover=CoverPrice==bestshort OR TimeNum()==190000;

However, if there is no 190000 bar (there were no quotes in that 5 
sec period), then the back tester does not close trades at 190000. 
(It closes them at some other point). I would like it to close 
trades at closest next interval e.g. 190005 or even the previous 
closest say 185955.

Any help would be appreciated.

Sam







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/