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

TechTrader With AmiBroker

Discussion in 'Software and Data' started by Peakey, Dec 14, 2006.

sentifi.com

Aussie Stock Forum Sentifi Top themes and market attention on:

  1. Peakey

    Peakey

    Posts:
    82
    Likes Received:
    0
    Joined:
    Nov 8, 2006
    Ok, i've got AmiBroker up and running, I'm currently using data from PremiumData. I'm using the following code:

    *********************************
    // techtrader v2 amibroker version
    // here we define buy conditions and name each one as a variable
    PositionSize = -10; // always invest only 10% of the current Equity
    cond1=Cross(H,Ref(HHV(H,10),-1)); // when todays high crosses last highest high over the last 10 periods
    cond2=H > EMA(C,40); // todays high is greater than the 40 day Exp MA of closes
    cond3=HHVBars(H,70) == 0; // todays high is the highest for 70 periods
    cond4=EMA(V*C,21) > 500000; // ensure at least $500k of money flow
    cond5=C < 10.00; // only trading in stocks less than $10
    cond6=C > O; // todays close higher than open

    // the following line is the trigger if all conditions satisfied
    Buy=cond1 AND cond2 AND cond3 AND cond4 AND cond5 AND cond6;

    // here we define variables used once in the trade
    ApplyStop( stopTypeLoss, stopModePercent, amount=10 );
    Sell= Cross(Ref(EMA(L,180),-1),C); // close crosses below yesterdays average of the low
    // here we define what gets displayed on the chart
    shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
    PlotShapes( shape, IIf( Buy , colorYellow, colorRed ), 0, IIf( Buy , Low, High));

    Filter = Buy; // lists exploration results conforming to our buy criteria
    AddColumn(Buy, "buy", 1.0); //
    ***********************************

    Did a scan of EOD for 14/12/2006 across the entire ALL Ords and got back the following:

    **************************
    ABS Buy 14/12/2006 $8.620
    AED Buy 14/12/2006 $4.290
    AOE Buy 14/12/2006 $1.220
    AUB Buy 14/12/2006 $4.350
    AXA Buy 14/12/2006 $7.000
    DMX Buy 14/12/2006 $0.890
    FKP Buy 14/12/2006 $6.400
    GUD Buy 14/12/2006 $8.520
    JHX Buy 14/12/2006 $8.990
    MCC Buy 14/12/2006 $5.200
    MGW Buy 14/12/2006 $3.400
    MND Buy 14/12/2006 $8.640
    ORG Buy 14/12/2006 $7.900
    RMI Buy 14/12/2006 $0.055
    SDG Buy 14/12/2006 $3.310
    SGL Buy 14/12/2006 $0.420
    TLS Buy 14/12/2006 $4.060
    **************************


    I want to ensure my setup is correct, so I was just wondering if someone could run a scan so that I can compare results.

    Thanks
    Peakey
     
  2. danno75

    danno75

    Posts:
    35
    Likes Received:
    0
    Joined:
    Jan 5, 2008
    Even though it is a long time between drinks on this one I am using this same formula to try and teach myself a bit about how Amibroker works, I thought I read somewhere else that Tech A is not allowed to talk about this system or something because it has been deemed as giving advice but I'll try anyway.
    I have found some other basic formuals on the Amibroker Finance Yahoo group and in this forum but from what I have read TechTrader worked at some stage during a decent uptrend and should be a valuable teaching tool for the basics of how a trading system could work. At the moment the market seems to be consolidating and as such Techtrader probably wont work too well so I cant see any ereason for a discussion on it to be a big deal.

    Anyway I am not trying to find the holy grail just some Amibroker education while I wait for Howard Brandy and crew to return to the States so they can start sending out "Intro to Amibroker" again. My current question is this; I have run TechTrader V2 for Amibroker and I get a list of buys and sell in the scan and backtest but I dont seem to get any arrows showing up on the individual charts. Is there something wrong with the way the formula is written when it has been converted from Metastock language?
     
  3. nomore4s

    nomore4s Commonsense isn't that common

    Posts:
    3,562
    Likes Received:
    0
    Joined:
    Jan 11, 2007
    Danno,

    You should get arrows with that code but when you run a scan click on the stock that comes up in the scan this will bring the stock up on your charts with the buy & sell arrows on it - or at least it should.
     
  4. danno75

    danno75

    Posts:
    35
    Likes Received:
    0
    Joined:
    Jan 5, 2008
    Thanks for the reply Nomore4s, I have been getting sell arrows (pointing down) and have been able to change the colour to prove I am getting something right but I dont get and buy arrows (pointing up). My sell arrows are on the company equity indicator graph, is this where they should be? I just straight cut and paste the formula off Peakeys post at the top of this thread. Does that normally work? I would have thought that the buy/sell arrows would be on the price chart rather than on the other indicators.

    I tried to copy the AFL again and got the same result...maybe I will just have to wait until I can get a copy of Intro to Amibroker...:banghead:

    I was going to get Nick Rdges book about the Aussie market also, it seems to get a good review or two on this forum

    Cheers
    Danno
     
  5. danno75

    danno75

    Posts:
    35
    Likes Received:
    0
    Joined:
    Jan 5, 2008
    Last night I partially solved my problem of not being able to see the buy and sell arrows. I was testing some AFL's from the Amibroker Knowledge base and one of them but a new indicator graph below the current indicators on my first tab (below the portfolio equity indicator) which showed the buy and sell signals. I am not sure why Tech Trader didn't do this but now the indicator stays there no matter what formula I use which is a bonus...now if I only knew why this happened and which part of the formula produced the new indicator I would be a step ahead.:D

    Anyway its one more move in the right direction
     
  6. nomore4s

    nomore4s Commonsense isn't that common

    Posts:
    3,562
    Likes Received:
    0
    Joined:
    Jan 11, 2007
    Danno,

    When I get home I will post up the code I use to run TT in amibroker and post up a chart with the buy/sell signals on it to give you an idea of what it looks like.
     
  7. nomore4s

    nomore4s Commonsense isn't that common

    Posts:
    3,562
    Likes Received:
    0
    Joined:
    Jan 11, 2007
    Here you go.

     

    Attached Files:

  8. danno75

    danno75

    Posts:
    35
    Likes Received:
    0
    Joined:
    Jan 5, 2008
    Thanks for that Nomore4's I will give it a go this evening after work

    Danno
     
  9. nomore4s

    nomore4s Commonsense isn't that common

    Posts:
    3,562
    Likes Received:
    0
    Joined:
    Jan 11, 2007
    No worries, the scan I ran was from the 1/10/09 to 30/10/09 over the All Ordinaries and AAX was the first stock on the list, let me know how you go.
     
  10. danno75

    danno75

    Posts:
    35
    Likes Received:
    0
    Joined:
    Jan 5, 2008
    NM4's,
    I copied Tech Trader straight from your post but the first I got was AAD, also I can't get the buy sell arrows to show on my primary chart. They will only appear on the lower indicator that consists of an advanced MA AFL that I was playing around with last night. I don't actually know how it managed to appear but it stays on whenever I shutdown and restart. I am not sure how to attach a screen print of Amibroker other wise I would show you. My second listing was the same as yours AAX but had an extra sell (27/4) and an extra buy (02/06) so I'm not sure what that is all about.
     
Loading...

Share This Page