Trade-o-Scope

Trade-o-Scope: Plot Custom Data

Trade-o-Scope team presents the "Plot Custom Data" indicator.
"Plot Custom Data" is designed to help you bring the custom timeseries data and plot it on the chart.

Motivation:
In the fast-evolving landscape of markets, traders often find themselves analyzing a plethora of data sources, specialized market information, various metrics, etc. While TradingView offers a rich catalog of instruments and market data, there are cases where traders rely on unique data sources, custom calculations, bespoke metrics, or refined analytics that demand visualization.

In some cases, traditional visualization approaches for custom data like plotting in Excel or other platforms may suffice for some. still, we really adore all the great features TradingView supercharts have - native scaling and scrolling, drawing, combining data, applying indicators and strategies on top of any series, etc. The ability to play with custom data on TradingView charts is just a whole new level compared to any alternatives.

With this indicator, we aim to empower traders to effortlessly bring their custom data to the familiar and friendly interface of the TradingView chart.

Basic Features:
  1. Easy Data Input: Simply paste your numerical timeseries data, whether it's a column from Excel, Google Sheets, CSV file, or multiline text from any text editor.
  2. Flexible Configuration: Define the order of values, starting date, and timeframe to match the specifications of your data.
  3. Custom appearance: Personalize your chart by assigning a title to your data and selecting colors for the plot.

Advanced Features:
  1. Value Multiplier: Set a multiplier for the provided values to adjust their scale as needed.
  2. Formatting Options: Customize the display format of values on the chart, whether as price, percentage, or volume.
  3. Conditional Coloring: Define conditions for changing the plot color based on a specific threshold.
  4. Plot Style Selection: Choose from various plot styles such as line, histogram, area, columns, and more, to best visualize your data.
  5. Additional Visual References: Enhance data analysis by activating fixed horizontal lines to aid in visual interpretation.
  6. Leverage TradingView Capabilities: Seamlessly apply various indicators from the TradingView catalog, such as Bollinger Bands or RSI, onto your custom data chart for comprehensive analysis.

Chart Example:
On the chart above, you can observe several "Plot Custom Data" indicators added to demonstrate what your custom data can look like and how multiple indicators can be combined, as well as the indicator configuration screen.

How it works:
The "Plot Custom Data" indicator processes the list of values provided on the configuration form and converts it into data points to be plotted on the chart. To determine the timing of plotting each value, the indicator uses the configured 'starting date' and 'timeframe'. This means the indicator will always plot each subsequent value from your list at the distance of one timeframe from the previous one.

Limitations and Best Practices:
1) The way timeseries data is inputted on the "Plot Custom Data" indicator configuration page, leverages a standard input text field. This input type has a limited character capacity, approximately 4000-4400 symbols. Therefore, the timeseries data cannot exceed this limit.

Let's illustrate this with an example.
Suppose you have a column in Excel that you wish to plot using the indicator. Consider the first 5 rows of values in your column:
| -123.45
| -43.5
| 3.12
| 9.6
| 146.78

To calculate the total symbols used, we need to account for the minus sign, numbers, decimal point, and two invisible symbols at the end of each line, which helps structure the text into multiple lines. So, in total, these 5 rows will use:
row_1 + row_2 + row_3 + row_4 + row_5 = 9 + 7 + 6 + 5 + 8 = 35 symbols or 7 symbols per row on avarage.
If we assume the remaining data follows a similar format, we can estimate the number of rows that can be inputted on the indicator configuration page:
from ~4000 / 7 = 571 rows
to ~4400 / 7 = 628 rows

The right approach to overcome this limitation is to reduce the number of symbols representing each value as much as possible. In our example, consider dropping all decimals, which would lead to an average of 5.4 symbols per row and allow for up to ~800 rows to be accepted by the input field.

If your data primarily consists of large values such as thousands or millions, consider dividing it by a multiplier like x1000 and activating the same multiplier in the indicator settings.
For example, instead of storing values like 5,620,000 in your list, store the value 562 and activate an x10,000 multiplier in the configuration to display the original value on the chart.

It is also possible to combine multiple indicators on one chart and split a larger list of values between them. If you need to display significantly more custom data on charts, you may contact us in DM to find\develop a proper solution.

2) Another important consideration is to ensure that all your data aligns with the selected timeframe in the indicator configuration.
Remember, you provide only the values to the indicator without corresponding dates. Dates are calculated automatically by the indicator based on the configured starting date and chosen timeframe. This means the indicator will always plot each subsequent value from your list at the distance of one timeframe from the previous one.

Here's an example:
Suppose you have a timeseries with 'date' and 'value' columns and a timeframe of 30 minutes:

# | date               | value
--|---------------------------|---------
1 | 2024-01-01 11:30:00 | -241.45
2 | 2024-01-01 12:02:13 | -11.56
3 | 2024-01-01 13:00:00 | 21.87
..
..
6 | 2024-01-01 14:30:00 | 19.6
7 | 2024-01-01 15:00:00 |
8 | 2024-01-01 15:30:00 | 46.78

Rows 1-3 represent bad practice:
  • Row 2 is not precisely aligned with the timeframe, as it has a time of 12:02:13 instead of the expected 12:00:00. This won't cause errors, but the plot will show this value at 12:00:00.
  • Row 3 has a 1-hour difference from Row 2, which poses a real problem. As the indicator doesn't know the actual dates, it expects Row 3 to be 30 minutes later than Row 2, so it will plot 21.87 at 12:30:00 instead of the actual 13:00:00. And the rest of the values from your list will have offset on the chart as well.
Rows 6-7 represent the correct approach to overcome gaps in your data:
  • If, for some reason, there is no value for 15:00:00 in the original dataset, adding an empty Row 7 ensures each subsequent row is located 30 minutes from the previous one. The indicator will treat the empty row correctly, not plotting anything at this date on the chart, but will plot a line connecting the value of 19.6 from Row 6 with the value of 46.78 from Row 8.

How to use:
1) Add the "Plot Custom Data" indicator to the chart.
  • Voila! You'll see the plot based on the default timeseries values list and settings.
2) Paste your numerical timeseries data.
  • Define the order of values, starting date, and timeframe.
  • Assign a title to your data and select colors for the plot.
  • Voila! You'll see the plot based on your timeseries values list and settings.
3) Customize the indicator's settings:
  • Set a values multiplier if needed.
  • Specify the appropriate format for the values (price, percentage, or volume).
  • Choose whether to change the plot color based on conditions.
  • Select the plot style.
  • Add horizontal lines.
4) Explore your data, apply additional indicators and strategies from the TradingView catalog, or develop your own scripts using Pine.
สคริปต์เฉพาะผู้ได้รับเชิญเท่านั้น

การเข้าถึงสคริปต์นี้จำกัดเฉพาะผู้ใช้ที่ได้รับอนุญาตจากผู้เขียน และมักจะต้องชำระเงินก่อน คุณสามารถเพิ่มลงในรายการโปรดของคุณได้ แต่คุณจะสามารถใช้งานได้หลังจากขออนุญาตและขอรับจากผู้เขียนเท่านั้น ติดต่อ Trade-o-Scope สำหรับข้อมูลเพิ่มเติม หรือทำตามคำแนะนำของผู้เขียนด้านล่าง

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

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

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

คำแนะนำของผู้เขียน

To get access to the indicator you can contact me via DM here or on socials.

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

คำเตือน: กรุณาอ่าน ก่อนร้อขอการเข้าถึง