|
|
Trend Quality Indicator aka (B-Q) Indicator
Last post 01-18-2006, 1:56 by kingsley29. 12 replies.
-
09-11-2005, 2:20 |
-
09-11-2005, 2:30 |
-
StorkBite
-
-
-
Joined on 03-19-2005
-
-
Posts 3,108
-
-
|
Re: Trend Quality Indicator aka (B-Q) Indicator
Hey UG-
Avail: http://www.equis.com/Customer/Resources/TASC/Article.aspx?c=3&p=&Id=61
Trend Quality Indicator
David Sepiashvili's article "Trend Quality Indicator" introduces two new indicators; Q-indicator and B-indictor. Both can be added to MetaStock with the formulas listed below.
To enter this indicator into MetaStock:
In the Tools menu, select Indicator Builder.
Click New to open the Indicator Editor for a new indicator.
Type the name of the formula.
Click in the larger window and type in the formula.
Name: Q-indicator
m:=Input("% Scalar trend period",1,25,4);
n:=Input("% Scalar noise period",1,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);
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*pds)+PREV);
trend:=If(pds<>Ref(pds,-1),0,(cpc*(1/m))+(PREV*(1-(1/m))));
dt:=cpc-trend;
noise:=cf*Sqrt(Mov(dt*dt,n,S));
trend/noise
Name: B-indicator
m:=Input("% Scalar trend period",1,25,4);
n:=Input("% Scalar noise period",1,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);
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*pds)+PREV);
trend:=If(pds<>Ref(pds,-1),0,(cpc*(1/m))+(PREV*(1-(1/m))));
dt:=cpc-trend;
noise:=cf*Sqrt(Mov(dt*dt,n,S));
temp:=If(Abs(trend)+Abs(noise)=0,1,Abs(trend)+Abs(noise));
(Abs(trend)/temp)*100;
Traders' Consortium
|
|
-
09-11-2005, 3:24 |
-
wabbit
-
-

-
Joined on 10-29-2004
-
Perth, Western Australia
-
Posts 1,637
-
-
|
Re: Trend Quality Indicator aka (B-Q) Indicator
In the October 2004 and subsequent issues of MetaStock Tips and Tricks Roy Larsen points out the code as posted on the Equis website has an error, and hence just about every site on the net that has copied the code is also erroneous, including the code as posted on this forum, above.
I am not sure whether Roy is willing to share the correct code. You might want to ask him nicely.
I have the correct code by the fact I am a subscriber to his excellent monthly newsletter, but am not at the liberty to share this information due to the complexities of copyright law.
I suggest you use the code above with caution.
Sorry, I cannot help further.
wabbit :D
P.S. See Roy's site at: http://www.metastocktips.co.nz/index.html
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 :  My SkyPE account : wabbit.com.au
|
|
-
09-11-2005, 4:29 |
-
StorkBite
-
-
-
Joined on 03-19-2005
-
-
Posts 3,108
-
-
|
Re: Trend Quality Indicator aka (B-Q) Indicator
Oops... guess that's why it wasn't in our formula collection (and isn't any longer). Thanks for shedding light on that near miss, Wabbit! :wink:
Traders' Consortium
|
|
-
09-11-2005, 16:16 |
-
underground
-
-
-
Joined on 03-24-2005
-
-
Posts 24
-
-
|
Re: Trend Quality Indicator aka (B-Q) Indicator
Thanks guys - I already have Roy's Newsletter its worth ever penny - Thus I have the B and Q indicator but not the BQ-Indicator. Maybe I will have it inthe future.
|
|
-
09-12-2005, 1:25 |
-
Jose
-
-

-
Joined on 01-20-2005
-
Koh Pha-Ngan, Earth
-
Posts 1,087
-
-
|
Has anyone tried the BBQ indicator?
The problem as I see it, is that the BBQ could grill one's CPU with its high count of PREV functions:
Code:
=============
BBQ indicator
=============
---8<---------------
{ Try at own risk! }
{ With thanks to Henry for PREV() inspiration }
x:=If(C>Ref(C,-1),C,PREV);
{ Plot on price chart, and wait... }
If(x>Ref(x,-1),PREV,
If(x>Ref(x,-2),PREV,
If(x>Ref(x,-3),PREV,
If(x>Ref(x,-4),PREV,
If(x>Ref(x,-5),PREV,
If(x>Ref(x,-6),PREV,
If(x>Ref(x,-7),PREV,
If(x>Ref(x,-8),PREV,
If(x>Ref(x,-9),PREV,
If(x>Ref(x,-10),PREV,
If(x>Ref(x,-11),PREV,
If(x>Ref(x,-12),PREV,
If(x>Ref(x,-13),PREV,
If(x>Ref(x,-14),PREV,
If(x>Ref(x,-15),PREV,
x)))))))))))))));
---8<---------------
jose '-)
MetaStockTools.com
|
|
-
09-12-2005, 3:16 |
-
09-12-2005, 3:32 |
-
Jose
-
-

-
Joined on 01-20-2005
-
Koh Pha-Ngan, Earth
-
Posts 1,087
-
-
|
Huh? You really think the BBQ indicator is silly, Patrick? :shock:
What about all those other PREV-based formulae being posted elsewhere by the dozen - are they really that useful? :wink:
Anyway, I've tried running the BBQ (barbecue for non-English speakers) on my older PC, and it is now a heap of molten plastic & metal. Perhaps next time I'll try and run an exploration based on the BBQ - let's see what happens then.
jose '-)
MetaStockTools.com
|
|
-
09-12-2005, 3:37 |
-
09-12-2005, 14:33 |
-
wabbit
-
-

-
Joined on 10-29-2004
-
Perth, Western Australia
-
Posts 1,637
-
-
|
Underground....
As
http://www.equis.com/Customer/Resources/TASC/Article.aspx?c=3&p=&Id=61: David Sepiashvili's article "Trend Quality Indicator" introduces two new indicators; Q-indicator and B-indictor. Both can be added to MetaStock with the formulas listed below
with the formulas extracted from the April 2004 TASC and
http://www.alticom.com/finance/rr-tbi/index.html: BQ Indicator
Code: The Trend-Noise Balance Indicator (BQ-Indicator) relates trend to noise in a banded oscillator format. If the Q-Indicator fluctuates around a zero line with no upper or lower limits, BQ-Indicator is bounded with (+1) and (-1) levels. Its zero line suggests that the trend and noise are in equilibrium (trend is equal to noise). In the range of the indicator values from (-0.5) to (+0.5) the trend is buried under the noise, and it is an indication of a non-trending phase. The readings below (-0.8) or above (+0.8) levels can be interpreted as strong downward or upward trending benchmarks, correspondingly. An advantage of the BQ-Indicator over the Q-Indicator is that it better identifies overbought and oversold conditions.
More information about both indicators and their implementation for various trading platforms you can find in the article “The Trend-Quality Indicator (Q-Indicator)” by David Sepiashvili, published in Technical Analysis of Stocks & Commodities, April 2004.
was published by the same person in the same issue, I would strongly suggest the B and Q indicators as provided in the Oct 2004 MSTT are the codes you are looking for.
But then again....
wabbit :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 :  My SkyPE account : wabbit.com.au
|
|
-
01-11-2006, 13:46 |
-
wabbit
-
-

-
Joined on 10-29-2004
-
Perth, Western Australia
-
Posts 1,637
-
-
|
Reading again the definition from alticom.com about the BQ-indicator, I get the sense (now) that it is just a pseudo-normalised Q-indicator?? BQ could stand for Bounded Q-Indicator?
If this is the case, then using Roy's latest PREV free indicator, and normalising the output (using one of the many possible ways, but without hindsight) I end up with something like:
{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));
x:=trend/noise;
bq:=2*(x-Lowest(x))/(Highest(x)-Lowest(x)+0.0001)-1;
l1:=0.8;
l2:=0.5;
0; {colour me blue}
l1;l2; {colour us light gray}
-l1;-l2; {colour us light gray}
bq; {colour me red}
Maybe this is what the original discussion was about???? :wacko:
wabbit :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 :  My SkyPE account : wabbit.com.au
|
|
-
01-11-2006, 16:19 |
-
|
|