PureBytes Links
Trading Reference Links
|
We read in the Users Guide, AFL Reference Manual, FOR
statement"...For loop is extremely flexible. loop-expression can be
ANY kind of expression you wish. You can produce not only regular series like
this:for( i = 0; i < BarCount; i = i + 3 ) // increment by 3 every
iterationbut you can produce exponential series too:for( i = 1; i <
BarCount; i = i * 2 ) // produces series of 1, 2, 4, 8, 16, 32, ... ...
"
The following loop will produce the Fibonacci series, for any
further use.
// The Fibonacci
seriesd=2/(sqrt(5)+1);// the accurate calculation
of 0.618n=5;for(i=d^(-n);i>=d^n;i=i*d){fib=i;Title=Title+"\n"+WriteVal(fib,1.3);}
The Fib coefficients are accurately calculated and you dont
need to write them one by one.
n may be increased for more Fib pairs.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.
|