OPEN-SOURCE SCRIPT

Cumulative New Highs - New Lows Indicator

125
This indicator is designed to track market momentum by calculating and plotting the cumulative sum of 52 weeks High-Low for different indices, alongside a customizable moving average.

Index Selection:
Users can choose from multiple indices, including:
  • Total Stock Market (default)
  • NYSE Composite
  • Nasdaq Composite
  • S&P 500
  • Nasdaq 100
  • Russell 2000


Moving Average Customization:
The script allows you to select between a Simple Moving Average (SMA) or an Exponential Moving Average (EMA) for smoothing the cumulative data. The window length of the moving average is also adjustable, letting you tailor the sensitivity of the trend analysis.

Dynamic Background Plotting:
With the background plot option enabled, the indicator changes the chart's background color dynamically:
  • Green: When the cumulative sum is above its moving average, suggesting bullish momentum.
  • Red: When it is below the moving average, indicating bearish conditions.


Visual Representation:
Two key lines are plotted:
  • Cumulative Index Line: Displayed in a subtle blue, representing the aggregated market movement.
  • Moving Average Line: Shown in an orange tone, offering a smoothed perspective that aids in identifying trend shifts.


Inspiration:
I took inspiration from the indicator made by YoxTrades (I can't put links, but you can check their profile) and added a few features I wanted on top of it.

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

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