in Search

Open Source Libary

Last post 07-17-2007, 16:11 by underground. 5 replies.
Sort Posts: Previous Next
  •  07-16-2007, 19:01 24713

    Open Source Libary

    Does any one have a link or know of a library of open source code of financial formulas? The reason for this is it might be easier to check and see if they already exist instead of creating them from the ground up. The one’s I’m looking for are as follow’s.

     

    Q Indicator

    B Indicator

     

    ADX

     

    OBV True Range Short-Term

    OBV True Range Intermediate-Term

    OBV True Range Long-Term

     

    Thanks for your help

  •  07-16-2007, 19:08 24714 in reply to 24713

    Re: Open Source Libary

    hey underground..... by q and b indicators are you refering to something like these......h
  •  07-16-2007, 22:04 24715 in reply to 24714

    Re: Open Source Libary

    Thanks Hayseed - I have the easy language formula's thanks but I wanted to code them into a dll with PowerBasic so that I can create a few ideas which are not limited to the MS formula builder

  •  07-16-2007, 23:10 24716 in reply to 24715

    Re: Open Source Libary

    This handy Technical Analysis Library link recently posted at Traders' Consortium may be of some use here.


    jose '-)
    MetaStockTools.com
  •  07-17-2007, 1:04 24717 in reply to 24713

    Re: Open Source Libary

    underground:
    Q Indicator
    B Indicator


    You have to watch out for these two indicators as some ago they were published and some of those published codes contained errors.  Roy Larsen corrected these errors and made the results available in his newsletter; some time later, some of the web-codes were corrected, but some remain unchanged.

    See : http://forum.equis.com/forums/thread/7614.aspx for more discussion on this topic.

    Some time later again, Roy published a new variant of these indicators that worked without the PREV command which improved the performance of the functions.  See these codes : http://forum.equis.com/forums/thread/13630.aspx for some more enlightenment on these functions.


    Hope this helps.

    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

  •  07-17-2007, 16:11 24728 in reply to 24717

    Re: Open Source Libary

    Wabbit - I see within your reply post, you reference a tread about the updated Q and B indicator - I found the dll and updated easy language code - what a difference from what I have been using, I'm going to have to test the two over a period of time and compare the results. The one's using the dll plot lower values then the one's I have been using.

    I have been using the following Q and B indicators:

    m:=Input("% Scalar trend periods",1,25,4);
    n:=Input("% Scaler noise",1,500,250);
    cf:=Input("% Scalar correction factor",1,250,1);
    p1:=Input("First moving average periods",1,200,7);
    p2:=Input("Second moving average periods",1,200,15);
    pds:=Mov(C,p1,E)>Mov(C,p2,E);
    pds:=pds<>ValueWhen(2,1,pds);
    dc:=ROC(C,1,$);
    init:=Cum(pds>-1)=1;
    cdc:=Cum(dc);
    cpc:=cdc-ValueWhen(1,init+pds,cdc);
    trend:=If(pds,0,(cpc*(1/m))+(PREV*(1-(1/m))));
    trend:=If(Sum(trend,2)=Sum(trend,2),trend,trend); {add an invalid bar}
    dt:=cpc-trend;
    noise:=Sqrt(Mov(dt*dt,n,E));
    (trend/noise)*cf;

    B Indicator

    m:=Input("% Scalar trend periods",1,25,4);
    n:=Input("% Scaler noise",1,500,250);
    cf:=Input("% Scalar correction factor",0.1,20,1);
    p1:=Input("First moving average periods",1,200,7);
    p2:=Input("Second moving average periods",1,200,15);
    rev:=Mov(C,p1,E)-Mov(C,p2,E);
    pds:=If(rev>0,1,-1);
    dc:=ROC(C,1,$);
    cpc:=If(pds<>Ref(pds,-1),0,dc+PREV);
    trend:=If(pds<>Ref(pds,-1),0,(cpc*(1/m))+(PREV*(1-(1/m))));
    dt:=cpc-trend;
    noise:=Sqrt(Mov(dt*dt,n,E));
    ((Abs(trend)/(Abs(trend)+noise)))*100*cf;

    Comparing them to these two:

    {B Indicator NP} {Trend-Noise Balance}
    m:=Input("% Scalar trend period",2,25,4);
    n:=Input("% Scalar noise period",2,500,250);
    cf:=Input("% Scalar correction factor",1,250,2);
    p1:=Input("First moving average periods",1,200,7);
    p2:=Input("Second moving average periods",1,200,15);
    pds:=Mov(C,p1,E)>Mov(C,p2,E);
    pds:=pds<>ValueWhen(2,1,pds);
    dc:=ROC(C,1,$);
    init:=Cum(pds>-1)=1;
    cdc:=Cum(dc);
    cpc:=cdc-ValueWhen(1,init+pds,cdc);
    trend:=ExtFml("Forum.MOV",cpc,If(pds,1,2*m-1),E);
    trend:=If(Sum(trend,2)=Sum(trend,2),trend,trend); {adds an invalid bar}
    dt:=cpc-trend;
    {n:=LastValue(Min(Cum(1)-2*p2,n));} {adjusts "n" if not enough bars are loaded}
    noise:=cf*Sqrt(Mov(dt*dt,n,S));
    noise:=If(Abs(trend)+Abs(noise)=0,1,Abs(trend)+Abs(noise));
    100*Abs(trend)/noise;

    {Q Indicator NP} {Trend Quality}
    m:=Input("% Scalar trend period",2,25,4);
    n:=Input("% Scalar noise period",2,500,250);
    cf:=Input("% Scalar correction factor",1,250,2);
    p1:=Input("First moving average periods",1,200,7);
    p2:=Input("Second moving average periods",1,200,15);
    pds:=Mov(C,p1,E)>Mov(C,p2,E);
    pds:=pds<>ValueWhen(2,1,pds);
    dc:=ROC(C,1,$);
    init:=Cum(pds>-1)=1;
    cdc:=Cum(dc);
    cpc:=cdc-ValueWhen(1,init+pds,cdc);
    trend:=ExtFml("Forum.MOV",cpc,If(pds,1,2*m-1),E);
    trend:=If(Sum(trend,2)=Sum(trend,2),trend,trend); {adds an invalid bar}
    dt:=cpc-trend;
    {n:=LastValue(Min(Cum(1)-2*p2,n));} {adjusts "n" if not enough bars are loaded}
    noise:=cf*Sqrt(Mov(dt*dt,n,S));
    trend/noise;


     

     

View as RSS news feed in XML