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

Re: [amibroker] TJ: NotePad window tied to a pricechart?



PureBytes Links

Trading Reference Links

Dimitris,         Also, in the spirit of this thread. It's easy to sequence through non related numbers with for loop as well. eg. Numbers = "1,5,9,11,13,17,21,7"; for( z = 0; ( i = StrToNum(StrExtract( Numbers, z ))) != 0; z++ ) { Plot(MA(C,i),"Multi",i,styleLine); }         ATB          Michael. At 04:47 PM 16/06/2004, you wrote: 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 iteration but 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 series d=2/(sqrt(5)+1);// the accurate calculation of 0.618 n=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.