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

Re: [amibroker] Re: New file uploaded to amibroker



PureBytes Links

Trading Reference Links

DIMITRIS TSOKAKIS wrote:

>Here is the 2nd, 3rd and 4th degree Q_averages.
>The 4th degree is more complicated but gives some interesting 
>alternatives.
>a. The Ti4 is still smooth and much faster than the 2nd and 3rd 
>degree lines.
>b. The Ti4f may act as a magnifier, peaks are higher and troughs are 
>lower than the actual price.
>After this level, a significant distorsion becomes more and more 
>apparent .
>
>Plot(C,Date()+", C",colorBlack,128); 
>p=20;s=0.7;
>e1=EMA(C,p);
>e2=EMA(e1,p);
>e3=EMA(e2,p);
>e4=EMA(e3,p);
>e5=EMA(e4,p);
>e6=EMA(e5,p);
>//2nd degree coefficients
>d1=s^2;
>d2=-2*s*(s+1);
>d3=(1+s)^2;
>Ti2=d1*e6+d2*e5+d3*e4;Plot(Ti2,"\nTi2",colorRed,1);
>Ti2f=d1*e5+d2*e4+d3*e3;
>Plot(Ti2f,"\nTi2f",colorPink,1);
>Ti2ff=d1*e4+d2*e3+d3*e2;
>Plot(Ti2ff,"\nTi2ff",colorOrange,1);
>//3rd degree coefficients
>C1=-s^3;
>C2=3*s^2*(1+s);
>C3=-3*s*(s+1)^2;
>C4=(1+s)^3;
>Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
>Plot(Ti3,"\nTi3",colorDarkGreen,8);
>Ti3f=c1*e5+c2*e4+c3*e3+c4*e2;
>Plot(Ti3f,"\nTi3f",colorBrightGreen,1);
>//4th degree coefficients
>g1=s^4;
>g2=-4*(s+1)*s^3;
>g3=6*(s+1)^2*s^2;
>g4=-4*(s+1)^3*s;
>g5=(s+1)^4;
>Ti4=g1*e6+g2*e5+g3*e4+g4*e3+g5*e2;
>Plot(Ti4,"\nTi4",colorDarkGrey,8);
>Ti4f=g1*e5+g2*e4+g3*e3+g4*e2+g5*e1;
>Plot(Ti4f,"\nTi4f",colorLightGrey,8);
>
>  
>
>
Just a thought.

In automatic control field, one constructs PID (proportiaonal, integral 
and derivative) controllers to regulate the target based on the 
derivation between the desired output and the real output. The integral 
component is responsible for the history, thus a lagging factor (moving 
average is just the one), the derivative part (Rate of Change) is a 
prediction for the future, thus a leading factor causing more wipsaws; 
whileas the proportional component focuses on the current status.

Combining them together offers a compromise of responsiveness and 
smoothness. The ideal one is to have minimum lag, minimum overshoot and 
undershoot. This is just the requirement for ideal moving averages.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/