PureBytes Links
Trading Reference Links
|
Hello,
For loop can step by any interval.
Excerpt from the User's Guide: AFL reference manual:
"
for ( init-expression ; cond-expression ; loop-expression ) 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, "
So to solve your problem:
for( i = 0; i < 10; i = i + 0.001 )
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "nmolchanoff" <knowing@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, October 17, 2003 2:43 AM
Subject: [amibroker] For Loop - step control?
> Hello,
>
> When you want to loop by a decimal interval such as thousandths, is
> it necessary to loop by integers and then divide the loop variable by
> 1000 within the formula inside the loop?
>
> Or is there a "Step" control to allow looping by thousandths directly
> from the loop expression?
>
> Regards,
>
> Nick Molchanoff
>
>
>
>
> 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 http://docs.yahoo.com/info/terms/
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/mk9osC/hP.FAA/3jkFAA/GHeqlB/TM
---------------------------------------------------------------------~->
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 http://docs.yahoo.com/info/terms/
|