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

[amibroker] Re: Fw: Smoothing Factors



PureBytes Links

Trading Reference Links

Urgent ?  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 Tsokakis


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/