OPEN-SOURCE SCRIPT
Güncellendi Price Levels by Market Cap (Manual)

This indicator will forecast the price by marketcap. The crypto's current circulating supply should be inputted manually.
Sürüm Notları
This Pine Script code is designed for TradingView and is titled "Price Levels by Market Cap (Dynamic)". It dynamically calculates and displays price levels based on the market capitalization of a cryptocurrency, allowing users to visualize important price levels on their charts.Key Features:
Dynamic Currency Handling: The script automatically determines the base currency of the chart using syminfo.basecurrency.
User Inputs:
- Manual Circulating Supply: Users can input a manual circulating supply to override the dynamic calculation.
- Manual Market Caps: Users can specify custom market cap levels as a comma-separated string.
Data Retrieval:
The script fetches the market cap data for the specified cryptocurrency using the request.security function, formatted as "CRYPTOCAP:<baseCurrency>".
It also retrieves the current price of the security being analyzed.
Error Handling:
If the market cap data is unavailable and the user has not provided a manual circulating supply, an error message is displayed in a table at the center of the chart.
Circulating Supply Calculation:
If a manual circulating supply is provided, it is used directly; otherwise, the script calculates the circulating supply by dividing the market cap by the price.
Market Cap Levels:
The script calculates price levels based on user-defined or dynamically calculated market caps and stores them in arrays.
Debugging Information:
A debug table displays essential information, including the market cap, price, and calculated circulating supply, when debug mode is enabled.
Visualization:
The script draws horizontal lines on the chart to represent the calculated price levels based on market caps.
It also labels these price levels with formatted market cap values (in millions, billions, or trillions) on the last bar of the chart.
Overall, this script provides a comprehensive tool for traders and analysts to visualize price levels based on market capitalization, with flexibility for manual adjustments and robust error handling.
Sürüm Notları
Update:- Debug mode was set to false by default.
- Error when market cap data is not available was made into 2 lines to be viewed more easily on mobile devices.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.