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/
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?