How Can We Help?
AVG Function
AVERAGE(Vector, Periods)
AVG(Vector, Periods)
Returns a vector containing a running average, as specified by the Periods argument. The AVERAGE function can also be referenced by AVG for short.
Example:
AVERAGE(CLOSE, 10)
AVG(CLOSE, 10)
Both scripts return a vector of averages based on a 10- period window.
Example use:
set BUY = close > AVG(close,10)