tartigradia

Inter-Exchanges Crypto Price Spread Deviation (Tartigradia)

tartigradia 업데이트됨   
Measures the deviation of price metrics between various exchanges. It's a kind of realized volatility indicator, as the idea is that in times of high volatility (high emotions, fear, uncertainty), it's more likely that market inefficiencies will appear for the same asset between different market makers, ie, the price can temporarily differ a lot. This indicator will catch these instants of high differences between exchanges, even if they lasted only an instant (because we use high and low values).

Both standard deviation and median absolute deviation (more robust to outliers, ie, exchanges with a very different price from others won't influence the median absolute deviation, but the standard deviation yes).

Compared to other inter-exchanges spread indicators, this one offers two major features:
* The symbol automatically adapts to the symbol currently selected in user's chart. Hence, switching between tickers does not require the user to modify any option, everything is dynamically updated behind the scenes.
* It's easy to add more exchanges (requires some code editing because PineScript v5 does not allow dynamical request.security() calls).

Limitations/things to know:
* History is limited to what the ticker itself display. Ie, even if the exchanges specified in this indicator have more data than the ticker currently displayed in the user's chart, the indicator will show only a timeperiod as long as the chart.
* The indicator can manage multiple exchanges of different historical length (ie, some exchanges having more data going way earlier in the past than others), in which case they will simply be ignored from calculations when far back in the past. Hence, you should be aware that the further you go in the past, the less exchanges will have such data, and hence the less accurate the measures will be (because the deviation will be calculated from less sources than more recent bars). This is thanks to how the array.* math functions behave in case of na values, they simply skip them from calculations, contrary to math.* functions.
릴리즈 노트:
* Fix small typos in comments and clarify what needs to be done to add one exchange
릴리즈 노트:
* Fix unintelligible sentence in description because of missing words. Here is the corrected version:

Two methods of calculation of deviation are offered: standard deviation and median absolute deviation (more robust to outliers, ie, exchanges with a very different price from others won't influence the median absolute deviation, but the standard deviation yes).

* Also, here is the list of currently implemented exchanges:
INDEX (tradingview historical data)
CRYPTO
BINANCE
KRAKEN
POLONIEX
COINBASE
BITFINEX
GEMINI
릴리즈 노트:
Changes:
* Deduplicated code between different ways of calculating deviations.
* Added option to bicolor cloud, so that we can infer buying and selling pressures from volatility.
* Added threshold to standardize sizing across timescales.
* Added background highlight depending on whether high and/or low are beyond threshold.

How to use:
  • If cloud is bicolor, colorize the cloud in green for the high deviation, and red for the low deviation, which can be seen as representing buying pressure vs selling pressure respectively.
  • If cloud is monocolor (or if you look at bicolor cloud's entire size), this can be seen as a quantification of overall volatility across market makers, and hence a sign of a potential upcoming big move.
  • Background is highlighted depending on if high and/or low are beyond threshold: yellow if both are (meaning potential upcoming big move, stronger than either green or red highlight because both buying and selling pressure are through the roof, but not indication about the direction), green if high only (buying pressure may be more important), red if only low is beyond threshold (selling pressure may be more important), no color otherwise.
릴리즈 노트:
Changes:
* Replace label with a table, so that the chart is maximally rescaled to the content (the calculated metrics) rather than the label.
* Add a high-low deviations histogram plot, which answers the question: are highs (green cloud) more volatile (bigger) than lows (red cloud)?
* Increase opacity of background highlight.

How to use the histogram (this is in addition to the other "How to use" instructions above):
* The histogram/columns plot answers the simple question: are highs more volatile or are lows? By simply subtracting high deviation - low deviation, we obtain the answer, as a histogram plot, where bars can only appear one side: above zero and green means that highs are more volatile than lows and presumably this indicates more buying pressure; below zero and red means lows are more volatile and may indicate more selling pressure; around zero below the user-defined margin will be gray and means that the value is not significantly deviating from zero so there is no direction - this does not mean that there is no pressure, but the pressure may be there but balanced (about as much high volatility as low volatility, in some cases the background can be highlighted in yellow simultaneously to a 0 histogram value which means that there is high pressure on both sides).
* Note that there is absolutely zero smoothing of data over time, so the clouds and histograms really reflect per-bar resolution data, with no influence of past bars. There is however an aggregation done between exchanges data feeds, as part of the deviation calculation, so there is some loss of accuracy in terms of values that is unavoidable.
릴리즈 노트:
Changes:
* Modularize (ie, reuse updated library to deduplicate code and ease maintenance). No change in functionalities compared to previous release.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

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