The last best-fit parabolic

Discussion in 'Technical Analysis' started by TSOKAKIS, Sep 3, 2004.

  1. sjaak1943

    sjaak1943

    Hello Dimitris,

    I'm glad i found you here!
    I love your parabolic trendline code.
    As for the Dutch ^AEX the parabolic trendline is there from 25-10-2004 with perc=3.
    The problem is, you miss a lot of points at the end, while still ascending. When I take perc=1 the parabolic is much shorter, but the candles are on the left side of the parabolic, so profitable.
    Is it possible to work with the peak en troughs, say from the last 40 bars or is changing to a lower perc a better option?
    Tia,

    Sjaak
     
    #61     Feb 13, 2005
  2. Sjaak,
    You may change perc = 3 ; by
    perc = Param ( "PERC" , 3 , 1 , 10 , 0.5 ) ;
    in order to calibrate the sensitivity.
    For example, ^AEX for perc=1 gave an exit signal on Feb9 2005, when the first candle was on the right side of the ascending parabolic. Note here that this technique gives premature exits and it is good for profit taking. The parabolic will never give the max possible profit in an [unknown] trend, but, it will protect your [sweet] profits from a sharp damage. The rest is a matter of choice of course...
     
    • aex.gif
      File size:
      5.7 KB
      Views:
      253
    #62     Feb 14, 2005
  3. sjaak1943

    sjaak1943


    Hi Dimitris,

    Thank you, that's exactly what I did, but I did not see the link between PERC and the time (length of the parabolic).
    The AEX is overbought now, so I'm waiting for a descending parabolic. Thank you,

    Sjaak
     
    #63     Feb 14, 2005
  4. There is no math relation between perc and time.
    But, if you use a small perc, say perc=1, then the peaks/troughs occur in shorter time intervals.
     
    #64     Feb 14, 2005
  5. For example, if you explore ^AEX for the n=1 last quotations with

    for ( perc = 1 ; perc <= 10 ; perc++ )

    {

    p = PeakBars ( H , perc ) == 0;
    AddColumn ( Cum ( p ) , WriteVal ( perc , 1.0 ) + " % " , 1.0 ) ;

    }

    Filter = 1;

    you will see how many peaks occurred from the beginning of your data for various perc values.
    Since they occurred in the same total time, you may have a rough idea about the peak frequency.
    As I see, from the beginning of 2003, there were 48 peaks [perc=1%] or 10 peaks [perc=5%].
    For perc=1% you have 1 peak every 11 bars, for perc=5% you have 1 peak every 54 bars [in average].
    This will give a rough estimation for the average duration of the parabolics. It will be also related to the timeframe of your trading. If your expectation has a 3-month horizon, then you should select the appropriate perc to have ~36 peaks in 3 years.
     
    #65     Feb 14, 2005
  6. Landry

    Landry

    Dimitris
    Amibroker flags this line as an error in the code you posted.
    Not sure what you meant there so I couldn't get it going.


    for(f=f1;f {
     
    #66     Feb 16, 2005
  7. Joe,
    there were some wrapping problems with ET text, please copy the code from http://finance.groups.yahoo.com/group/amibroker/message/69570
    and you will have no problems.
     
    #67     Feb 16, 2005
  8. will_jay

    will_jay

    Would it be acceptable to use the traditional Parabolic SAR indicator to just observe for similiar behavior and concept of the indcator in this thread. Just becuase I want to start looking into these types of 'parabolic indicators' and their applications, but want to avoid underatanding the coding for changing its parameters for now.

    thanks
     
    #68     Feb 16, 2005
  9. The concept of the parabolic SAR is a bit different.
    On the other side, the usual SAR parameters make it "slow".
    The best-fit parabolic is very fast and gives premature signals. It is good for partial profit taking. One will not enjoy the maximum profit of a prolonged trend [see the recent ^AEX example] but, he will protect the sweet profits from any undesirable damage.
     
    #69     Feb 17, 2005
  10. Hi ,
    I would like to ask what would happen to the parabolic when an unusual trade took place like the one as shown in the attachment.
    Would the parabolic adjust itself in the subsequent candles automatically? The upper chart is perc>20 and the bottom is perc<20.
    -- N!!
     
    #70     Feb 17, 2005