• Australian (ASX) Stock Market Forum

Hello and welcome to Aussie Stock Forums!

To gain full access you must register. Registration is free and takes only a few seconds to complete.

Already a member? Log in here.

Amibroker FAQ

Discussion in 'Software and Data' started by RichKid, Jul 15, 2005.

  1. It's Snake Pliskin

    It's Snake Pliskin

    Posts:
    3,922
    Likes Received:
    3
    Joined:
    Apr 21, 2005
    Thankyou Kave, Wayne and Lesm!
    Your help is much appreciated. :)
     
  2. ezyTrader

    ezyTrader

    Posts:
    152
    Likes Received:
    0
    Joined:
    Aug 10, 2006
    Hi all,

    I have just installed the trial version of Amibroker, and need some help with loading intra-day via QuoteTracker. QT is linked up to my Commsec and it's working fine. Is this a "feature" of the trial AB?

    Also, accidentally deleted some indicators off the basic charts options eg. OBV. Is there an easier way to restore them, apart from re-installing AB?
     
  3. wayneL

    wayneL Rotaredom

    Posts:
    18,295
    Likes Received:
    2,018
    Joined:
    Jul 9, 2004
    If you're still in trial, it's probably easier and quicker to re-install.

    Or if you know which ones you want, I can post the code here.

    Heres OBV:

    Code:
    Plot( OBV(), _DEFAULT_NAME(), ParamColor("Color", colorCycle ), ParamStyle("Style")  );
     
  4. ezyTrader

    ezyTrader

    Posts:
    152
    Likes Received:
    0
    Joined:
    Aug 10, 2006
    Thanks, wayneL.

    Another question - as ultimately I'm only interested in EOD and weekly in the use of AB, would QT linked to Commsec suffice, or, do I really need premium data?
     
  5. wayneL

    wayneL Rotaredom

    Posts:
    18,295
    Likes Received:
    2,018
    Joined:
    Jul 9, 2004
    That one I can't answer because I've never tried it that way. But I'm sure it has a QT plug in? The kicker is whether it downloads accurate historical EOD data or not.
     
  6. kaveman

    kaveman

    Posts:
    173
    Likes Received:
    4
    Joined:
    Jul 11, 2005
    Intraday data is not accurate enough for use as daily. There are too many corrections made during the day that show up as trades that would not be included in the end of day data. Besides through QT you can only get data as it happens from comsec, but you can backfill all of todays data on 20 minute delayed from tradingroom at end of day
    You really need to use daily data supply for daily or weekly analysis.
     
  7. rub92me

    rub92me Don't look back

    Posts:
    1,071
    Likes Received:
    6
    Joined:
    Apr 24, 2006
    Question for the Amibroker gurus. I'm importing eod ASX data that includes futures, but really I'm only interested in (three letter) stock codes. I have a script to clean up the futures after the import, but is there a way to restrict the import to three letter codes in the first place (other than editing the data before I import it in Amibroker?). I had a look around in the help file on data import scripts but couldn't find anything that does this. :confused:
     
    aus_trader likes this.
  8. Phoenix

    Phoenix

    Posts:
    68
    Likes Received:
    0
    Joined:
    Aug 9, 2005
    rub92me, you can with a script but wouldn't you also delete some stocks that have more then 3 letter codes?
     
  9. rub92me

    rub92me Don't look back

    Posts:
    1,071
    Likes Received:
    6
    Joined:
    Apr 24, 2006
    Phoenix, that's what I want.
    Say I have data in the EOD file that looks like this:

    BKY,20060320,0.75,0.77,0.71,0.71,1851025
    BKYO,20060320,0.53,0.55,0.50,0.505,724026
    BLD,20060320,8.95,8.99,8.90,8.99,1093978

    I want the import to skip the line for BKYO and only import the data for BKY and BLD (as I'm not interested in the options data).
    My script can delete BKYO after the import, which takes quite a long time to run.
    If you have a script that strips out at/before import, that would be most welcome!
     
    aus_trader likes this.
  10. Phoenix

    Phoenix

    Posts:
    68
    Likes Received:
    0
    Joined:
    Aug 9, 2005
    Ah i see but you already have a script that i was thinking about. To do it before you import would require a program :(.
     
  11. kaveman

    kaveman

    Posts:
    173
    Likes Received:
    4
    Joined:
    Jul 11, 2005
    Rather than try to limit the imports why not sort the database.
    Here is an aFL I use myself, made it long ago. I just move all symbols to Market0 then run the scan on all stocks.
    The only thing needed is to have any index already in the index category, and I keep any delisted stocks in watchlist 63
    After the scan any symbols left in market0 have no data and can generally be deleted
    So you can run any tests on market 1 being the shares only.

    //Sort shares into the markets
    //Graham Kavanagh 15 Apr 2005
    //Scan on all tickers

    Index = IsIndex();
    Delisted = InWatchList(63);
    Backtest = GroupID()==253;
    Share = (StrLen(Name())==3 OR (StrLen(Name())==5 AND StrMid(Name(),3,1)=="D" AND StrRight(Name(),1)!="P")) AND Index==0 AND Delisted==0 AND Backtest ==0;
    Other = share==0 AND index==0 AND DeListed==0 AND Backtest ==0;

    Buy=1;


    if( Share )
    { CategoryAddSymbol("",categoryMarket,1); }
    if( index )
    { CategoryAddSymbol("",categoryMarket,2); }
    if( Other )
    { CategoryAddSymbol("",categoryMarket,3); }
    if( Delisted )
    { CategoryAddSymbol("",categoryMarket,4); }
    if( Backtest )
    { CategoryAddSymbol("",categoryMarket,253); }
     
    aus_trader likes this.
  12. rub92me

    rub92me Don't look back

    Posts:
    1,071
    Likes Received:
    6
    Joined:
    Apr 24, 2006
    Thanks Graham. I have my data sorted already in a similar way, so it's no real bother from an explore/backtest perspective. Just thought I could prevent from importing it in the first place; I used to have Fcharts that had this built in as import functionality so was looking for something similar. If I can be bothered I may write a little macro to edit the data prior to import instead.
     
    aus_trader likes this.
  13. GreatPig

    GreatPig Pigs In Space

    Posts:
    2,368
    Likes Received:
    9
    Joined:
    Jul 9, 2004
    Download this Windows version of the Grep utility, put it either in the folder with the stock code file or in a folder in the DOS path, then from the command line in that folder, type:

    grep "^...," filename.ext > newname.ext

    where filename.ext is the name of the stock code file, and newname.ext is the output filename that you will then import into AmiBroker.

    Note that this will drop a few stock codes longer than 3 characters which are like stocks (eg. TLSCA). You could specifically include individual codes using a command like this:

    grep -e "^...," -e TLSCA filename.ext > newname.ext

    You could put all this in a batch file (say g.bat), even starting the filename for this year:

    grep -e "^...," -e TLSCA 2007%1.txt > 2007%1-X.txt

    Then to run the conversion, use:

    g 0411

    (assuming the filename has a date format like 20070411.txt)

    This would generate a file called 20070411-X.txt with just the codes you want, which could then be imported into AmiBroker.

    Sounds a bit complicated, but once the batch file is set up, it's dead easy (assuming you're familiar with using the command line interface).

    If you want to know more about Grep, command line switches listed here, and regular expression details listed here (go to the very end).

    GP
     
    aus_trader likes this.
  14. rub92me

    rub92me Don't look back

    Posts:
    1,071
    Likes Received:
    6
    Joined:
    Apr 24, 2006
    GP, that sounds like the sort of script I want; saves writing it myself!
    Thanks very much, I'll check it out.
     
  15. CanOz

    CanOz Home runs feel good, but base hits pay bills!

    Posts:
    11,531
    Likes Received:
    486
    Joined:
    Jul 11, 2006
    Well I've got Amibroker now, but I'm a bit overwhelmed. Can anyone suggest where to start learning, should I just get stuck into the help?

    Obviously I'd like some data too, I'll have a squiz over on the DATA thread, but anyone feel free to give me some advice...also managed to delete a couple of indicators..just too easy.

    Cheers,
     
  16. GreatPig

    GreatPig Pigs In Space

    Posts:
    2,368
    Likes Received:
    9
    Joined:
    Jul 9, 2004
    I'd suggest just getting familiar with the basic functionality first: importing data, setting up charts and indicators, drawing lines on them, and so on.

    To start learning AFL script, try looking through some of the existing ones that come with AmiBroker to see how they work and what they do. If you've never done any programming before, look in the Help at the section on AFL (AmiBroker Formula Language), starting with the first topic called "AFL Reference Manual". That covers the basics of programming with the language. The topic "AFL Function Reference" then gives the details of each function as you start to use them.

    It may take a while, but don't rush it and you'll get there.

    For data to get started, try float.com.au. Remember that it's not adjusted though, so some stocks will have big price jumps where there have been splits or consolidations. For serious use, you may prefer to pay for proper conditioned and adjusted data.

    Cheers,
    GP
     
  17. CanOz

    CanOz Home runs feel good, but base hits pay bills!

    Posts:
    11,531
    Likes Received:
    486
    Joined:
    Jul 11, 2006

    Thank GP, i'm going to dedicate my weekend to learn some of this, at least make some progress.

    Cheers,
     
  18. chops_a_must

    chops_a_must Printing My Own Money

    Posts:
    4,636
    Likes Received:
    0
    Joined:
    Nov 1, 2006
    Try the power scan add-on/ download:
    http://www.amitools.com/download.htm

    It looks to be great for plebs like me who still use typewriters. :p:

    It works on the trial version as well.

    I tell you what, I am very impressed with Amibroker just after mucking around with it tonight. It is rather seductive.

    And I'm not easily impressed. Wow! A blue car!
     
  19. CanOz

    CanOz Home runs feel good, but base hits pay bills!

    Posts:
    11,531
    Likes Received:
    486
    Joined:
    Jul 11, 2006
    Thanks Chops, i'll download it this weekend. Are you saying your not as PC literate as some? I would fit into that category, maybe like a 7, can use... but only to the level needed to get the job done! lol!

    My problem is i lose patiance or get easily distracted from my original purpose when browsing or learning new SW.

    Cheers,
     
  20. rub92me

    rub92me Don't look back

    Posts:
    1,071
    Likes Received:
    6
    Joined:
    Apr 24, 2006
    That looks like an interesting tool chops, thanks for the link. I'll give that a go this weekend as well. I was just starting to get stuck in writing/converting my own scans, and this looks like an easy way to get it done!
     
Loading...

Share This Page