in Search

REFERENCE IN EXPLORER QUESTION FOR DOP

Last post 05-07-2008, 12:22 by wdgigi. 7 replies.
Sort Posts: Previous Next
  •  04-30-2008, 5:37 27077

    REFERENCE IN EXPLORER QUESTION FOR DOP

    Goodmorning,

    i would write an explorer code that says to me how many days are departed from the last peak low of  Dop() indicator. So i can see the stocks that are in buy zone of  hurst's cycle.

    I know what in manual is written about reference in explorer, but have you some idea to resolve the problem?

     

    Thanks.

     

    gigi

  •  04-30-2008, 20:49 27085 in reply to 27077

    Re: REFERENCE IN EXPLORER QUESTION FOR DOP

    Hi gigi,

    I assume for dop, you are actually referring to the Detrended Price Oscillator (DPO() function)?

    The first thing you have to do is define the "last peak low".  You could do something like:

    Code:

    ind := dpo(25);
    level := -0.3;
    lastPeakLow:=ind < level;


    or maybe:
    Code:

    ind := dpo(25);
    lastPeakLow:= ind > ref(ind,-1) and ref(ind,-1) < ref(ind,-2);


    and then use the BarsSince() function to find the time periods (in bars) elapsed since the condition was true.  How you define it is up to you.


    Hope this helps.

    wabbit Big Smile [:D]

    P.S. Another way might be to use the Trough() function and/or TroughBars() function, but you must be accutely aware of how these functions work before attempting to use it in trading system; if you do not know how these functions work, do not use them.


    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status : wabbit.com.au SkyPE online status
    My SkyPE account : wabbit.com.au

  •  05-01-2008, 6:32 27090 in reply to 27085

    Re: REFERENCE IN EXPLORER QUESTION FOR DOP

    I've put the code that you have written in idicator builder and then i've used the BarsSince() function in Explorer but there was not selected any stock.

    Where have i was wrong?

     

    thx.

     

    gigi

  •  05-01-2008, 6:40 27091 in reply to 27090

    Re: REFERENCE IN EXPLORER QUESTION FOR DOP

    Please post all of the code for the exploration.

    Please indicate which code is in which column, if you have used multiple columns.


    wabbit Big Smile [:D]


    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status : wabbit.com.au SkyPE online status
    My SkyPE account : wabbit.com.au

  •  05-01-2008, 7:05 27092 in reply to 27091

    Re: REFERENCE IN EXPLORER QUESTION FOR DOP

    In Explorer:

    Col A:   BarsSince(  FmlVar("Hurst Indicator","LASTPEAKLOW") )

    result: N/A

    In Indicator Builder:

    ind := DPO(42);
    level := -0.3;
    lastPeakLow:=ind < level;

    thanks.

     

    gigi

  •  05-01-2008, 9:35 27097 in reply to 27092

    Re: REFERENCE IN EXPLORER QUESTION FOR DOP

    In the explorer options, uncheck the "load minimum records" and load about 200 bars of data.


    wabbit Big Smile [:D]

    P.S. You know that dpo() uses and left shifted moving average, so at the right hand edge of the chart there are N/A bars, don't you?

    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status : wabbit.com.au SkyPE online status
    My SkyPE account : wabbit.com.au

  •  05-02-2008, 1:02 27108 in reply to 27097

    Re: REFERENCE IN EXPLORER QUESTION FOR DOP

    Right now!

    You have turned the light! In colB i've written:  (i use the 42 span and 22 half span)

    Ref(BarsSince(  FmlVar("Hurst Indicator","LASTPEAKLOW") ),-22)+22 ;

    so i have the days from today and last peak low.

    Now i modify the DPO() with this:

    SPAN:=Input("SPAN",1,70,42);

    CLOSE-Ref( Mov(CLOSE, SPAN, SIMPLE),(SPAN/2+1));

    and then i must transform this code in percet from point so i can explorer evey stock.

    THIS IS THE CODE:

    SPAN:=Input("SPAN",1,70,42);

    (CLOSE-Ref( Mov(CLOSE, SPAN, SIMPLE),(SPAN/2+1)))*100/CLOSE

    THX

     

    gigi

     

  •  05-07-2008, 12:22 27140 in reply to 27108

    Re: REFERENCE IN EXPLORER QUESTION FOR DOP

    The first footstep is made. Now the part most difficult. 
    It would need to find the distance between the last low and the low precedent and to use this distance as value for the dpo. 
     Better between the last low and the precedent. From this to that preceding anchor, to make an average to use as value for the dpo. 
    Then in explorer making the scan of the stocks that  are distant (in days) from the value dpo. 
    In this way we should find the stocks that are near to cyclical low.

    Some ideas?

     

    gigi

View as RSS news feed in XML