**Pivot Points Pro** is a high-performance, institutional-grade support and resistance indicator developed for MetaTrader 5 (2026 Edition). Designed specifically for active technical analysts and systematic traders, it eliminates the visual noise of historical lines by rendering levels **strictly for the active period** while extending them continuously across the entire chart workspace.
* **Native Full-Workspace & Chart Shift Support:** Utilizes a zero-latency vector rendering engine (`OBJPROP_RAY_RIGHT`) that anchors lines to the exact period open (e.g., 00:00) and extends them seamlessly across current price action to the far-right price scale.
* **Dual-Layer Architecture:** Combines hardware-accelerated chart objects for flawless visuals with synchronized indicator buffers (`DRAW_NONE`) to ensure 100% compatibility with MetaTrader 5 **Data Window (`Ctrl+D`)** and automated Expert Advisors (`iCustom`).
* **Multi-Timeframe (MTF) Engine:** Real-time synchronization allowing Daily, Weekly, or Monthly pivots to be displayed on intraday timeframes (M1, M5, M15, H1).
* **5 Institutional Formula Modes:** Classic Floor, Fibonacci, Woodie, Camarilla, and Tom DeMark.
* **Heikin Ashi Filtered Source:** Dynamic transformation of OHLC prices into synthetic Heikin Ashi data to eliminate high-frequency false breakouts.
Pivot Points are computed using the High ($H$), Low ($L$), and Close ($C$) prices from the **previous completed** higher-timeframe bar. The Range is defined as:
1.**Stateful HTF Caching ($O(1)$ Efficiency):** Calculations run only once when a new HTF session bar opens. Subsequent ticks retrieve levels from cached memory.
2.**Extended Ray Objects:** Utilizes `OBJ_TREND` with `OBJPROP_RAY_RIGHT = true` and `OBJPROP_BACK = true`. This prevents line clipping at the live bar index and fills the Chart Shift workspace cleanly.
3.**Smart Label Engine:** Text labels (`OBJ_TEXT`) automatically float into the forward workspace margin (`InpLabelShift` bars ahead) to avoid obscuring the current price action.
4.**Resource Management:** Safe pointer deletion (`CheckPointer`) and prefix-based object purging (`ObjectsDeleteAll`) prevent ghost objects during symbol, timeframe, or parameter updates.
*`InpShowLabels` (*default: `true`*): Toggle text identifiers (PP, R1, S1, etc.) on the chart.
*`InpLabelShift` (*default: `8`*): Offset distance (in bars) extending into the forward chart shift space.
*`InpFontSize` (*default: `8`*): Font size of the text identifiers.
---
## 5. Usage & Trading Interpretation
### 5.1. Directional Bias (The Central Pivot)
* **Bullish Bias:** Price established above $PP$. Look for pullbacks toward $PP$ or momentum continuations toward $R1$, $R2$, and $R3$.
* **Bearish Bias:** Price established below $PP$. Look for pullbacks toward $PP$ or momentum continuations toward $S1$, $S2$, and $S3$.
### 5.2. Mean Reversion vs. Momentum Breakout
* **Ranging Markets (Consolidation):** Support levels ($S1, S2$) act as demand pools; resistance levels ($R1, R2$) act as supply caps. Fades from $S1$ toward $PP$ and $R1$ toward $PP$ offer favorable risk-to-reward ratios.
* **Trending Markets (Breakout Expansion):** A decisive candle close beyond $R1$ or $S1$ confirms momentum, shifting the next targets to $R2/R3$ or $S2/S3$.
### 5.3. Role of Median Lines ($M_1 \dots M_6$)
* Medians serve as early take-profit targets or entry-confirmation zones before committing to full structural target levels.
---
## 6. Indicator Buffer Map (For Developers & EA Integration)
| Buffer Index | Name | Formula / Level | Description |
| :---: | :---: | :---: | :--- |
| **0** | `BufferPP` | $PP$ | Central Pivot Point |
| **6** | `BufferS3` | $S3$ | Third Support Level |
| **7** | `BufferM1` | $(S1 + S2)/2$ | Median Between S1 and S2 |
| **8** | `BufferM2` | $(S1 + PP)/2$ | Median Between S1 and PP |
| **9** | `BufferM3` | $(PP + R1)/2$ | Median Between PP and R1 |
| **10** | `BufferM4` | $(R1 + R2)/2$ | Median Between R1 and R2 |
| **11** | `BufferM5` | $(R2 + R3)/2$ | Median Between R2 and R3 |
| **12** | `BufferM6` | $(S2 + S3)/2$ | Median Between S2 and S3 |
*All buffers return `EMPTY_VALUE` for historical periods outside the active session, maintaining a pristine and deterministic environment for backtesting and automated execution.*