• 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. tminus

    tminus

    Posts:
    129
    Likes Received:
    1
    Joined:
    Jul 1, 2008
    Hi, is there a way to open a particular chart always on the "Weekly" view, each time I click on a company from the analysis results table, it reverts back to the daily view.
    I am using
    TimeFrameSet( inWeekly );
    in the code
    the graph plots using weekly data but the time axis is still using the daily timeline
    Capture.PNG .
     
  2. tminus

    tminus

    Posts:
    129
    Likes Received:
    1
    Joined:
    Jul 1, 2008
    ^ Choosing Weekly in the settings (for Periods) of the Analysis window, stops the chart switching to daily.
    But is there a way to have that set in the code for a chart.
     
  3. xyz246

    xyz246

    Posts:
    13
    Likes Received:
    0
    Joined:
    Oct 25, 2009
    Hi Guys, How do I make a scan for the following, whereby to scan stocks and place in separate columns based on the zscore calculation (zz):
    > 0 and < 2 >2 and <5, >0 and <-2, >-2 and <-5

    Tks



    function zscore(price,Length)
    {
    av = MA(price,Length);
    st = StDev(price,Length);
    zs = (price - av) / st;
    return zs;
    }
    zz= zscore(C,20);
    Plot(C,"C",colorBlack,styleCandle);
    Plot(zz,"z-score",colorDarkBlue,styleLine|styleOwnScale,-2,2);
    Plot(0,"0",colorDarkGrey,styleDots|styleOwnScale,-2,2);
    Plot(1,"1",colorDarkGreen,styleDots|styleOwnScale,-2,2);
    Plot(-1,"-1",colorDarkGreen,styleDots|styleOwnScale,-2,2);
     
  4. howardbandy

    howardbandy

    Posts:
    838
    Likes Received:
    93
    Joined:
    Jun 13, 2007
    Hi xyz --

    You probably want an Exploration, which will result in a table.

    (Plots show up when you "Apply Indicator" to open a pane in the chart window to plot the indicator.
    Scans are usually used to display lists of issues with action signals -- Buy or Sell -- for a short time period, such as today only.)

    As a first cut, which puts all the zscores in a single column which you can sort by clicking the header of that column:

    // ZScoreExplore.afl
    //
    // Run this as an Exploration
    //
    // Set the current symbol or use a watchlist
    // Set a date range or use n last days
    // Click Explore
    //
    // To sort, click the column header, ZScore

    function zscore( price, Length )
    {
    av = MA( price, Length );
    st = StDev( price, Length );
    zs = ( price - av ) / st;
    return zs;
    }

    zz = zscore( C, 20 );

    Filter = 1;

    AddColumn( zz, "ZScore", 10.4 );

    //////////////// end ////////////////

    Thanks,
    Howard
     
  5. sparfarkle

    sparfarkle

    Posts:
    22
    Likes Received:
    0
    Joined:
    Mar 16, 2010
    Hi Fellas,
    Just wondering if anyone can tell me how to bring up OOS equity curves for previously saved walk forward test results on a portfolio level.
    I worked out how to bring them up on current ongoing studies but once finished and closed i can't seem to find any way to bring it up again without doing the test again.:confused:

    Thanks a lot,

    Sparfarkle
     
  6. AlterEgo

    AlterEgo

    Posts:
    500
    Likes Received:
    7
    Joined:
    May 24, 2008

    I recently came across a method in the Amibroker Knowledge Base on how to create a copy of the portfolio equity to another symbol so you can keep it for future analysis. Will this help? See http://www.amibroker.com/kb/2006/03/11/how-to-create-copy-of-portfolio-equity/
     
  7. sparfarkle

    sparfarkle

    Posts:
    22
    Likes Received:
    0
    Joined:
    Mar 16, 2010
    Thanks for the link AE,not quite what i was looking for but useful in itself.
    My question relates to opening a previously saved walk forward study showing all the results but being unable to bring up an out of sample equity curve for it.:eek:

    Sparfarkle
     
  8. PPC NO 1

    PPC NO 1

    Posts:
    8
    Likes Received:
    0
    Joined:
    Sep 28, 2009
    Can anyone please tell me whether the AlertIf function can be used for multiple stock symbols at the same time? If so, how can it be done? I have live data feed from IQFeed. Thank you.
     
  9. xyz246

    xyz246

    Posts:
    13
    Likes Received:
    0
    Joined:
    Oct 25, 2009
    Hi Howard,
    Thank you for your reply, you make it look so easy. I am attempting to learn.. from no experience in programming on and off for quite a while now between working etc. I have to learn to look outside the square, and tackle the problems from different angles, (I think.) Thank you again.
     
  10. tminus

    tminus

    Posts:
    129
    Likes Received:
    1
    Joined:
    Jul 1, 2008
    I am doing explorations on a specif set of date ranges, i.e. not upto the current date e.g. 1/10/2010 to 1/3/2011.
    I am having trouble figuring out when we are at the last day of the exploration range, as Amibroker's barindex goes beyond the range.

    As I plan to filter only the stocks I am currently holding (i.e. bought) and perform a rough profit calculation, so these values can be side by side in a table next to the indicator values I am testing.

    The end goal is plot these on a scatter diagram (by cut and pasting the table into Excel) and see if there are correlations.

    I can't use backtest to calculate individual profits because then I lose the indicator values.

    Thanks
     
  11. tminus

    tminus

    Posts:
    129
    Likes Received:
    1
    Joined:
    Jul 1, 2008
    I am currently manually writing the date in code to signal this
    EndExp = 1110304; //1/3/2011
    EndExpBar = IIf( BarIndex() == ValueWhen(EndExp == DateNum(), BarIndex()),1, Null) ;
     
  12. Synergy

    Synergy

    Posts:
    358
    Likes Received:
    0
    Joined:
    Feb 26, 2007
    Couple of beginner questions...

    Is there a way to specify a specific range? Rather than just 'last x bars', I want the average of the bars between 20 and 3 days ago. It can be done by summing the last 20, and subtracting the last 3, and taking the average, but I'm wondering if theres aneater way.

    Also, I see there is a lowest and highest function. Is it possible to get the 2nd lowest, or the sum of the top 5 highest?
     
  13. colion

    colion

    Posts:
    116
    Likes Received:
    0
    Joined:
    Aug 6, 2010
    Remember that MA() is an array. So,

    X = Ref( MA( C, 17 ), -3 );
     
  14. captain black

    captain black

    Posts:
    1,281
    Likes Received:
    748
    Joined:
    Oct 24, 2005
    Amibroker 5.43.0 Beta was released earlier this morning and introduces multi-threaded Backtesting. A quick test of one of my systems shows backtesting speed reduced from 17 seconds down to 8 seconds :)

    The next step will be the implementation of multi-threading for optimisation/ walk-forward analysis. Tomasz seems particularly receptive to any suggestions at the moment regarding these changes so it would be a great opportunity for anyone with an interest in this area to test the current Betas and provide some feedback via the Yahoo list or direct to Tomasz.
     
  15. pavilion103

    pavilion103

    Posts:
    3,293
    Likes Received:
    14
    Joined:
    Dec 14, 2010
    Is there any way at all to get up a New High-New Low indicator which tells how many companies on the All Ords have made new highs/lows on any particular day?

    I'm not too optimistic that there is but thought I would ask just incase.
     
  16. captain black

    captain black

    Posts:
    1,281
    Likes Received:
    748
    Joined:
    Oct 24, 2005
    The Add to composite function would probably be the best way of creating a custom indicator to show those values. A couple of links below. The 2nd link has links to several AFL library formulas with some good examples. eg. 52 week new high/low etc.

    http://www.amibroker.com/guide/a_addtocomposite.html

    http://www.amibroker.com/guide/afl/afl_view.php?name=addtocomposite
     
  17. pavilion103

    pavilion103

    Posts:
    3,293
    Likes Received:
    14
    Joined:
    Dec 14, 2010
    Thanks, that is exactly what I'm after.
    However, I am having difficulty applying this as an indicator. I opened the second link you posted to use as the indicator and followed the instructions in the first link but I cannot get my head around it.
    Is there a simple way to explain this for someone who isn't all that savvy with Amibroker or coding?
     
  18. captain black

    captain black

    Posts:
    1,281
    Likes Received:
    748
    Joined:
    Oct 24, 2005
  19. pavilion103

    pavilion103

    Posts:
    3,293
    Likes Received:
    14
    Joined:
    Dec 14, 2010
    Thanks, I had a play around with that.
    I've got the ~NewHighNewLowIndex to show up under Groups --> Composites (253). In the screenshot below you can see that it comes up in the top window. The highlighted day shows -549 which coincides with the low of the market so it is obviously correct.

    My queston is: How is this made into an indicator (in bar or line format), which can be opened at the same time as other price charts?

    NewHighLow.png
     
  20. CanOz

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

    Posts:
    11,531
    Likes Received:
    486
    Joined:
    Jul 11, 2006
    Can anyone tell me how to enter ASX stock symbols into Amibroker while using Interactive Brokers data? Eg. WBS-ASX-STK??? obviously not as that doesn't work, but it should be something like that.

    Cheers,


    CanOz
     
Loading...

Share This Page