OPEN-SOURCE SCRIPT
Options Pivot Smile

## Options Pivot Smile
**Options Pivot Smile** is a visual market-structure indicator that transforms classic daily pivot levels into a smooth, bell-shaped “smile curve.” It is designed to help traders understand price equilibrium, directional bias, and volatility expansion using historically anchored support and resistance zones.
The script is optimized for discretionary analysis, options structure mapping, and futures market context.
---
### Core Concept
This indicator calculates **previous-day Pivot, S1, S2, R1, and R2** levels and projects them backward across configurable historical widths. These anchor points are then connected using a **Catmull–Rom spline**, producing a smooth bell-shaped curve that represents market balance and skew.
The result is a **visual distribution of price pressure**, rather than static horizontal levels.
---
### Key Features
#### 1. Daily Pivot-Based Levels
* Uses **previous daily High, Low, Close**
* Calculates:
* Pivot (P)
* Support: S1, S2
* Resistance: R1, R2
* Optional **pivot shift** for futures or synthetic instruments
* Optional **spread rounding** for options strike alignment
---
#### 2. Historical Anchor Projection
Each level is placed at a different historical distance:
* **R2 / S2** → farthest back
* **R1 / S1** → medium range
* **Pivot** → nearest anchor
This spacing creates the structural foundation for the bell curve.
---
#### 3. Smile / Bell Curve Visualization
* Smooth curve generated using **Catmull–Rom spline interpolation**
* Adjustable smoothness (number of curve segments)
* Customizable color and line width
* Represents equilibrium, skew, and volatility structure
---
#### 4. Structural Aids
Optional visual components include:
* Horizontal projection lines to the current bar
* Dotted straight connecting lines between anchor points
* Anchor dots at each pivot level
* Adaptive-width level boxes scaled by ATR
---
#### 5. Professional Styling Controls
* Line style: Solid / Dotted / Dashed
* Adjustable strike line width
* Independent colors for:
* S2, S1
* Pivot
* R1, R2
* Box opacity, borders, and label text colors
---
### Use Cases
* Market balance and mean-reversion analysis
* Options strike clustering and distribution framing
* Futures pivot bias visualization
* Contextual support/resistance mapping
* Intraday and swing structure reference
---
### Notes & Limitations
* This is a **visual analytical tool**, not a trading strategy
* Does not generate buy/sell signals
* Best used in conjunction with price action, volume, or volatility tools
* Requires sufficient historical bars to render the full structure
---
### Recommended Timeframes
* Intraday (5m–30m) for structure context
* H1–H4 for swing equilibrium
* Works on all symbols with daily data availability
---
**Options Pivot Smile** converts traditional pivot math into an intuitive visual distribution, helping traders see market structure as a curve rather than isolated lines.
**Options Pivot Smile** is a visual market-structure indicator that transforms classic daily pivot levels into a smooth, bell-shaped “smile curve.” It is designed to help traders understand price equilibrium, directional bias, and volatility expansion using historically anchored support and resistance zones.
The script is optimized for discretionary analysis, options structure mapping, and futures market context.
---
### Core Concept
This indicator calculates **previous-day Pivot, S1, S2, R1, and R2** levels and projects them backward across configurable historical widths. These anchor points are then connected using a **Catmull–Rom spline**, producing a smooth bell-shaped curve that represents market balance and skew.
The result is a **visual distribution of price pressure**, rather than static horizontal levels.
---
### Key Features
#### 1. Daily Pivot-Based Levels
* Uses **previous daily High, Low, Close**
* Calculates:
* Pivot (P)
* Support: S1, S2
* Resistance: R1, R2
* Optional **pivot shift** for futures or synthetic instruments
* Optional **spread rounding** for options strike alignment
---
#### 2. Historical Anchor Projection
Each level is placed at a different historical distance:
* **R2 / S2** → farthest back
* **R1 / S1** → medium range
* **Pivot** → nearest anchor
This spacing creates the structural foundation for the bell curve.
---
#### 3. Smile / Bell Curve Visualization
* Smooth curve generated using **Catmull–Rom spline interpolation**
* Adjustable smoothness (number of curve segments)
* Customizable color and line width
* Represents equilibrium, skew, and volatility structure
---
#### 4. Structural Aids
Optional visual components include:
* Horizontal projection lines to the current bar
* Dotted straight connecting lines between anchor points
* Anchor dots at each pivot level
* Adaptive-width level boxes scaled by ATR
---
#### 5. Professional Styling Controls
* Line style: Solid / Dotted / Dashed
* Adjustable strike line width
* Independent colors for:
* S2, S1
* Pivot
* R1, R2
* Box opacity, borders, and label text colors
---
### Use Cases
* Market balance and mean-reversion analysis
* Options strike clustering and distribution framing
* Futures pivot bias visualization
* Contextual support/resistance mapping
* Intraday and swing structure reference
---
### Notes & Limitations
* This is a **visual analytical tool**, not a trading strategy
* Does not generate buy/sell signals
* Best used in conjunction with price action, volume, or volatility tools
* Requires sufficient historical bars to render the full structure
---
### Recommended Timeframes
* Intraday (5m–30m) for structure context
* H1–H4 for swing equilibrium
* Works on all symbols with daily data availability
---
**Options Pivot Smile** converts traditional pivot math into an intuitive visual distribution, helping traders see market structure as a curve rather than isolated lines.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.