v4 Implemented improved cleaning method and exposed maxDeviation for both superTrend and superTrendCleaned.
Updated:
superTrend(multiple, period, mode, closeBars) superTrendPlus with simplified parameters.
Parameters:
multiple: The multiple to apply to the average true range.
period: The number of bars to measure.
mode: The type of moving average to use with the true range.
closeBars: The number of bars to confirm a change in trend.
Returns: [trend, up, dn, unconfirmed, warn, reversal]
superTrendCleaned(multiple, period, mode, closeBars, maxDeviation) superTrendPlus with default compensation for extreme volatility.
Parameters:
multiple: The multiple to apply to the average true range.
period: The number of bars to measure.
mode: The type of moving average to use with the true range.
closeBars: The number of bars to confirm a change in trend.
maxDeviation: The optional standard deviation level to use when cleaning the series. The default is the value of the provided level.
Returns: [trend, up, dn, unconfirmed, warn, reversal]