OPEN-SOURCE SCRIPT

Binance Futures Category Tracker

Hİ!
Script Introduction:
This Binance Futures Category Tracker script is used to track the performance of different cryptocurrency categories on Binance Futures. Once the user selects a specific category (e.g., "NFT" or "DeFi"), the script monitors the price changes of 3 different cryptocurrencies associated with that category. The formulas used in the script calculate the price change rates of these coins based on their start time.
Categories:
The script includes categories like "Index", "DeFi", "NFT", "Layer 2", "Gaming", "Web3", "Layer 1", "AI", "Meme", "Oracle", "Metaverse", "Privacy", "Storage", "POW", and "Payment". Three cryptocurrencies are selected for each category. For example, the "DeFi" category uses "UNI", "AAVE", and "SUSHI".
Formula Explanations:
Category Selection (category): The user can select a category, which determines which coins will be used in the script.

Start Time (dft_StartTime): This sets the date when the calculation of price changes begins. For example, it might be April 15, 2021. Price change rates are calculated from this start date onward.

Hide All Plots Option (hideAllPlots): The user can hide all plots on the chart. This option is useful if the user wants to see only selected plots.

Plot and Horizontal Line Calculations:
Plots (plot): The script calculates the price change rates (in percentage) for the three coins of each category and plots them separately for each coin.

plot(Pchg01, "Plot_01", color=color.new(color.yellow, 0), linewidth=1): This line plots the price change rate for coin01 in yellow color and with a line width of 1 pixel.
Other plots are drawn in red and blue colors for the other coins.
Horizontal Line (hline): A horizontal line is drawn on the chart. This line represents the zero (0) value, indicating the point where the price change rate is at its starting point. It helps users visually track how much the price has increased or decreased since the start.

hline(0, color=color.white, linestyle=hline.style_solid): This draws a horizontal white line at zero.
Security Function (f_DFT):
The f_DFT function is used to calculate the price change for each coin. The calculation compares the coin's closing price and lowest price, then computes the percentage change relative to the starting price.

pinescript
Kodu kopyala
f_DFT(_close, _low, _time) =>
_l = float(na)
_l := _time >= dft_StartTime and na(_l[1]) ? _low : _l[1]
_change = (((_close - _l) * 100) / _l)
This function:

_low: Takes the lowest price of the coin.
_close: Takes the closing price of the coin.
_time: Provides the time data.
Thus, the price change percentage for each coin is calculated from the starting time.

Customizable and Open Source:
This script is set to false by default for the option to hide plots, which means that the plots will initially be visible. However, since it is open-source, users can modify the settings or adjust the script according to their preferences. Users can also create their own tracking list or customize the indicators based on the coins and categories they follow.

Result:
This script monitors the price movements of coins from the selected category and visualizes them on the chart. By using different colors for each coin, it ensures that the coins are easily distinguishable. The purpose of the script is to identify which coins have increased the most and which have experienced a decrease.

Since the script is open-source, users can freely modify and share it. It provides an efficient tool to track the performance of different market segments by allowing users to quickly switch between categories and coins...







differenceOscillatorsperformanceperpetualpivotstrategypotentialTrend AnalysisWave Analysis

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?

Penafian