StandardDeviation
Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 27 August 2020 10:22 AM

Syntax

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 

Description

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.

Parameters

Key Description 
chart_id Chart identifier, 0 is the current chart ,value of type Long
applyTo Applied price , can be one of the ENUM_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 the  ENUM_MA_METHOD

Return value

Returns the handles of a technical indicator, in case of failure returns an empty string.

Sample

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

See Also


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions