OPEN-SOURCE SCRIPT
已更新 Gold Key Level Lines

Overview
Gold Horizontal Lines is a visual grid tool that draws automatic horizontal levels around the current price. It’s designed for symbols like Gold (XAUUSD), but works on any market and timeframe.
What It Does
Draws main, mid, and quarter price levels based on user-defined intervals (e.g. 100 / 50 / 25).
Centers the grid around the current close, above and below by a chosen number of levels.
Adds optional price labels to each line on the right side of the chart.
Deletes and redraws lines only on the last bar to keep the chart clean and efficient.
Inputs
Main Line Interval – distance between key levels (e.g. 100).
Mid / Quarter Intervals – optional extra levels between main lines (set to 0 to disable).
Colors, Styles, Widths – separate settings for main, mid, and quarter lines.
Show Price Labels – toggle labels on/off.
Number of Lines Above/Below Price – controls how far the grid extends.
Gold Horizontal Lines is a visual grid tool that draws automatic horizontal levels around the current price. It’s designed for symbols like Gold (XAUUSD), but works on any market and timeframe.
What It Does
Draws main, mid, and quarter price levels based on user-defined intervals (e.g. 100 / 50 / 25).
Centers the grid around the current close, above and below by a chosen number of levels.
Adds optional price labels to each line on the right side of the chart.
Deletes and redraws lines only on the last bar to keep the chart clean and efficient.
Inputs
Main Line Interval – distance between key levels (e.g. 100).
Mid / Quarter Intervals – optional extra levels between main lines (set to 0 to disable).
Colors, Styles, Widths – separate settings for main, mid, and quarter lines.
Show Price Labels – toggle labels on/off.
Number of Lines Above/Below Price – controls how far the grid extends.
發行說明
OverviewGold Key Level Lines is a visual grid tool that builds automatic horizontal levels around the current price. It was designed for Gold (XAUUSD), but it works on any symbol and any timeframe. The idea is to give you a clean, repeatable structure of “big figure” levels and sub-levels that you can use as support, resistance, and target zones.
Concept – How It Works
Instead of using pivots or indicators, this script creates a fixed price grid based on intervals you choose (for example 100 / 50 / 25).
It takes the current price and “snaps” it to the nearest main interval level.
From that anchor, it steps up and down in equal increments to generate:
Main levels (major zones),
Optional mid levels (halfway between main levels),
Optional quarter levels (finer intraday structure).
Lines are only updated on the last bar and old ones are removed, so the chart stays clean and fast.
This makes the indicator a simple price-geometry tool: it doesn’t predict direction, it just organizes the chart into consistent levels you can trade around.
What It Does
Draws main, mid, and quarter price levels based on user-defined intervals (e.g. 100 / 50 / 25).
Centers the grid around the current close, extending a chosen number of levels above and below price.
Adds optional price labels to each line on the right side of the chart so you can see the exact level.
Uses separate colors and line styles for each level type so you can instantly see which lines are more important.
Deletes and redraws lines only on the last bar to keep the object count low and the script efficient.
Inputs
Main Line Interval – distance between major key levels
(e.g. 100 for XAUUSD → 4100, 4200, 4300…).
Mid / Quarter Intervals – optional additional grids between the main lines
(set to 0 to disable each type).
Colors, Styles, Widths – independent settings for main, mid, and quarter lines so you can build your own visual hierarchy.
Show Price Labels – toggle labels on/off.
Number of Lines Above/Below Price – controls how far the grid extends away from the current price so you can keep the chart focused.
How to Use It
On Gold (XAUUSD), a common setup is:
Main interval = 100
Mid interval = 50
Quarter interval = 25
Use main levels as the higher-timeframe key zones, and mid/quarter levels for intraday entries, scaling, and partial profits.
On other markets, choose an interval that makes sense for that instrument (e.g. 50 or 100 points on indices, 50–100 pips on FX).
Combine the grid with your own strategy (orderflow, structure, indicators).
The script is not a signal generator; it provides a consistent price framework so you can:
Plan entries and exits in advance,
Avoid chasing moves in the “middle of nowhere”,
See where price is relative to important round levels.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。