PureBytes Links
Trading Reference Links
|
Looping stuff.... I've had some guidance from the forum and TJ
and
thought I got it, but every new loop I take on gets stuck.
I went back to the basics, as an exercise trying to write a function
loop for a simple moving average:
function MN(n)
{
// local result;
result = C ;
for (i=2;i<BarCount;i++)
{
result = ((i-1)/i)*result + (1/i)*Ref(C,-(i-1)) ;
}
return result;
}
Plot(MN(2),"MN(2)", colorBlue);
Plot(MA(C,2),"MA(2)",colorRed);
Just doesn't work, my MN(n) is empty for every n. What's
wrong?
Thanks for your patience with me.
treliff
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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
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/
|