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

[amibroker] test if buy or short outstanding



PureBytes Links

Trading Reference Links

hi there, i want to close out my positions at the end of the day.. i 
use the following for testing end of trading day: 

sell = cover = Cross(TimeNum(),195500); 


but i want to extend this with testing if a position is really 
outstanding at that stage...  


so how can you test if a buy or a short is still outstanding 

i tried something like >

Buy   = Cross(roco,ma_roco);
Sell  = IIf(Cross(ma_roco,roco),True,IIf(Cross(TimeNum
(),195500),True,False));

Short = Cross(ma_roco,roco);
Cover = IIf(Cross(roco,MA_roco),True,IIf(Cross(TimeNum
(),195500),True,False));

and then some plotshapes stuff

This gives me correct buy and sell and short and cover arrows but i 
always get the sell/cover one at 19:55 aswell.

i have to add somethin such as >

Sell  = IIf(Cross(ma_roco,roco),True,IIf(Cross(TimeNum(),195500) and 
buy == true,True,False));
 

but this does not work...


so how can i test is a buy (or short was outstanding at 19:55 hr

thanks




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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