addMA                package:quantmod                R Documentation

_A_d_d _M_o_v_i_n_g _A_v_e_r_a_g_e _t_o _C_h_a_r_t

_D_e_s_c_r_i_p_t_i_o_n:

     Add one or more moving averages to a chart.

_U_s_a_g_e:

     addSMA(n = 10, on = 1, with.col = Cl, overlay = TRUE, col = "brown")

     addEMA(n = 10, wilder = FALSE, ratio=NULL, on = 1,
            with.col = Cl, overlay = TRUE, col = "blue")

     addWMA(n = 10, wts=1:n, on = 1, with.col = Cl, overlay = TRUE, col = "green")

     addDEMA(n = 10, on = 1, with.col = Cl, overlay = TRUE, col = "pink")

     addEVWMA(n = 10, on = 1, with.col = Cl, overlay = TRUE, col = "yellow")

     addZLEMA(n = 10, ratio=NULL, on = 1, with.col = Cl, overlay = TRUE, col = "red")

_A_r_g_u_m_e_n_t_s:

       n: periods to average over 

  wilder: logical; use wilder? 

     wts: a vector of weights 

   ratio: a smoothing/decay ratio 

      on: apply to which figure (see below) 

with.col: using which column of data (see below) 

 overlay: draw as overlay 

     col: color of MA 

_D_e_t_a_i_l_s:

     see the appropriate base MA functions in 'TTR' for more details
     and references.

_V_a_l_u_e:

     A moving average indicator will be draw on the current chart.  A
     chobTA object will be returned silently.

_A_u_t_h_o_r(_s):

     Jeffrey A. Ryan

_R_e_f_e_r_e_n_c_e_s:

     see MovingAverages in pkg{TTR} written by Josh Ulrich

_S_e_e _A_l_s_o:

     'addTA'

_E_x_a_m_p_l_e_s:

     ## Not run: 
     addSMA()
     addEMA()
     addWMA()
     addDEMA()
     addEVWMA()
     addZLEMA()
     ## End(Not run)

