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

[amibroker] Dynamic Variables



PureBytes Links

Trading Reference Links

Hi,

Does AFL support dynamic variable creation?

My goal is to determine the standard deviation of one or more stocks.  But I don't want to limit the time period to the number of variables that I have to write out in the formula.  I'd like to take the number of periods back as a parameter and then create that number of variables to hold the value from x number of days.

As I write this, I realize that I might be over thinking it.  I suppose I could take the number of periods back as a peramter and then loop through that number of periods totalling up the closing prices.  Something like

For I = 1 to iPeriods
    dTotal = dTotal + Close(I)
Next


Is that workable?

Thanks for any help!
__._,_.___

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

__,_._,___