PineCodersTASC

TASC 2023.03 Every Little Bit Helps

█ OVERVIEW

TASC's February 2023 edition of Traders' Tips includes an article titled "Every Little Bit Helps: Averaging The Open And Close To Reduce Noise" by John​ Ehlers​. This code implements the numerical example from this article.

█ CONCEPTS

Using theories from digital signal processing as a starting point, John ​Ehlers argues that using the average of the open and close as the source time series of an indicator instead of using only the closing price can often lead to noise reduction in the output. This effect especially applies when there is no gap between the current bar's opening and the previous bar's closing prices. This trick can reduce noise in many common indicators such as the ​​RSI, ​​MACD, and ​​Stochastic.

█ CALCULATIONS

Following the example presented in the original publication, this script illustrates the proposed strategy using the ​​Relative Strength Index (​RSI) as a test indicator. It plots two series:
  • ​RSI calculated using only closing prices as its source.
  • ​RSI of the same length as the first, but calculated using the average of open and close prices as its source, i.e. (open+close)/2.
This script demonstrates that using the average of open and close as the calculation source results in a smoother indicator. To visually emphasize the advantage of this proposed trick, the script's color scheme is sensitive to both the ​RSI value and the difference between the two ​RSI data streams.

Tools and ideas for all Pine coders: www.tradingview.com/u/PineCoders/
Pine news broadcasts: t.me/PineCodersSquawkBox or twitter.com/PineCoders
TASC: traders.com/
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?