logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
underground  
#1 Posted : Monday, July 16, 2007 7:01:02 PM(UTC)
underground

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/23/2005(UTC)
Posts: 37

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

hayseed  
#2 Posted : Monday, July 16, 2007 7:08:41 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey underground..... by q and b indicators are you refering to something like these......h
underground  
#3 Posted : Monday, July 16, 2007 10:04:38 PM(UTC)
underground

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/23/2005(UTC)
Posts: 37

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

Jose  
#4 Posted : Monday, July 16, 2007 11:10:14 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
This handy Technical Analysis Library link recently posted at Traders' Consortium may be of some use here. jose '-)
wabbit  
#5 Posted : Tuesday, July 17, 2007 1:04:35 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
underground wrote:
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.aspxbr>

underground  
#6 Posted : Tuesday, July 17, 2007 4:11:13 PM(UTC)
underground

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/23/2005(UTC)
Posts: 37

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;


Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.