OPEN-SOURCE SCRIPT
已更新 Diff Price (Future - Spot)

Diff Line (Future – Spot) plots a grid of spot-price levels derived from the current futures price.
It rounds the current futures price up to the nearest price block (e.g. every 25 points), then subtracts a user‑defined Diff (Future – Spot) to find the main spot level and draws that as the central line. Additional lines are plotted above and below at equal block distances, with labels showing both Future and Spot values (e.g. 4250 (4215)), plus a compact diff info box for quick reference.
It rounds the current futures price up to the nearest price block (e.g. every 25 points), then subtracts a user‑defined Diff (Future – Spot) to find the main spot level and draws that as the central line. Additional lines are plotted above and below at equal block distances, with labels showing both Future and Spot values (e.g. 4250 (4215)), plus a compact diff info box for quick reference.
版本注释
Diff Price (Future – Spot)This script draws horizontal price levels based on the difference between a Futures chart and its Spot price.
It calculates a “main” Spot level from the current Futures price and the input Diff value, then plots equally spaced lines above and below that level.
How it works
- Assumes the current chart is the Futures price.
- Rounds the Futures price to the nearest grid defined by Block Trade Distance.
- Computes the main Spot level as: Future block – Diff (Future – Spot).
- Draws the main line plus a user‑defined total number of lines above and below, spaced by the block distance.
- Optional labels show both prices in the format Future (Spot).
Basic usage
- Add the script to a Futures chart.
- Set Block Trade Distance to your desired grid size (e.g. 25).
- Set Diff (Future – Spot) to the current spread between Futures and Spot.
- Adjust Total number of lines (including main line) to control how many levels are shown.
- (Optional) Customize line color, style, and label appearance in the settings.
Use these levels to visualize where Futures and Spot prices align across a consistent grid of price blocks.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。