PureBytes Links
Trading Reference Links
|
Hopefully a scripting xpert can help me get a handle on this.
I'm not familiar with scripting but was delighted to find the new
AFL do-while, for etc. statements could help me realize some new
analysis.
I'd like to define a function f that calculates statistical
historical volatility:
f(n) = StDev(Log(C/Ref(C,-1),n)
(this formula mixes traditional math notation "f(n) =" with
AFL)
The variable n determines the lookback period and of course, further
down the indicator, I'd like to be able to call say f(3)
(3-period hist. volatility) when n is 3 etc.
Now how do I code this? I better not bore you with the countless
messy codes I tried so far, but they all lead to some error message,
mostly re. mismatches in numbers and arrays.
Just getting this one straight will probably open the door for me.
Thanks in advance for any help.
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/
|