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에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?