OPEN-SOURCE SCRIPT

Timeframe Quadrants | InvrsROBINHOOD

116
Timeframe Quadrant Visualizer
Summary
This indicator is a powerful visualization tool designed to help traders analyze price action by dividing various timeframes into four distinct, color-coded quadrants. By breaking down periods from a full year to a single minute, it offers a unique perspective on market cycles and intraday patterns. The script includes fully customizable colors and display styles, allowing you to tailor the visual output to your specific charting needs.

Key Features
Multiple Timeframe Divisions: Choose to divide a Year, Month, Week, Day, Hour, or Minute into four parts.

Customizable Quadrant Logic:

Year: Divided into calendar quarters (Jan-Mar, Apr-Jun, Jul-Sep, Oct-Dec).

Month: Divided into four approximate weeks (Days 1-7, 8-14, 15-21, 22-end).

Week: Divided into four 42-hour blocks, starting from Sunday at 00:00.

Day: Divided into four 6-hour blocks.

Hour: Divided into four 15-minute blocks.

Minute: Divided into four 15-second blocks.

Flexible Display Options: Visualize the quadrants as either a full Background Color overlay or a Bar Overlay that colors the price bars directly.

Timeframe Separators: A vertical line is automatically drawn at the beginning of each selected timeframe (e.g., at the start of each new day when "Day" is selected), making it easy to see where each period begins.

Full Color Customization: All four quadrant colors are user-definable, along with a global transparency setting to ensure the indicator complements your chart without obscuring price action.

Timezone-Aware: All calculations are performed based on a user-selected timezone from a dropdown menu, ensuring accuracy and consistency across different markets and trading sessions. As an added option, there is a manual input if the timezone is not available.

How to Use
Add to Chart: Add the "Timeframe Quadrants" indicator to your chart.

Open Settings: Hover over the indicator's name on your chart and click the Settings (gear) icon.

Configure the Indicator:

Timeframe: Select the primary time period you want to divide (e.g., "Day", "Week", "Hour").

Display Method: Choose whether you want the quadrants to appear as a Background Color or a Bar Overlay.

Timezone: Select the desired timezone from the dropdown menu. This is crucial for aligning the quadrants with specific market sessions (e.g., "America/New_York" for the NYSE session).

Quadrant Colors: Customize the color for each of the four quadrants.

Transparency %: Adjust the transparency of the colors to your preference.

Underlying Concepts
This script operates by using Pine Script's built-in time and date variables. It identifies the current bar's position within the user-selected timeframe (timeframe_choice) and assigns it to one of four quadrants based on pre-defined logic. For example, when "Day" is selected, it uses the hour() function to determine which 6-hour block the current bar falls into. The vertical separator lines are generated by detecting a change in the relevant time unit (e.g., ta.change(dayofmonth)), which marks the first bar of a new period.

Disclaimer: This tool is intended for visual analysis and pattern recognition. It does not generate buy or sell signals and should be used in conjunction with your own trading strategy and risk management. Past performance is not indicative of future results.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.