setTA                package:quantmod                R Documentation

_M_a_n_a_g_e _T_A _A_r_g_u_m_e_n_t _L_i_s_t_s

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

     Used to manage the TA arguments used inside 'chartSeries' calls.

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

     setTA(type = c("chartSeries", "barChart", "candleChart"))

     listTA(dev)

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

    type: the function to apply defaults TAs to 

     dev: the device to display TA arguments for 

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

     'setTA' and 'unsetTA' provide a simple way to reuse the same TA
     arguments for multiple charts.  By default all charting functions
     will be set to use the current chart's defaults.

     It is important to note that the _current_ device will be used to
     extract the list of TA arguments to apply. This is done with a
     call to listTA internally, and followed by calls to setDefaults of
     the appropriate functions.

     An additional way to set default TA arguments for subsequent
     charts is via 'setDefaults'. See the examples.

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

     Called for its side-effect of setting the default TA arguments to
     quantmod's charting functions.

_N_o_t_e:

     Using 'setDefaults' directly will require the vector of default TA
     calls to be wrapped in a call to  'substitute' to prevent
     unintended evaluations; _OR_ a call to 'listTA' to get the present
     TA arguments.  This last approach is what 'setTA' wraps.

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

     Jeffrey A. Ryan

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

     'chartSeries', 'addTA'

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

     ## Not run: 
     listTA()
     setTA()

     # a longer way to accomplish the same
     setDefaults(chartSeries,TA=listTA())
     setDefaults(barCart,TA=listTA())
     setDefaults(candleChart,TA=listTA())

     setDefaults(chartSeries,TA=substitute(c(addVo(),addBBands())))
     ## End(Not run)

