Home > freetb4matlab > financial > movavg.m

movavg

PURPOSE ^

%

SYNOPSIS ^

function [varargout] = movavg (asset, lead, lag, alpha)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} movavg (asset, lead, lag)
% @deftypefnx {Function File} {} movavg (asset, lead, lag, alpha)
% @deftypefnx {Function File} {[short, long] =} movavg (asset, lead, lag, alpha)
%
% Calculate the @var{lead}ing and @var{lag}ging moving average of an
% @var{asset}. If given, @var{alpha} is the weighting power of the
% delay; 0 (default) is the simple moving average, 0.5 would be the
% square root weighted moving average, 1 would be linear, 2 would be
% squared, ..., and 'e' is the exponential moving average.
%
% If no output is requested the data is plotted.  The plots are drawn
% in the following order: asset, lag, lead.  If output is requested, no
% plot is generated.
%
% @seealso{bolling, candle, dateaxis, highlow, pointfig}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003