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.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.