PROTECTED SOURCE SCRIPT

Time Cycles [TMU]

501
Title: Time Cycles [TMU]
Description:

This indicator is a comprehensive Time-Based Market Structure tool designed to segment the trading day into fixed temporal windows using New York Time logic. Unlike standard price-lagging indicators (like MA or RSI), this script focuses purely on Time and Price geometry, visualizing how price action behaves within specific 90-minute, 30-minute, and 10-minute intervals.

It is engineered to help traders visualize the "Time" component of the chart by projecting historical high/low ranges and key opening prices automatically using advanced array management.

Underlying Logic & Calculation
The script operates on a fixed time schedule (defaulting to America/New_York timezone) to generate three distinct layers of analysis:

1. The "Previous 90-Minute Cycle" Engine The script identifies fixed 90-minute blocks starting from 02:30 NY time.

Logic: At the close of each 90-minute window, the script records the Highest High and Lowest Low of that specific session .

Projection (PCH/PCL): These levels are projected forward into the next 90-minute window as static support/resistance zones (PCH - Previous Cycle High, PCL - Previous Cycle Low) using a "Step-Locked" mechanism that prevents repainting of the projected level.

Equilibrium (EQ): The script automatically calculates the 50% mean level between the PCH and PCL to highlight the premium/discount midpoint of the previous range.

2. Intraday Cycle Phases The indicator visualizes the fractal nature of time by highlighting specific 30-minute and 90-minute sessions.

Phases: The script categorizes sessions into three customizable structural phases: Accumulation (Blue), Manipulation (Red), and Distribution (Green). This helps traders identify the potential intent of price action within a specific time window.

Visualization: It draws background ranges based on hard-coded timestamps (e.g., 02:30–04:00 for the first London cycle) to visually segregate market phases.

3. Key Opening Price Anchors The script plots significant "Time Opens" that act as institutional reference points.

Midnight Open (00:00 NY): The exact opening price of the day.

09:30 Open: The standard US Equity Market Open price.

Weekly/Yearly Opens: Uses non-repainting request.security calls to fetch higher-timeframe open prices.

Cycle Open (C.O.): The opening price of the current 90-minute macro bucket.

Unique Features & Originality
This script implements custom algorithmic solutions to manage time-based data, distinguishing it from standard library indicators:

Custom 10-Minute Box Arrays: Unlike standard security calls, this script uses a box[] array system to capture and render 10-minute micro-structures (tenBoxes) directly on the chart. It calculates the High/Low of every 10-minute block dynamically and stores them in a rolling array to visualize sub-fractal structure without changing timeframes.

Object-Oriented Line Management: To optimize performance and maintain a clean chart, the script employs a custom User-Defined Type (type Lines). This allows for an advanced "garbage collection" method (manage_lines) that automatically trims, extends, or deletes opening lines based on the current time, ensuring that historical data does not clutter the workspace.

Predictive "Step-Locked" Projection: The code utilizes a logic state that locks the previous cycle's coordinates (prevCycHigh, prevCycLow) only upon the confirmed close of the session, projecting these specific coordinates forward using box.new rather than plot, allowing for precise, interactive visual blocks.

How to Use
PCH/PCL Boxes: Use the projected boxes from the previous 90m cycle as potential Support (PCL) or Resistance (PCH) for the current cycle.

EQ Line: The orange line represents the "Fair Value" of the previous range.

Settings: Users can toggle visibility for 30m cycles, 10m boxes, and opening lines independently to suit their strategy.

Disclaimer: This tool is for structural analysis and visualization of time windows. It does not guarantee future price movement. Past performance is not indicative of future results.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.