Public Function StandardDeviation(chart_id As Long, applyTo As ENUM_APPLIED_PRICE, period As Integer, StandardDev As Double, Ma As ENUM_MA_METHOD) As String
Standard deviation is a statistical term that measures the amount of variability or dispersion around an average.
Generally speaking, dispersion is the difference between the actual value and the average value. The larger this dispersion or variability is, the higher the standard deviation. The smaller this dispersion or variability is, the lower the standard deviation.
Chartists can use the standard deviation to measure expected risk and determine the significance of certain price movements.
|chart_id||Chart identifier, 0 is the current chart ,value of type Long|
|applyTo||Applied price , can be one of theENUM_APPLIED_PRICE|
|period||The calculation period, on which the indicator will be calculated, value of type Integer|
|StandardDev||Standard deviation period , value of type Double.|
|Ma||Moving average to be used on calculation , can be one of theENUM_MA_METHOD|
Returns the handles of a technical indicator, in case of failure returns an empty string.
Public Sub main()AlertMessage (StandardDeviation(0, PRICE_CLOSE, 14, 3, MODE_SMA))'Draws the indicator on chart and shows a message box with the indicator name.End Sub
Leave A Comment