OPEN-SOURCE SCRIPT
The MF Rounded Levels

This is a standalone utility indicator designed to draw a custom horizontal grid on your chart. It focuses on "Rounded Levels" (psychological price levels like 1900.00, 1905.00, etc.), which are often significant in trading assets like Gold (XAUUSD).
Here is a breakdown of how it works:
1. Dynamic Visible Range
Smart Drawing: Unlike standard grid tools that might draw lines everywhere, this script calculates the High and Low of the prices currently visible on your screen.
Efficiency: It only draws lines within that specific vertical range. If you scroll the chart, it recalculates and redraws the lines instantly.
2. Two-Tier Grid System
It distinguishes between two types of levels to help you visualize price structure better:
Primary Step: The base increment (default is 5.0). These are the standard grid lines.
Major Step: A larger increment (default is 15.0). These lines overlap with the primary ones but can be styled differently (e.g., thicker, darker, or solid) to mark more significant levels.
3. Customization & Styling
You have full control over the visuals via the settings menu:
Styles: Choose between Solid, Dotted, or Dashed lines.
Colors & Widths: Set different colors and line thicknesses for Primary vs. Major lines.
4. Auto-Hide Feature
Timeframe Filter: The script includes logic to automatically hide the grid if you switch to a timeframe higher than 4 Hours (H4). This prevents the chart from looking cluttered on Daily or Weekly views where 5-point increments would be too dense.
Here is a breakdown of how it works:
1. Dynamic Visible Range
Smart Drawing: Unlike standard grid tools that might draw lines everywhere, this script calculates the High and Low of the prices currently visible on your screen.
Efficiency: It only draws lines within that specific vertical range. If you scroll the chart, it recalculates and redraws the lines instantly.
2. Two-Tier Grid System
It distinguishes between two types of levels to help you visualize price structure better:
Primary Step: The base increment (default is 5.0). These are the standard grid lines.
Major Step: A larger increment (default is 15.0). These lines overlap with the primary ones but can be styled differently (e.g., thicker, darker, or solid) to mark more significant levels.
3. Customization & Styling
You have full control over the visuals via the settings menu:
Styles: Choose between Solid, Dotted, or Dashed lines.
Colors & Widths: Set different colors and line thicknesses for Primary vs. Major lines.
4. Auto-Hide Feature
Timeframe Filter: The script includes logic to automatically hide the grid if you switch to a timeframe higher than 4 Hours (H4). This prevents the chart from looking cluttered on Daily or Weekly views where 5-point increments would be too dense.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。