PINE LIBRARY
DataCleaner

Library "DataCleaner"
outlierLevel(src, len, level)
Gets the (standard deviation) outlier level for a given series.
Parameters:
src: The series to average and add a multiple of the standard deviation to.
len: The The number of bars to measure.
level: The positive or negative multiple of the standard deviation to apply to the average. A positive number will be the upper boundary and a negative number will be the lower boundary.
Returns: The average of the series plus the multiple of the standard deviation.
naOutliers(src, len, maxDeviation)
Returns only values that are within the maximum deviation.
Parameters:
src: The series to filter results from.
len: The The number of bars to measure.
maxDeviation: The maximum deviation before considered an outlier.
normalize(src, len, maxDeviation, baseline)
Returns the source value adjusted by its standard deviation.
Parameters:
src: The series to measure.
len: The number of bars to measure the standard deviation.
maxDeviation: The maximum deviation before considered an outlier.
baseline: The value considered to be at center. Typically zero.
cleanUsing(src, result, len, maxDeviation)
Returns an array representing the result series with (outliers provided by the source) removed.
Parameters:
src: The source series to read from.
result: The result series.
len: The maximum size of the resultant array.
maxDeviation: The positive or negative multiple of the standard deviation to apply to the average. A positive number will be the upper boundary and a negative number will be the lower boundary.
Returns: An array containing the cleaned series.
clean(src, len, maxDeviation)
Returns an array representing the source series with outliers removed.
Parameters:
src: The source series to read from.
len: The maximum size of the resultant array.
maxDeviation: The positive or negative multiple of the standard deviation to apply to the average. A positive number will be the upper boundary and a negative number will be the lower boundary.
Returns: An array containing the cleaned series.
cleanArray(src, maxDeviation)
Returns an array representing the source array with outliers removed.
Parameters:
src: The source series to read from.
maxDeviation: The positive or negative multiple of the standard deviation to apply to the average. A positive number will be the upper boundary and a negative number will be the lower boundary.
Returns: An array containing the cleaned series.
naArrayOutliers(src, maxDeviation)
Returns an array representing the source array with outliers removed.
Parameters:
src: The array to set outliers to N/A.
maxDeviation: The maximum deviation before considered an outlier.
Returns: True if there were any outliers; otherwise false.
outlierLevelAdjusted(src, len, level, maxDeviation)
Gets the (standard deviation) outlier level for a given series after a single pass of removing any outliers.
Parameters:
src: The series to average and add a multiple of the standard deviation to.
len: The The number of bars to measure.
level: The positive or negative multiple of the standard deviation to apply to the average. A positive number will be the upper boundary and a negative number will be the lower boundary.
maxDeviation: The optional standard deviation level to use when cleaning the series. The default is the value of the provided level.
Returns: The average of the series plus the multiple of the standard deviation.
outlierLevel(src, len, level)
Gets the (standard deviation) outlier level for a given series.
Parameters:
src: The series to average and add a multiple of the standard deviation to.
len: The The number of bars to measure.
level: The positive or negative multiple of the standard deviation to apply to the average. A positive number will be the upper boundary and a negative number will be the lower boundary.
Returns: The average of the series plus the multiple of the standard deviation.
naOutliers(src, len, maxDeviation)
Returns only values that are within the maximum deviation.
Parameters:
src: The series to filter results from.
len: The The number of bars to measure.
maxDeviation: The maximum deviation before considered an outlier.
normalize(src, len, maxDeviation, baseline)
Returns the source value adjusted by its standard deviation.
Parameters:
src: The series to measure.
len: The number of bars to measure the standard deviation.
maxDeviation: The maximum deviation before considered an outlier.
baseline: The value considered to be at center. Typically zero.
cleanUsing(src, result, len, maxDeviation)
Returns an array representing the result series with (outliers provided by the source) removed.
Parameters:
src: The source series to read from.
result: The result series.
len: The maximum size of the resultant array.
maxDeviation: The positive or negative multiple of the standard deviation to apply to the average. A positive number will be the upper boundary and a negative number will be the lower boundary.
Returns: An array containing the cleaned series.
clean(src, len, maxDeviation)
Returns an array representing the source series with outliers removed.
Parameters:
src: The source series to read from.
len: The maximum size of the resultant array.
maxDeviation: The positive or negative multiple of the standard deviation to apply to the average. A positive number will be the upper boundary and a negative number will be the lower boundary.
Returns: An array containing the cleaned series.
cleanArray(src, maxDeviation)
Returns an array representing the source array with outliers removed.
Parameters:
src: The source series to read from.
maxDeviation: The positive or negative multiple of the standard deviation to apply to the average. A positive number will be the upper boundary and a negative number will be the lower boundary.
Returns: An array containing the cleaned series.
naArrayOutliers(src, maxDeviation)
Returns an array representing the source array with outliers removed.
Parameters:
src: The array to set outliers to N/A.
maxDeviation: The maximum deviation before considered an outlier.
Returns: True if there were any outliers; otherwise false.
outlierLevelAdjusted(src, len, level, maxDeviation)
Gets the (standard deviation) outlier level for a given series after a single pass of removing any outliers.
Parameters:
src: The series to average and add a multiple of the standard deviation to.
len: The The number of bars to measure.
level: The positive or negative multiple of the standard deviation to apply to the average. A positive number will be the upper boundary and a negative number will be the lower boundary.
maxDeviation: The optional standard deviation level to use when cleaning the series. The default is the value of the provided level.
Returns: The average of the series plus the multiple of the standard deviation.
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。