Aggregated Volume, CVD, Liquidations, Delta

HALDRO Pro+ تم تحديثه   
Aggregate Volume as well as Aggregate Delta, Cumulative Delta and Liquidations. Works on almost all tickers!

  • Takes information about the Volume from 9 exchanges.
  • Calculates Delta and Cumulative Delta on the basis of aggregate Volume .
  • Calculates Liquidations based on spread difference between Futures and Spot Aggregated Volume .
  • Has many ways to calculate volume

This script allows the user to choose from several modes for displaying data, including volume , delta, cumulative delta, and liquidations.
The user can also select how the volume is displayed (in coins, US dollars, or euros) and how it is calculated (sum, average, median, or variance).
There are options to include the volume of the current ticker, show a moving average, and display a table of volumes.
The script aggregates data from several sources and converts currencies as needed. It also has input options for controlling which exchanges and currencies are included in the data.
This script performs several tasks related to processing and displaying data about volume and other metrics.
It includes a function called 'f_volume' that takes a ticker as an input and returns several variables related to the volume of that ticker on various exchanges and in different currencies.
The function first performs string replacement on the ticker to generate several variations that are used to request data from different exchanges and currencies.
It then uses the 'request.security' function to retrieve volume data for each of these variations. Finally, it checks whether the retrieved volume is greater than zero and assigns it to a new variable if this is the case, or assigns zero if not. It allows you to bypass some of the bugs and limitations of TV. The script also includes several input options that allow the user to control which exchanges and currencies are included in the data.
So far, this is the only workable way I've found.

In this tool, you can choose from the following Mode:
  • Volume Mode : This displays the aggregated volume .
  • Delta Mode : This displays the difference between the number of sellers and buyers.
  • Cumulative Delta Mode : This displays the cumulative delta between sellers and buyers.
  • Liquidations Mode : This displays potential liquidations.

You can also select how the volume is displayed in Volume By:
  • COIN : This displays the volume amount in coins on the resolution scale.
  • USD : This displays the volume amount in US dollars on the resolution scale.
  • EUR : This displays the volume amount in euros on the resolution scale.

And choose how it is calculated in Calculate By:
  • SUM : This displays the total volume from all sources.
  • AVG : This displays the average price of the volume from all sources.
  • MEDIAN : This displays the median volume from all sources.
  • VARIANCE : This displays the variance of the volume from all sources.
  • *These changes apply to all Mode types

You can also use the following options:
  • The Volume Checkbox : When turned on, it allows adding the current ticker's volume to the total volume .
  • MA Length : This determines the length of the moving average.
  • The Show MA Checkbox : When turned on, it displays the moving average.
  • Table Period : This determines the length of the period for the candle over which the volume is calculated.
  • Show Table Checkbox : When turned on, it displays the volume table.
  • Liquidation Filter : Change the Liquidation Filter.
  • Cumulative Delta : Lookback period for Cumulative Delta.

I don't pretend to be the best choice for calculating CVD , Delta and Liquidations, the calculations are chosen to be optimal from what I have seen, know, and what TV allows me to do. I have run into the limitations of TV many times and had to give up interesting solutions just to run script it somehow.
If you have any ideas what to add to my work to add more sources or make calculations cooler, suggest in DM .

I recommend studying and trying my similar work for Tickers.
ملاحظات الأخبار:
The tool is now even more powerful!
  • Updated most of the code.
  • Changed the approach to obtaining volume.
  • Now many times more aggregated data is available.
  • Now you can prescribe your own exchanges.
  • Now you can choose the types of currency pairs such as USDC or EUR or DAI and others.
  • Added MFI and OBV indicators with aggregated data.
ملاحظات الأخبار:
Small fix
ملاحظات الأخبار:
Slightly changed the style of the code to get the volume, which made it simpler.
I also added two new methods for volume analysis.
  • Mode: Spot&Perp - Shows two volumes as a line. Green is Spot volume, Red is Futures volume.
  • Mode: Delta(Spot-Perp) - Shows the difference between Spot and Futures Volumes.
Demonstrating spot and futures volume can give the trader the ability to visually assess the relationship between the two types of trading and identify any trends or deviations. It can help a trader understand how volume affects price and how different types of trading can affect the market as a whole.
For example Spot demand is usually a sign of a solid trend.
ملاحظات الأخبار:
A small update.
  • .
    - Since FTX trading is discontinued, the FTX exchange has been replaced by the default MEXC.
  • - Some code has been visually corrected for easier reading.
  • - Thanks to idniilzo he fixed a bug with incorrect display of the volume price, if USD/EUR were selected in the Volume By option.
  • - Also on his advice I have made changes in volumes of some exchanges: 'MEXC', 'BYBIT', 'DERIBIT', 'PHEMEX', 'FTX'. They were showing volume in dollars instead of assets - I fixed that. But you can still choose to display in any form.
  • - Replaced the Current volume option with Data type. Now you can easily choose between Single and Aggregate volume type without touching the other options. *Single mode is not affected by some settings.
*Don't be surprised that the aggregate volume is now smaller.
Its price should now be displayed correctly, since by default volume is counted in assets Volume By (COIN).
Many resources ignore the currency in which exchanges provide volume and aggregate everything into a pile, as I did (but that has now been fixed :)).
Please feel free to write to the DM if you find an error.
ملاحظات الأخبار:
Small hotfix.
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟