• 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. Gringotts Bank

    Gringotts Bank

    Posts:
    6,175
    Likes Received:
    605
    Joined:
    Jun 30, 2007
    I assume you're doing a portfolio backtest with "all symbols" selected in the Analysis window.

    x.jpg

    Make sure you have symbol ^AORD in your database, with enough history. If you don't, use AQ to download from Yahoo finance.

    x.jpg

    Then substitute your breakout code where I have bolded below.

    SetForeign("^AORD");
    MAPeriod = Optimize("op",2,2,100,1);
    IndexFilterup = C > MA(C,MAPeriod);
    RestorePriceArrays();

    Buy = IndexFilterup AND BOut;
     
    qldfrog and willoneau like this.
  2. greasy_pancakes

    greasy_pancakes

    Posts:
    90
    Likes Received:
    0
    Joined:
    Feb 1, 2007
    Hey all, I've got AmiQuote running and downloading data using the Quandl source. It shows that the data is 'imported', however when I open a chart, it's not showing the most recent data. Can anyone help?
     
  3. Gringotts Bank

    Gringotts Bank

    Posts:
    6,175
    Likes Received:
    605
    Joined:
    Jun 30, 2007
    In AQ, double click "download completed". Is it empty or populated with the correct quotes?
     
  4. greasy_pancakes

    greasy_pancakes

    Posts:
    90
    Likes Received:
    0
    Joined:
    Feb 1, 2007
    I don't see 'download completed', only 'imported', next to the ticker in AmiQuote. When I double click, it says:
    $NAME XPE.AX
    Not Found

    I am running Windows 10 and using AmiQuote 3.10 and Amibroker 5.90 Professional Edition 64-bit.
     
  5. greasy_pancakes

    greasy_pancakes

    Posts:
    90
    Likes Received:
    0
    Joined:
    Feb 1, 2007
    Update: I installed Microsoft Visual C++ 2017 runtime and it seems to be working fine now, the charts are showing updated prices. Thanks GB.
     
  6. dutchie

    dutchie

    Posts:
    3,434
    Likes Received:
    494
    Joined:
    Nov 23, 2004
    Anyone having problems with entering 2020 data?
    I have looked at file data for say 2/01/2020 (e.g. 14D,200102,.195,.22,.195,.22,71258) and is no different to data to say 31/12/19 ( e.g. 14D,191231,.205,.21,.205,.21,110629).
    (No solutions found on net or at amibroker.com)
     
  7. julieta

    julieta

    Posts:
    9
    Likes Received:
    19
    Joined:
    Oct 19, 2014
    Here's a simple but time consuming workaround allowing Amibroker to read 2020 EOD data until your vendor starts sending data in the correct format.

    Open a daily EOD data file in a simple text editing program (not Word).
    Select and copy date segment from one of the ticker lines. For example Jan 2, 2020 will look like this200102. 200110. Fridays data
    Go to menu "Find and Change" or similar.
    Enter find: 190819
    Enter change to: 20200110
    Press "Change All" or similar
    Save
    All date events for every ticker in the daily EOD file are now in correct format.
    Repeat this for each daily file.
    Complain to your data provider to supply data in four digit format for the year.
    notepad++ is free and ok for this to work you need to replace 190819 with this 20200110 this works with comsec data save file and install with wizard this hint was taken from here https://forum.amibroker.com/ i have no problems from Norgate date
     
    peter2 likes this.
  8. dutchie

    dutchie

    Posts:
    3,434
    Likes Received:
    494
    Joined:
    Nov 23, 2004
    Thanks julieta, that worked.
    Is a bit of a pain having to do that each time.
    Found that reference and see that Tomasz is on top of it, blaming data vendors (rightly so). The year should be a 4 figure number. Will get onto my data supplier.
    Thanks again.
     
  9. qldfrog

    qldfrog

    Posts:
    5,089
    Likes Received:
    3,928
    Joined:
    Jun 8, 2008
    Which data supplier are you using?
    I have not checked my imports and hope I have not spent 2 weeks replaying last year...
     
  10. dutchie

    dutchie

    Posts:
    3,434
    Likes Received:
    494
    Joined:
    Nov 23, 2004
    I use Commsec.
    Amibroker assumes that the 20 in 200102 is the year 1920!
     
    qldfrog likes this.
  11. dutchie

    dutchie

    Posts:
    3,434
    Likes Received:
    494
    Joined:
    Nov 23, 2004
    Contacted Commsec. They will look into it.
     
  12. qldfrog

    qldfrog

    Posts:
    5,089
    Likes Received:
    3,928
    Joined:
    Jun 8, 2008
    Quick question how do you import from comsec, are you with iress or something like this, I use both bell direct and comsec but get all my AB feed from northgate
     
  13. julieta

    julieta

    Posts:
    9
    Likes Received:
    19
    Joined:
    Oct 19, 2014
    csnip.PNGcomsec.PNG
    step1 end of day prices step2 as in pic get date download you get all the warrants etc witch have to be deleted with a script
     
    CNHTractor, qldfrog and dutchie like this.
  14. qldfrog

    qldfrog

    Posts:
    5,089
    Likes Received:
    3,928
    Joined:
    Jun 8, 2008
    Thanks for the multiple responses
     
  15. Rsthree

    Rsthree

    Posts:
    52
    Likes Received:
    126
    Joined:
    Jan 19, 2020
    I've recently started using Amibroker and its giving me some headaches. I have many questions but I will start with the most frustrating first.

    I am trying to do what is seemingly a basic chart formatting function but I keep getting variable results.

    Each chart has multiple tabs and I'm wanting to fix a few tabs so they keep the same format every time I use Amibroker.
    eg.
    1st tab may be a price bar chart with SMA,
    2nd tab - Price bars and volume,
    3rd tab - All ords index price chart bars and volume, ie. locked to XAO,
    4th & 5th tabs to reflect the chart format from my 2 system AFL's.

    I've used the chart layout and template functions suggested in guide but the results still seem to vary.

    Any help will be appreciated.
     
  16. Newt

    Newt

    Posts:
    507
    Likes Received:
    765
    Joined:
    Oct 17, 2012
    Is it just me, or did someone put the Trash out?
    Could be one damned prickly customer but still an amazing AFL coder and tutor.

    Where are you Trash!!???
     
  17. Roller_1

    Roller_1

    Posts:
    304
    Likes Received:
    71
    Joined:
    Sep 13, 2013
    Does any one have or seen any code for a rolling 12 month returns profit table?

    i.e instead of each month displaying that months return it would display a rolling 12 month CAR

    This would be a great tool for looking into a systems consistency. I've tried to build my own no luck as yet.
     
    Warr87 likes this.
  18. Trav.

    Trav.

    Posts:
    841
    Likes Received:
    1,118
    Joined:
    Nov 27, 2017
    @Roller_1 funny enough I came across this today and i'm sure that you could modify the CBT code to achieve what you want ? or at least give you some ideas

    The below example displays the yearly returns at the end of your back test report

    https://alvarezquanttrading.com/amibroker-sample-code/

    upload_2020-5-29_13-41-47.png

    Code:
    // Provided by Cesar Alvarez www.AlvarezQuantTrading.com
    // this code is for daily bar tests////////////////////////////////////////////////////////////
    // Repalce with your code
    SetOption("MaxOpenPositions",10);
    SetPositionSize(10,spsPercentOfEquity);Buy = RSI(2) < 5;
    Sell = RSI(2) > 80;Short = Cover = 0;
    // End of replace
    ///////////////////////////////////////////////////////////// Or you can add the following to the end of your current code
    // will not output anything if there are less than 200 bars in your test
    SetCustomBacktestProc("");
    if(Status("action") == actionPortfolio)
    {
        dnStart = Status("rangefromdate");
        dnEnd = Status("rangetodate");
        yrStart = int(dnStart/10000);
        yrEnd = int(dnEnd/10000);    bo = GetBacktesterObject();
        bo.backtest();    ver = Version();    if(BarCount > 200)
        {
            dt = DateNum();
            if(ver <= 5.4)
                eq = Foreign("~~~EQUITY", "C");
            else
                eq = bo.EquityArray();        // This could also be done by compressing to Monthly bars
            eqM = 0; // end of year equity - saving 2001 data in bar 101, 2002 in bar 102, ...
            for (i = 1; i < BarCount-1; i++)
            {
                // are we at the end of a year
                if (int(dt[i+1]/10000) > int(dt[i]/10000) )
                    eqM[int(dt[i]/10000)] = eq[i];
            }        // save the last equity
            eqM[yrStart-1] = GetOption("InitialEquity");
            eqM[yrEnd] = eq[BarCount-1];        // output the results
            for (i=yrStart; i<= yrEnd; i++)
            {
                bo.AddcustomMetric("" + (i + 1900) + " Ret % ", 100*(eqM[i]/eqM[i-1] - 1));
            }
        }
    }
     
    Warr87, qldfrog and Roller_1 like this.
  19. Roller_1

    Roller_1

    Posts:
    304
    Likes Received:
    71
    Joined:
    Sep 13, 2013
    Cheers Trav, I'm more thinking a table similar to the std profit table. I'll look into it more and see how i go. I've scoured the Amibroker forum, no luck as yet though.

    Cheers
     
  20. Trav.

    Trav.

    Posts:
    841
    Likes Received:
    1,118
    Joined:
    Nov 27, 2017
    No problems mate, starting to get above my level, but I will keep an eye out for you.
     
    Roller_1 likes this.
Loading...

Share This Page