Lemrin

BitMEX Funding Rate Calculation

This script implements the full funding rate formulas found on the BitMEX site for XBTUSD, ETHUSD, and XRPUSD. It uses the 1-min premium and interest tickers found here on TradingView to calculate an 8-hour TWAP, then uses base initial and maintenance margins to apply caps on absolute rate and delta from prior value. Caps are applicable only to position sizes below 200 XBT. When chart history exceeds the available history of 1min date on TradingView, the indicator switches to 1hr data to provide estimates.

Outputs:
  • Either a check (using 1min data) or a question mark (using 1hr data) upon each new funding period.
  • Current funding rate, every 8 hours.
  • Current funding prediction for the next funding period.
نص برمجي محمي
تم نشر هذا النص البرمجي بمصدر غير مفتوح ويمكنك استخدامه بحرية. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني. لا يمكنك مشاهدة أو تعديل كود المصدر الخاص به.
إخلاء المسؤولية

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

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