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

[amibroker] Re: ATTENTION, new virus is spreading fast



PureBytes Links

Trading Reference Links

Jayson,
The maximum divergence of DEMA(20) is MaxDiv1=1.11%
The maximum divergence of TEMA(20) is MaxDiv2=1.61%
Let x=5 and let the Ti3(5) is used from the Ti3 smoothers group.
Let the maximum divergence of Ti(5) be MaxDiv3.
Ti3(5) is a function of the coefficient s.
The range of the parameter s that would give a MaxDiv3 between 
MaxDiv1 and MaxDiv2 is
s=0.77 to s=0.87
The respective MaxDiv3 is
1.12% to 1.59%.
As you see, the MaxDiv3 is in the range of [MaxDiv1,MaxDiv2].
I try to limit the variance of the parameter s in order to avoid 
significant changes for the shape of the Ti3 [higher s values may 
cause strong oscillations and see the Ti3 exceeding the actual price 
significantly]
When we use the above described s values, the shape of the final Ti3 
will be similar to DEMA/TEMA and the use of Ti3 will be closer to 
reality.
Dimitris Tsokakis
PS:Would it be better, perhaps, to see in the title only the limits 
s=0.77 to s=0.87 ?
--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> Dimitris,
> 
> Some interesting work. . I must admit I have no idea what it is 
telling
> us....You show the setting for s on Ti3(5) to be .77 =1.12% and s 
for Ti3(5)
> set to .78 =1.16. This relates to your findings of Divergence for
> dema(20)=1.11% and Tema(20)= 1.61%. Are you telling us that Ti3(5) 
with
> s=.77 is roughly equivalent to a dema(20)?? I am assuming that you 
seek the
> least amount of divergence so are you proving that dema(20) 
produces less
> divergence than a ti3(20). Given the information your study has 
found how
> would you put it into practice?
> 
> I am sure I am probably missing an obvious point, and equally sure 
I am not
> alone :)
> 
> Regards,
> Jayson
> -----Original Message-----
> From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...]
> Sent: Thursday, March 04, 2004 8:24 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: A Ti3 crash test[2]
> 
> 
> We suppose again the price move from 100 to 110 in one day.
> The DEMA/TEMA averages will exceed the final price by 
MaxDiv1/MaxDiv2
> respectively.
> The question is to find the range of parameter s which will cause to
> Ti3 smoother a MaxDiv3 with
> 
> MaxDiv1<= MaxDiv3 <=MaxDiv2
> 
> The following IB code will find
> 
> // The parameter s limitations
> L1=LastValue(Cum(1));D=100;DD=110;
> C0=IIf(Cum(1)<L1-D,D,DD);
> Plot(C0,"\nCLOSE",1,8);
> PERIOD=20;z=WriteVal(period,1.0);
> S1=DEMA(C0,PERIOD);
> S2=TEMA(C0,PERIOD);
> Div1=100*(s1-C0)/LastValue(C0);MaxDiv1=LastValue(Highest(Div1));
> Div2=100*(s2-C0)/LastValue(C0);MaxDiv2=LastValue(Highest(Div2));
> Plot(S1,"\nDEMA",colorRed,1);
> Plot(S2,"\nTEMA",colorBrightGreen,1);
> Title="Maximum Divergence for \nDEMA("+z+") ="+WriteVal(MaxDiv1,1.2)
> +"%"+"\nTEMA("+z+")="+WriteVal(Maxdiv2,1.2)+"%";
> function T3(price,periods,s)//According to Jayson message 59811
> {
> e1=EMA(price,periods);
> e2=EMA(e1,Periods);
> e3=EMA(e2,Periods);
> e4=EMA(e3,Periods);
> e5=EMA(e4,Periods);
> e6=EMA(e5,Periods);
> c1=-s*s*s;
> c2=3*s*s+3*s*s*s;
> c3=-6*s*s-3*s-3*s*s*s;
> c4=1+3*s+s*s*s+3*s*s;
> Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
> return ti3;
> }
> X=Param("X",5,3,20,1);
> for(s=0.7;s<1;s=s+0.01)
> {
> Ti3=T3(C0,X,s);
> Div3=100*(Ti3-C0)/LastValue(C0);MaxDiv3=LastValue(Highest(Div3));
> if(MaxDiv3>=MaxDiv1 AND MaxDiv3<=MaxDiv2)
> {
> Plot(Ti3,"\nT3",colorBlue,1);
> Title=Title+"\nTi3("+WriteVal(x,1.0)+") [s="+WriteVal(s,1.2)+"]
> ="+WriteVal(maxDiv3,1.2)+"%";
> }
> }
> 
> EXAMPLE
> For Ti3(10) s should be in the range [0.70-0.79]
> For Ti3(5) s should be in [0.77-0.87]
> 
> s values above this range will cause significant perturbation of the
> Ti3 smoother and will introduce probable oscillation.
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
<TSOKAKIS@xxxx>
> wrote:
> > Let us suppose a stock goes from 100 to 110 in one day.
> > We shall examine the response of DEMA, TEMA and Ti3 averages.
> > These smoothers catch the new price in some days, then go higher
> and
> > find again [asymptotically] the final price.
> > For a given DEMA/TEMA period we may calibrate the Ti3 period to
> > obtain the same Maximum Divergence from the final price.
> > EXAMPLE
> > For DEMA/TEMA period=20, we need Ti3 periods  x=4 and x=7
> > respectively to avoid exceeding the DEMA/TEMA MaxDiv.
> >
> > // Ti3 crash test and Maximum Divergence, by D. Tsokakis, March 
2004
> > function T3(price,periods)//According to Jayson´s message 59811
> > {
> > s = 0.83;
> > e1=EMA(price,periods);
> > e2=EMA(e1,Periods);
> > e3=EMA(e2,Periods);
> > e4=EMA(e3,Periods);
> > e5=EMA(e4,Periods);
> > e6=EMA(e5,Periods);
> > c1=-s*s*s;
> > c2=3*s*s+3*s*s*s;
> > c3=-6*s*s-3*s-3*s*s*s;
> > c4=1+3*s+s*s*s+3*s*s;
> > Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
> > return ti3;
> > }
> > L1=LastValue(Cum(1));D=100;DD=110;
> > C1=IIf(Cum(1)<L1-D,D,DD);
> > Plot(C1,"\nCLOSE",1,8);
> > PERIOD=20;
> > S1=DEMA(C1,PERIOD);
> > S2=TEMA(C1,PERIOD);
> > X=Param("X",3,3,20,1);
> > Ti3=T3(C1,X);
> > //The maximum divergence
> > Div1=100*(s1-C1)/LastValue(C1);MaxDiv1=LastValue(Highest(Div1));
> > Div2=100*(s2-C1)/LastValue(C1);MaxDiv2=LastValue(Highest(Div2));
> > Div3=100*(Ti3-C1)/LastValue(C1);MaxDiv3=LastValue(Highest(Div3));
> > Plot(S1,"\nDEMA",colorRed,1);
> > Plot(S2,"\nTEMA",colorBrightGreen,1);
> > Plot(Ti3,"\nT3",colorBlue,1);
> > z=WriteVal(period,1.0);
> > Title="Maximum Divergence for \nDEMA("+z+") ="+WriteVal
(MaxDiv1,1.2)
> > +"%"+"\nTEMA("+z+")="+WriteVal(Maxdiv2,1.2)+"%"+"\n     Ti3
> ("+WriteVal
> > (x,1.0)+")="+WriteVal(maxDiv3,1.2)+"%";
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
> 
> 
> --------------------------------------------------------------------
--------
> ----
> Yahoo! Groups Links
> 
>   a.. To visit your group on the web, go to:
>   http://groups.yahoo.com/group/amibroker/
> 
>   b.. To unsubscribe from this group, send an email to:
>   amibroker-unsubscribe@xxxxxxxxxxxxxxx
> 
>   c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/