OPEN-SOURCE SCRIPT

Daily Protractor

928
Daily Protractor Indicator

Overview
The Daily Protractor is a visually intuitive tool designed for traders who want to analyze price action through angular measurements on a 5-minute chart. By overlaying a protractor on the chart, this indicator helps identify potential support, resistance, and trend directions based on angular relationships from the first 5-minute candle of each day. It’s particularly useful for intraday traders looking to incorporate geometric analysis into their strategies for spot or strike charts.

Key Features
Dynamic Protractor Overlay: Draws a protractor centered on the low of the first 5-minute candle of each day, with customizable radius in both bars (horizontal) and price units (vertical).
Angular Measurements: Displays angles in 5-degree increments, covering a full 360° circle or a 105° to -105° (91° to 269°) half-circle, depending on user preference.

Customizable Display:
Adjust the number of days to display protractors (up to 5 days).
Customize line colors for different angle ranges (0° to 180°, 180° to 360°, and 0° specifically).
Modify line thickness, label size, and label colors for better visibility.
Center Point Highlight: Marks the center of each protractor with a labeled point for easy reference.

Efficient Design:
Optimized with max_lines_count, max_labels_count, and max_bars_back to ensure smooth performance on TradingView.

How It Works
The indicator identifies the first 5-minute candle of each day and uses its low price as the center point for a protractor. It then draws lines at 5-degree intervals, radiating from the center, with each line representing an angle from 0° to 360°. Labels at the end of each line display the angle in degrees, with negative values shown for angles between 195° and 345° (e.g., 270° is displayed as -90°). The protractor’s radius can be adjusted in both time (bars) and price units, allowing traders to scale the tool to their chart’s characteristics.

Usage Instructions
Add to Chart:
Apply the indicator to a 5-minute chart of your chosen instrument (e.g., spot or strike charts).
Interpret the Protractor:
Use the angular lines to identify potential price levels or trend directions.
The 0° line (horizontal) can act as a reference for horizontal support/resistance.
Angles between 0° and 180° (upper half) and 180° and 360° (lower half) are color-coded for quick identification.

Customize Settings:
Toggle the Show 105° to -105° option to display a half-circle (91° to 269°) instead of a full 360° protractor.
Adjust the Radius in Bars and Radius in Price Units to scale the protractor to your chart.
Set the Maximum Days to Display to control how many daily protractors are shown.
Modify line thickness, colors, and label settings to suit your visual preferences.

Customization Options
Protractor Settings:

Show 105° to -105° (91° to 269°): Toggle between a full circle or a half-circle protractor.
Radius in Bars: Set the horizontal span of the protractor (default: 75 bars).
Radius in Price Units: Set the vertical span in price units (default: 1000.0).
Maximum Days to Display: Limit the number of protractors shown (default: 5 days).

Line Settings:
Line Thickness: Adjust the thickness of the protractor lines (1 or 2).
Line Color (0° to 180°): Color for the upper half (default: light blue).
Line Color (180° to 360°): Color for the lower half (default: light red).
Line Color (0°): Color for the 0° line (default: black).
Label Settings:
Label Size: Choose between small, normal, or large labels.
Label Color (0° to 180°): Color for labels in the upper half (default: red).
Label Color (180° to 360°): Color for labels in the lower half (default: green).

Notes
The indicator was designed with the help of Grok3 for use on 5-minute charts only, as it relies on the first 5-minute candle of the day to set the protractor’s center.
For best results, adjust the radius settings to match the volatility and price scale of your instrument. However, where the price is in single digits it is advised to switch off the labels or I would suggest not to use the same.
The protractor can be used alongside other technical tools to confirm trends, reversals, or key price levels.

Limitations: This cannot be used on instruments that trade for more than 75 candles with a timeframe of 5 minutes as the angles would not cover the entire trading window. I am working coming up with a script to address this limitation.

Feedback
I’d love to hear your thoughts! If you find the Daily Protractor helpful or have suggestions for improvements, please leave a comment or reach out. Happy trading!

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.