PureBytes Links
Trading Reference Links
|
Hi,
I need some help with a for loop for some code that is
not AFL. Can someone sugguest how to could this For
loop in AFL.
C: array of closes, indexed starting at 0
lag = C[0]
roclen = 20
for i=roclen to C.size-1
diff = C[i] - lag //amount by which
price leads the lag
roc = diff / roclen //daily increment
pctROC = roc / lag;
lag = lag + diff / roclen;
next i
return pctROC
//The result is a more specialized version of the
daily ROC which I then would use to rank the stocks
with the most movement.
Thanks,
Eric
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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/
|