[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re : Another way to answer to the MBB problem



PureBytes Links

Trading Reference Links

Dans un courrier daté du 04/10/98 18:17:56  , vous avez écrit :

<< 
 help me here pierre 'cause i think i'm confused.
 
 why can't you use mbb to set a stabilization threshold thus allowing
 the xaverages time to settle down? you state you can't, but why not?
 
 example: you determine that it takes 500 bars for "whatever momemtum
 thingy (wmt)" you have to stabilize. what happens if you set mb to 500
 bars? i'm thinking here in terms of "wmt" system testing and
 optimization.
 
 i guess i'm confused on the proper application of the mbb function.
 
 TJ
 
 dealin' with a mbb mental block >>

Here is the TS code of Xaverage.

No error in it but some drawback ( and advantages)


if Length + 1 <> 0 
then begin
	if CurrentBar <= 1 
	then begin
		Factor = 2 / (Length + 1);
		XAverage = Price;    <==========

{
This is the initialisation value (bar 1). Next bar the code will have to use
XAverage[1]. The estimate is obviously false because we are at bar 2.
The problems solves by itself after somz dozen of bars because XAverage[1]
becomes closer to the real value.
}
	end
	else  
		XAverage = Factor * Price + (1 - Factor) * XAverage[1];  <===========
{
The code nees only  the previous bar to calculate, therefore MBB=1.
In no case, the previous bars are involved.
Althougt you  could think that you use "Length" bars in the average, this is
untrue.
You use only the previous bar value, and the Length approximate is given by
the  formula:
Factor = 2 / (Length + 1);
This only allow to have a fake length value for comparison between the
Xaverage setting (expressed in terms of bars)  and  a classical average that
REALLY needs"Length" bars to calculate.
}

end;

=================

Sincerely,

Pierre Orphelin
www.sirtrade.com.