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

RE: [amibroker] Standard Error AB vs MS not the same



PureBytes Links

Trading Reference Links




<SPAN 
class=123325020-11032003>Ken,
<SPAN 
class=123325020-11032003> 
I 
believe power in AB is done with the 
carrot           

Ms= 
power(4,3)
<SPAN 
class=123325020-11032003>AB=  4^3 or 4 to the  3rd 
power
<SPAN 
class=123325020-11032003> 
so I 
believe   Power(Sum(C,21),2)/21)  
<SPAN 
class=123325020-11032003> 
<SPAN 
class=123325020-11032003>is  (sum(c,21)^2)/21
<SPAN 
class=123325020-11032003> 
I no 
longer have MS installed on my computer but in your example it seems the param 
default is set to 8 while the MS example is set to 21
 Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Ken Close 
[mailto:closeks@xxxxxxxx]Sent: Tuesday, March 11, 2003 3:38 
PMTo: AmiBroker ListSubject: [amibroker] Standard Error AB 
vs MS not the sameAll:Recently there has been 
some talk about Standard Error Bands.I have confirmed that the Standard 
Error Bands produced within AB do NOTmatch the Standard Error Bands produced 
within MS.   I do not care whichone is "theoretically 
correct."   I have a system idea that needs togenerate a signal 
when the Close crosses above the upper Standard ErrorBand, or below the 
lower Standard Error Band.It does not work in AB but does work using the 
MS version of theStandard Error Band (I really do not care what the name is, 
I just wantthe values to be correct)....Here is the AB version of 
the error band:Pr=Param("Pr",8,2,21,1);Lr = LinearReg( Close, 
Pr);Se = StdErr( Close, Pr );width = 2;Uband = Lr + width * 
Se;Lband =  Lr - width * 
Se;Plot(C,"Close",4,64);Plot(Uband,"Upper",2,1);Plot(Lband,"Lower",5,1);Here 
is the more complex (understatement) expression for the standarderror band 
from Metastock:21 period Upper Band (smoothed):Mov((21 * Sum(Cum(1) 
* C,21) - Sum(Cum(1),21) * Sum(C,21)) / (21 *Sum(Pwr(Cum(1),2),21) - 
Pwr(Sum(Cum(1),21),2)) * Cum(1) + (Mov(C,21,S) -Mov(Cum(1),21,S) * (21 * 
Sum(Cum(1) * C,21) - Sum(Cum(1),21) *Sum(C,21))/ (21 * Sum(Pwr(Cum(1),2),21) 
- 
Pwr(Sum(Cum(1),21),2)))+2*(Sqrt(((Sum(Power(C,2),21)-(Power(Sum(C,21),2)/21))-((Sum(Cum(1)*C,21))-((Sum(Cum(1),21)*Sum(C,21)/21)))/((Sum(Power(Cum(1),2),21))-(Power(Sum(Cum(1),21),2)/21))*((Sum(Cum(1)*C,21))-((Sum(Cum(1),21)*Sum(C,21)/21)))) 
/19)),3,S) 21 period Lower Band (smoothed):Mov((21 * Sum(Cum(1) * 
C,21) - Sum(Cum(1),21) * Sum(C,21)) / (21 *Sum(Pwr(Cum(1),2),21) - 
Pwr(Sum(Cum(1),21),2)) * Cum(1) +(Mov(C,21,S) -Mov(Cum(1),21,S) * (21 * 
Sum(Cum(1) * C,21) - Sum(Cum(1),21) *Sum(C,21))/ (21 * Sum(Pwr(Cum(1),2),21) 
- Pwr(Sum(Cum(1),21),2))) 
-2*(Sqrt(((Sum(Power(C,2),21)-(Power(Sum(C,21),2)/21))-((Sum(Cum(1)*C,21))- 
((Sum(Cum(1),21) * Sum(C,21)/21))) 
/((Sum(Power(Cum(1),2),21))-(Power(Sum(Cum(1),21),2)/21))*((Sum(Cum(1)*C,21))-((Sum(Cum(1),21)*Sum(C,21)/21)))) 
/19)),3,S)Can someone suggest how I might recreate the equation 
(whatever it iscalled) so that I can get the same signal out of this "error 
band"parameter?For example, what is the equivalent in AB for 
"POWER"?  I will for nowassume that all of the other functions - Cum(), 
Sum(), etc are the same.I know how to convert the MS Mov() formula to the AB 
MA().  Any help onPower or Pwr??If the above is too imposing, 
can you just translate this into AFLPower(Sum(C,21),2)/21)  
===>  ???? in AFL  ?????Thanks for any 
help,KenSend 
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


  ADVERTISEMENT









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.