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

[amibroker] Re: consecutive down days | looping



PureBytes Links

Trading Reference Links




// The square-wave approximation 

x=BarIndex<FONT 
face=Verdana size=1>();
pi=4*atan(1<FONT 
face=Verdana size=1>);
T=50;
f=1/T;
y=0<FONT face="Times New Roman" 
size=2>;
<FONT face="Times New Roman" 
size=2>nmax=Param("nmax",1000,10,1000,10<FONT face=Verdana 
size=1>);<FONT 
face=Verdana size=1>
<FONT face="Times New Roman" 
size=2>for(n=1;n<nmax;n=n+2<FONT 
face="Times New Roman" size=2>)
{
y=y+1/n*sin(2<FONT 
face=Verdana size=1>*pi*f*n*x);
}<FONT face=Verdana 
size=1>
Plot(y,"SqW",1,8);
GraphXSpace=2<FONT face="Times New Roman" 
size=2>;
<FONT face="Times New Roman" 
size=2> 
For 
nmax>500 the noise fades out.
<FONT face="Times New Roman" 
size=2> 
Dimitris 
Tsokakis


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

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












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 the Yahoo! Terms of Service.