PROTECTED SOURCE SCRIPT
Category Spaghetti

This indicator aims to analyze the strength and weakness between categories by grouping multiple symbols into a single category, calculating the geometric or weighted average rate of change over a specified period, and displaying it as a Spaghetti Chart.
On the left side of the screen, it displays the rate of change for each category, while on the right side, it shows the rate of change for symbols belonging to the selected category.
The indicator is computationally heavy as it can draw up to 10 symbols per category and up to 20 categories. You can slightly improve performance by reducing the number of bars loaded in the Performance Settings.
#################### Settings Description ####################
==================== Symbols Table Settings ====================
==================== Category Table Settings ====================
==================== Category Settings ====================
==================== Color Settings ====================
==================== Performance Settings ====================
----------------------------------------------------------------------------------------------
このインジケーターは、複数のシンボルを一つのカテゴリーにまとめて指定した期間の幾何平均または加重平均騰落率を計算し、Spaghetti Chartとして描画することで、カテゴリー間の強弱の分析を目的としています。
画面左側に各カテゴリーの騰落率、右側に指定したカテゴリーに属するシンボルの騰落率を表示しています。
カテゴリーあたり最大10シンボル、最大20カテゴリーを描画するため、インジケーターの動作が非常に重くなります。
設定のPerformance Settingsから読み込むBarsの数を減らすことで動作が少しだけ軽量になります。
#################### 設定の説明 ####################
==================== Symbols Table Settings ====================
==================== Category Table Settings ====================
==================== Category Settings ====================
==================== Color Settings ====================
==================== Performance Settings ====================
On the left side of the screen, it displays the rate of change for each category, while on the right side, it shows the rate of change for symbols belonging to the selected category.
The indicator is computationally heavy as it can draw up to 10 symbols per category and up to 20 categories. You can slightly improve performance by reducing the number of bars loaded in the Performance Settings.
#################### Settings Description ####################
- Calculation Method
You can select either the geometric average or the weighted average.
When the Weighting option is checked, the calculation uses "symbol*weight," enabling weighting for the symbols.
- ROC Period
Select the calculation period for the rate of change.
If a symbol included in the calculation period is newly listed or delisted, the result will be NaN.
- Date and Time
When checked, the rate of change is calculated from the specified date and time.
- Base Symbol Basis Chart
When checked, the rate of change is displayed based on the base symbol specified in Base Symbol.
- Highlight
When checked, only the categories specified by numbers in the text box are highlighted.
Separate the numbers with commas.
==================== Symbols Table Settings ====================
- Symbols Table
When checked, the Symbols Table is displayed on the right side of the screen.
- Select Category
Displays the rate of change for the symbols belonging to the selected category.
- Display Limit
When checked, switches the display of the rate of change from all entries to only the top or bottom symbols based on the selected count.
- Text Size
Adjusts the text size in the table.
==================== Category Table Settings ====================
- Category Table
When checked, the Category Table is displayed on the left side of the screen.
Other settings are similar to the Symbols Table Settings.
==================== Category Settings ====================
- Base Symbol
Sets the symbol used for comparison in each category.
The settings include an ON/OFF checkbox, symbol name, color, and line thickness.
- Category setting field
The settings include an ON/OFF checkbox, category name, color, line thickness, and a text area below.
In the text area, enter the symbols that make up the category, one per line, in the format "symbol" or "symbol*weight", ensuring each entry is on a new line.
You can register up to 10 symbols per category; registering more than 11 symbols will result in an error.
==================== Color Settings ====================
- Table Text
Sets the text color in the table.
- Table Background
Sets the table background color.
- Positive
Sets the display color when the rate of change is positive.
- Negative
Sets the display color when the rate of change is negative.
- Reset Line
When checked, a vertical line is drawn at points where the calculation period changes.
- Label Shift
Specifies the position of the category name labels displayed on the right side of the Spaghetti Chart.
==================== Performance Settings ====================
- Request Bars Count
Sets the number of candlesticks to be called for rate of change calculations.
The smaller the number, the lighter the processing load is expected to be.
----------------------------------------------------------------------------------------------
このインジケーターは、複数のシンボルを一つのカテゴリーにまとめて指定した期間の幾何平均または加重平均騰落率を計算し、Spaghetti Chartとして描画することで、カテゴリー間の強弱の分析を目的としています。
画面左側に各カテゴリーの騰落率、右側に指定したカテゴリーに属するシンボルの騰落率を表示しています。
カテゴリーあたり最大10シンボル、最大20カテゴリーを描画するため、インジケーターの動作が非常に重くなります。
設定のPerformance Settingsから読み込むBarsの数を減らすことで動作が少しだけ軽量になります。
#################### 設定の説明 ####################
- Calculation Method
幾何平均と加重平均を選択できます。
Weightingにチェックを入れると「symbol*weight」となり、計算時にシンボルの重み付けが有効になります。
- ROC Period
騰落率の計算期間を選択します。
計算期間中に新規上場または上場廃止したシンボルが含まれる場合、計算結果はNaNとなります。
- Date and Time
チェックを入れると指定した日時からの騰落率を計算します。
- Base Symbol Basis Chart
チェックを入れるとBase Symbolで設定したシンボル基準での騰落率を表示します。
- Highlight
チェックを入れるとテキストボックスで指定した番号のカテゴリーのみがハイライトされます。
番号はカンマで区切ってください。
==================== Symbols Table Settings ====================
- Symbols Table
チェックを入れると画面右側のSymbols Tableを表示します。
- Select Category
選択した番号のカテゴリーに属するシンボルの騰落率を表示します。
- Display Limit
チェックを入れると騰落率を全件表示から選択した件数の上位下位のみ表示に切り替えます。
- Text Size
テーブルのテキストサイズを変更します。
==================== Category Table Settings ====================
- Category Table
チェックを入れると画面左側のCategory Tableを表示します。
他の設定はSymbols Table Settingsと同様です。
==================== Category Settings ====================
- Base Symbol
各カテゴリーの比較対象となるシンボルを設定します。
設定は左からON/OFFチェックボックス、シンボル名、色、ラインの太さです。
- Category setting field
設定は左からON/OFFチェックボックス、カテゴリー名、色、ラインの太さ、下の段のテキストエリアはカテゴリーを構成するシンボルを入力します。
テキストエリアは、一行ごとに「symbol」または「symbol*weight」のように記述し、必ず改行を行ってください。
最大10シンボルまで登録可能で、11シンボル以上登録するとエラーになります。
==================== Color Settings ====================
- Table Text
テーブルのテキストカラーです。
- Table Background
テーブルの背景色です。
- Positive
騰落率がプラスの時の表示色です。
- Negative
騰落率がマイナスの時の表示色です。
- Reset Line
チェックを入れると計算期間が切り替えるポイントに縦線を描画します。
- Label Shift
Spaghetti Chartの右側に表示するカテゴリー名のラベル位置を指定します。
==================== Performance Settings ====================
- Request Bars Count
騰落率計算時に呼び出すローソク足の本数です。
数値が小さいほど動作が軽量になるはずです。
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.