How to take out the 'outliers' from calculation?'Outliers' are just the bars with the bigger range.So,using example of 20 period SMA,which has 15 bars of 20-30 points in range and 5 bars with the 80-100 points in range.So,how to exclude those 5 bars from calculation programmatically?
Thx

), and has wide dispersion, the median is a better measure of the average than the mean, precisely because, by definition, it ignores outliers. Consider writing your code to use the median as the average instead of the mean.
Comment