Description
smaplot is used to plot a line plot of a moving average.
smaplot is a plot routine for a simple moving average. The period of the
average defines how many days are incoporated into the average. An SMA is
calculated as the total of all prices over the period divided by the period.
The syntax is used to define the starting and ending data points of the plot (a and
b), the lookback period (p), the desired color, the
line style and the line thickness (t). The available colors, styles and
thicknesses available for perplot follow normal O-Matrix standards.
val is the numerical quantity to be plotted, integer, real
or double precision.
a, b and p must be integer quantities.
color and style must be input as character values.
Example:
The following example plots a blue, solid, 50 period moving average incorporating the
entire range of price data for the calculation.
smaplot(cp,1,L,50,"blue","solid",5)
Here m is the quantity being plotted in the
EAS Charting Window, 1 and L are the starting/ending data points
and 50 is the lookback period over which cp was calculated.