AHG - Profitable Strategy for Struggling Traders

Discussion in 'Journals' started by Anekdoten, Jul 19, 2007.

Thread Status:
Not open for further replies.
  1. Charly

    Charly

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    JD

    1-2-3-pivot?? Please help
    Code + eld available please?

    Thanks
    Charly
     
    #4231     Nov 25, 2007
  2. mark1

    mark1 Guest

    For those using Amibroker I coded the n bar reversal, posted by Anek.
    You can select in the parameters dialog window, the number of bars to calculate for the reversal from 2 to 50.
    You can also select the value(close, high, low etc,) to calculate the reversal up and reversal down

    for "advanced" users
    You can also choose to show bars painted or arrows for the signal, you need to uncomment the code that's commented now and comment the code for the arrows.


    here is the code in txt


    P = ParamField( "Price field Reversal UP",field = 1 );
    P2 = ParamField( "Price field Reversal DOWN", field = 2 );
    n= Param("No. of Bars",3,2,50,1);
    TrendUp = P > Ref(HHV(H,n),-1);
    TrendDn = P2 < Ref(LLV(L,n),-1);
    /*TrendUp = ExRem(TrendUp,TrendDn);
    TrendDn = ExRem(TrendDn,TrendUp);
    PlotShapes(TrendUp*shapeUpArrow,colorGreen);
    PlotShapes(TrendDn*shapeDownArrow,colorRed);*/
    Plot(C,"Close",IIf(TrendUp, colorGreen, IIf(TrendDn,colorRed,colorBlack)),styleCandle);





    attached you'll find the AFL code, enjoy
     
    #4232     Nov 25, 2007
  3. mark1

    mark1 Guest

    this is how it looks on a 1 min chart
     
    #4233     Nov 25, 2007
  4. mark1

    mark1 Guest

    keep in mind I never used Ensign code, anyway

    I can see you have merged anek painted bars with your interpretation of 123 pivot.... duh!!!! i can see that on your chart as well :p .

    Ok now focusing on the 123 pivot , this should be the plain English version of your code:

    Paint the previous candle blue if : the LOW of 1 bar ago is lower than the LOW of 2 bars ago AND the LOW of 2 bars ago is lower than the LOW of 3 bars ago AND the low of 1 bar ago is lower than the current bar AND the HIGH of 1 bar ago bar is lower than the HIGH of the current bar.

    reverse for the yellow bar

    Ok so basically the blue bar (or yellow) is painted blue only when the next bar confirms an higher HIGH than the "possible" blue bar, so you actually need another bar to confirm the yellow/blue.

    Heh ok it works just like my code, only I was more strict and wanted to see Lower Highs in the same bar along with lower lows, you just use lower lows.

    Maaaaan, I thought you had found the HOLLLLYYYGRAAAAILLL! mmbhuuahaha :D

    First time you code? great job dude!

    I'll post later my rules so you can try the difference, I have less signals obviously
     
    #4234     Nov 25, 2007
  5. mark1

    mark1 Guest

    BlueCandleBuy=H>Ref(H,-1) AND Ref(H,-1)> Ref(H,-2) AND Ref(L,-1)> Ref(L,-2) AND Ref(L,-2)< Ref(L,-3)AND Ref(H,-2)<Ref(H,-3)


    Reverse for yellow candle

    these are my rules at the moment (i'm always tweaking...lol)

    Ref(H, -1) means the previous bar High, the rest should be self explainatory

    whait a sec the code is not complete ,ill attach a txt file
     
    #4235     Nov 25, 2007
  6. mark1

    mark1 Guest

    here's the complete code


    edit: jesus what a mess, sorry.

    this code actually signals the bar where you should enter , after the pivot candle is confirmed not the pivot candle itself...man I need some rest
     
    #4236     Nov 25, 2007
  7. Hi mark1,
    thanks for your help with amibroker code, as I am very inexperienced “coder” with amibroker.
    That code looks interesting. I am now experimenting also with High vs Close 3 bars reversal. Looks
    like may work on 5 minute charts also... Please keep coding and posting so we can all keep tweaking together :)
     
    #4237     Nov 25, 2007
  8. mark1

    mark1 Guest

    You are welcome Ronald, thanks to Anek for showing us the code
     
    #4238     Nov 25, 2007
  9. Il mio piacere
     
    #4239     Nov 25, 2007
  10. mark1

    mark1 Guest

    :D :cool:
     
    #4240     Nov 25, 2007
Thread Status:
Not open for further replies.