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

[amibroker] Re: japanese candlesticks



PureBytes Links

Trading Reference Links

My AFL code to automatically create watchists no longer works. The 
following worked when CSI gave its index ticker names like: 

RUT-I

index = StrRight( Name(), 2) == "_i"; //was always at the end.
if(index) CategoryAddSymbol( "", categoryIndex, 1 ) ;

But now CSI has appended its unique ticker number to each ticker - a 
good way to make sure active and inactive stocks with the same 
symbol will have two distinct and unique tickers when imported into 
AB. So RUT-I new ticker in AB is

RUT-I-6754 

And my StrRight code will not work. Any ideas on how to change my 
code would be appreciated. The "brute force" approach would be 
something like the following, but I am hoping to find a more elegant 
way to code this. 

p4 = StrMid( Name(), 4, 2);
p5 = StrMid( Name(), 5, 2); //brute force
p6 = StrMid( Name(), 5, 2); //brute force
etc.
index = p4 == "-I" OR p5 == "-I" OR p6 == "-I" ;
London = p4 == "-L" OR p5 == "-L" OR p6 == "-L" ;
etc.
if(index) CategoryAddSymbol( "", categoryWatchlist, 6 ) ;
if(London) CategoryAddSymbol( "", categoryWatchlist, 7 ) ;
etc.





------------------------ 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 
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/