PureBytes Links
Trading Reference Links
|
Pretty
grumpy there, Fred!
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>d
<FONT
face=Tahoma size=2>-----Original Message-----From: Fred
[mailto:fctonetti@xxxxxxxxx] Sent: Saturday, April 19, 2003 11:14
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re:
Fw: Smoothing FactorsUrgent ? The only thing
URGENT is your apparent need to find work arounds.--- In
amibroker@xxxxxxxxxxxxxxx, "Dimitris Tsokakis" <TSOKAKIS@xxxx>
wrote:> Here is some applications.> > /*Analytic RSI
of an Array with fixed period*/> t=14;// fixed period> Var=C;//
variable array>
Up=IIf(Var>Ref(Var,-1),abs(Var-Ref(Var,-1)),0);>
Dn=IIf(Var<Ref(Var,-1),abs(Var-Ref(Var,-1)),0);>
Ut=Wilders(Up,t);Dt=Wilders(Dn,t);> RSIvar=100*(Ut/(Ut+Dt));// the RSI
of an array with fixed period> Plot(RSIvar,"",1,1);>
Plot(RSI(t),"",2,2);// verification1> Plot(RSIA(Var,t),"",4,8);//
verification2> > /*Analytic RSI of an Array with variable
period*/> Tvar=14;// variable period> Var=C;// variable
array> Up=IIf(Var>Ref(Var,-1),abs(Var-Ref(Var,-1)),0);>
Dn=IIf(Var<Ref(Var,-1),abs(Var-Ref(Var,-1)),0);>
Ut1=AMA(Up,1/Tvar);Dt1=AMA(Dn,1/Tvar);> RSIvar1=100*(Ut1/(Ut1+Dt1));//
the RSI of an array with variable period>
Plot(RSIvar1,"",4,8);> Plot(RSI(14),"",2,2);// verification>
> Application1: the RSI of Close when period varies from 14 to
28> > Tvar=14+Cum(1)%15;// variable period from 14 to 28>
Var=C;// variable array>
Up=IIf(Var>Ref(Var,-1),abs(Var-Ref(Var,-1)),0);>
Dn=IIf(Var<Ref(Var,-1),abs(Var-Ref(Var,-1)),0);>
Ut1=AMA(Up,1/Tvar);Dt1=AMA(Dn,1/Tvar);> RSIvar1=100*(Ut1/(Ut1+Dt1));//
the RSI of an array with variable period>
Plot(RSIvar1,"",4,8);> Plot(RSI(14),"",2,1);// comparison with
RSI(14)> > Application2 : The RSI of StochD(20) with variable
period from 14 to 28> > Tvar=14+Cum(1)%15;// variable period
from 14 to 28> Var=StochD(20);// variable array>
Up=IIf(Var>Ref(Var,-1),abs(Var-Ref(Var,-1)),0);>
Dn=IIf(Var<Ref(Var,-1),abs(Var-Ref(Var,-1)),0);>
Ut1=AMA(Up,1/Tvar);Dt1=AMA(Dn,1/Tvar);> RSIvar1=100*(Ut1/(Ut1+Dt1));//
the RSI of an array with variable period>
Plot(RSIvar1,"",1,8);> > Tvar=14;// fixed period>
Var=StochD(20);// variable array>
Up=IIf(Var>Ref(Var,-1),abs(Var-Ref(Var,-1)),0);>
Dn=IIf(Var<Ref(Var,-1),abs(Var-Ref(Var,-1)),0);>
Ut1=AMA(Up,1/Tvar);Dt1=AMA(Dn,1/Tvar);> RSIvar2=100*(Ut1/(Ut1+Dt1));//
the RSI of an array with fixed period> Plot(RSIvar2,"",4,8);>
> Since we read urgent requests for this subject, use temporarily
these AFL solutions until Tomasz will add similar subjects to>
official editions/upgrades.> > ----- Original Message -----
> From: Dimitris Tsokakis > To: amibroker@xxxxxxxxxxxxxxx
> Sent: Saturday, April 19, 2003 2:04 PM> Subject: Smoothing
Factors> > > Any EMA or Wilders smoothing may contain
variable period through AMA smoothing.> We just need some
relations, posted many times in this list.> Save somewhere the IB code
for further reference> > Wilderssmooth=14;>
EMAsmooth=2*Wilderssmooth-1;> AMAsmooth=2/(EMAsmooth+1);>
Plot(Wilders(C,Wilderssmooth),"",1,1);>
Plot(EMA(C,EMAsmooth),"",4,8);>
Plot(AMA(C,AMAsmooth),"",2,2);> > you will verify that
after the 2*t first bars the tree plots coincide [with a second decimal
accuracy]> and we can call them the same thing.> Consequently,
any T/A formula including EMA [like MACD] or Wilders [like RSI] smoothing
may be equivalent> to an AMA formula, which accepts variable period by
default.> Since MA, DEMA and TEMA also accept variable period, I do not
see any smoothing procedure missing in AFL> structure.>
Dimitris TsokakisSend
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
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
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|