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

Re: [amibroker] Formula not working



PureBytes Links

Trading Reference Links

it works for me.....
 
AA window....current symbol....n last quotation....n =1
 
 
Anthony
----- Original Message -----
Sent: Saturday, December 29, 2007 2:17 PM
Subject: [amibroker] Formula not working

Any ideas on why this formula returns nothing for the variable "Mean
Return"?

_SECTION_BEGIN("Close-Close Volatility");
Filter = BarIndex() > 252;
nPeriods = Param("Volatility Period", 5, 5, 252, 5);
LogReturn = ln (Close / Ref(Close, -1));
MeanReturn = Sum (LogReturn, nPeriods) / (nPeriods -1);
ReturnVariance = Sum ((LogReturn - MeanReturn) ^ 2, nPeriods);
Volatility = sqrt ((252 / ( nPeriods - 2)) * ReturnVariance);
Plot(Volatility , "Volatility Periods (" + nPeriods + ")",
colorOrange, styleLine|styleOwnScale);
AddColumn(Close,"Close",1.4);
AddColumn(Ref(C,-1),"c-1",1.4);
AddColumn(LogReturn ,"LogReturn",1.9);
AddColumn(MeanReturn ,"MeanReturn",1.9);
AddColumn(ReturnVariance ,"ReturnVariance ",1.9);
AddColumn(Volatility ,"Volatility ",1.9);
_SECTION_END();

Many thanks for your help.

Drew Yallop


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date: 12/28/2007 11:51 AM
__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___