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;