OPEN-SOURCE SCRIPT

Asset % Performance vs Base Index [Dots3Red]

572
General idea of the indicator
This indicator is designed to indicate the asset % performance within the chosen time period in the form of colored boxes.

Moreover, the indicator shows the historic YoY% performance of one of the 4 US indices chosen: SP500, Nasdaq 100, DJ30, or Russel 2000.

The visual boxes are shown below the main chart.

How to use the indicator?
In the indicator's settings:
  • Choose the base index against which you want to check the asset % performance in the scripts.
  • Choose the default time period of the ticker for which you want to see the % performance.
  • Choose "Dark Theme" to redraw the boxes if you use that theme.


It is possible to drag the boundaries of the asset's % box in the chart so as to readjust the time period.

The indicator automatically recalculates once you change the settings or drag the boundaries of the asset's box

Possible Code changes
This script is open-source, therefore, you might modify it to choose any base asset, not only US indices.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.