Median Absolute Deviation (MAD) is a measure of variation used in a similar manner to the standard deviation. The MAD is more robust in the presence of outliers and does not require a Gaussian distribution.  

 

In order to estimate the standard deviation for a Gaussian distribution the MAD can be multiplied by 1.4826

 

Syntax:

MedianAbsoluteDeviation( series, bars )

 

Parameter:

Description:

bars

The number of bars over which to find the median absolute deviation

 

Returns:

The median absolute deviation over the specified number of bars.

 

Example:

'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  Update Indicators Script
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  MedAbsDev = IPV - Numeric Series
'  Bar_Count = 21
MedAbsDev = MedianAbsoluteDeviation( Instrument.Close, Bar_Count )
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Chart Display:

Click to Enlarge; Click to Reduce.

Median Absolute Deviation Indicator

 

Links:

Historic Volatility, Market Noise

 

See Also:

Indicator Pack 1 Series Functions

 


Edit Time: 9/26/2020 1:25:37 PM


Topic ID#: 418

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software