Simple function

A simple function is the most common type of function that only stores its current value. Unlike series functions, simple functions do not store historical values of themselves and therefore do not require much memory to perform their calculations. However, a simple function can still refer to other historical bar prices (such a High, Volume, etc.).

The Function Properties - General tab is used to set the function storage and execution method to Series, Simple, or Auto-Detect.  When in doubt, select Auto-Detect and the compiler will select the most appropriate storage method for the function.

Example

This one line function returns an average of Volume for the most recent 10 bars.  

VolTotal = Average(Volume,10);