OPEN-SOURCE SCRIPT

@tk · spectral

█  OVERVIEW


This script is an indicator that helps traders to identify the price difference between spot and futures of the current crypto plotted into the chart. It works in both types of markets, when the chart is plotting the crypto in spot market, it will compare with its respective futures ticker and vice-versa. If the current asset isn't a crypt ticker, the indicator will not be plotted into the chart.



█  MOTIVATION


Since crypto's derivative market is based on spot market asset's price, to calculate the arbitrage mechanisms that attempts to balance the asset price, this indicator can help traders to identify some spot and futures price divergence that can create an anomaly of funding rate and can push it to an extreme negative — or positive — rate. So, easing to track the price difference between both markets will bring more evidences to identify an artificial price move, specially in crypto assets with low market cap.



█  CONCEPT


The trading concept to use this indicator is the concept of the arbitrage machamism created by exchanges that calculates the funding rate based on spot and futures price difference that will vary from exchange to exchange. This strategy don't works alone. It needs to be aligned together with others indicators like Exponential Moving Averages, Chart Patterns, Support and Resistance, and so on... Even more confluences that you have, bigger are your chances to increase the probability for a successful trade. So, don't use this indicator alone. Compose a trading strategy and use it to improve your analysis.



█  CUSTOMIZATION


This indicator allows the trader to customize the following settings:

GENERAL

Text size
  Changes the font size of price difference table to improve accessibility.
  Type: string
  Options: `tiny`, `small`, `normal`, `large`.
  Default: `small`

Position
  Changes the position of price difference table.
  Type: string
  Options: `top_left`, `top_center`, `top_right`, `middle_left`, `middle_center`, `middle_right`, `bottom_left`, `bottom_center`, `bottom_right`.
  Default: `bottom_right`

Pair Quote
  The ticker quote symbol that will be used to base the ticker comparison from spot to futures (e.g. BTCUSDT which `USDT` is the quote. ETHBTC which `BTC` is the quote).
  Type: string
  Default: USDT

Spectrum Color
  The color of the spectrum candles. Spectrum candles are the candles of the opposite market. If the current ticker is in the spot market, the spectrum candles will be the price of the futures market.
  Type: color
  Default: #434651



█  FUNCTIONS


The indicator contains the following functions:


stripStarts(src, str)
  Strips a defined pattern from a string.
  Parameters:
    src: (string) Source string
    str: (string) String pattern to be stripped from start of source string.
  Returns: (string) Stripped string with matched regex pattern.
arbitragecryptocryptofuturesderivativesdiffforecastingfundingratesOscillatorsSharkspotderivativesspotdiffTKVolatility

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

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

면책사항