|
Description |
This formula calculates an average price. |
|
|
Formula |
Average(INPUT, Bate=6, Length=9)=begin Sum = 0 retval = 0 for i = 0 to (Length - 1) begin Sum = Sum + GetPrice($1, Bate, i, Length) end retval = Sum / Length end |
|
|
Parameters |
INPUT The INPUT directive makes this formula available as a Formula Overlay. INPUT refers to the instrument in the chart.
Bate The price you want to average. The default is 6, or BATE_CLOSE.
Length The number of bars to average. |
|
|
Return Value |
An averaged price. |
|
|
Examples |
AverageTrueRange2(SERIES, Length=14)=begin retval = Average($1, BATE_TRUERANGE, Length) end |
|
|
Comments |
NA |
©2008 Aspen Research Group, Ltd. All rights reserved. Terms of Use.