PROTECTED SOURCE SCRIPT
Cập nhật Straddle and Strangle Premium (AlgoStraddle)

# Straddle and Strangle Indicator
## Overview
The **Straddle and Strangle** indicator is a powerful tool designed for options traders to analyze the combined premium behavior of Straddle and Strangle strategies on Indian indices (NIFTY, BANKNIFTY, FINNIFTY, etc.). Unlike simple premium adders, this indicator visualizes the **combined price action as a true candlestick chart**, allowing for precise technical analysis on the strategy itself.
It integrates essential technical indicators—SuperTrend, VWAP, Moving Averages, and Dynamic Support/Resistance—directly onto the combined premium chart, helping traders make informed decisions based on the net value of their positions.
## Key Features
### 1. Accurate Combined Premium Chart
- **True Candlesticks**: Displays the combined Open, High, Low, and Close of the CE and PE options.
- **Spread Ticker Logic**: Uses TradingView's spread syntax (e.g., `NIFTY25DEC26000C + NIFTY25DEC26000P`) to ensure mathematically accurate High/Low calculations, avoiding the "fake wicks" common in simple addition scripts.
- **Toggle View**: Switch between a clean Candlestick chart and a simple Line chart.
### 2. Comprehensive Premium Table (5-Strike Ladder)
- Displays a real-time table on the chart overlay.
- Shows the **Selected Strike** (Center) plus **2 Strikes Above** and **2 Strikes Below**.
- For each strike, view the individual **CE Price**, **PE Price**, and **Combined Premium**.
- Helps in quickly spotting better premiums or potential adjustments without changing inputs.
### 3. Built-in Technical Analysis
Analyze the combined premium just like a regular stock:
- **SuperTrend**: Identifies the trend direction (Bullish/Bearish) of the combined premium.
- **VWAP (Volume Weighted Average Price)**: A key benchmark for intraday direction.
- **Moving Averages**: Configurable SMA, EMA, WMA, or RMA to track momentum.
- **ATR Stop Loss**: Dynamic trailing stop-loss levels based on volatility.
- **Dynamic Support & Resistance**: Automatically plots Swing Highs and Swing Lows to identify breakout or breakdown levels.
### 4. Flexible Strategy Selection
- **Fixed Straddle**: Select a single strike for both CE and PE.
- **Fixed Strangle**: Select different strikes for CE and PE.
- **Multi-Index Support**: Ready-to-use presets for NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY, SENSEX, and BANKEX.
- **Custom Symbol**: Option to manually input any other symbol.
## How to Use
1. **Select Chart Type**: Choose between "Fixed Straddle" or "Fixed Strangle".
2. **Set Symbol & Expiry**: Choose your index (e.g., NIFTY) and enter the Expiry Date (YYYY-MM-DD).
3. **Enter Strikes**:
* For **Straddle**: Enter the ATM strike.
* For **Strangle**: Enter the specific CE and PE strikes.
4. **Analyze**:
* Use the **Candlestick Chart** to read price action.
* Watch for **SuperTrend** flips for trend changes.
* Use **VWAP** as a dynamic support/resistance reference.
* Monitor the **Table** to compare premiums across nearby strikes.
## Alerts
The indicator includes built-in alert conditions for automation:
- **SuperTrend Change**: Bullish/Bearish flips.
- **VWAP Cross**: Price crossing above or below VWAP.
- **Support/Resistance Break**: Price breaking key swing levels.
---
*Designed for precision options analysis.*
## Overview
The **Straddle and Strangle** indicator is a powerful tool designed for options traders to analyze the combined premium behavior of Straddle and Strangle strategies on Indian indices (NIFTY, BANKNIFTY, FINNIFTY, etc.). Unlike simple premium adders, this indicator visualizes the **combined price action as a true candlestick chart**, allowing for precise technical analysis on the strategy itself.
It integrates essential technical indicators—SuperTrend, VWAP, Moving Averages, and Dynamic Support/Resistance—directly onto the combined premium chart, helping traders make informed decisions based on the net value of their positions.
## Key Features
### 1. Accurate Combined Premium Chart
- **True Candlesticks**: Displays the combined Open, High, Low, and Close of the CE and PE options.
- **Spread Ticker Logic**: Uses TradingView's spread syntax (e.g., `NIFTY25DEC26000C + NIFTY25DEC26000P`) to ensure mathematically accurate High/Low calculations, avoiding the "fake wicks" common in simple addition scripts.
- **Toggle View**: Switch between a clean Candlestick chart and a simple Line chart.
### 2. Comprehensive Premium Table (5-Strike Ladder)
- Displays a real-time table on the chart overlay.
- Shows the **Selected Strike** (Center) plus **2 Strikes Above** and **2 Strikes Below**.
- For each strike, view the individual **CE Price**, **PE Price**, and **Combined Premium**.
- Helps in quickly spotting better premiums or potential adjustments without changing inputs.
### 3. Built-in Technical Analysis
Analyze the combined premium just like a regular stock:
- **SuperTrend**: Identifies the trend direction (Bullish/Bearish) of the combined premium.
- **VWAP (Volume Weighted Average Price)**: A key benchmark for intraday direction.
- **Moving Averages**: Configurable SMA, EMA, WMA, or RMA to track momentum.
- **ATR Stop Loss**: Dynamic trailing stop-loss levels based on volatility.
- **Dynamic Support & Resistance**: Automatically plots Swing Highs and Swing Lows to identify breakout or breakdown levels.
### 4. Flexible Strategy Selection
- **Fixed Straddle**: Select a single strike for both CE and PE.
- **Fixed Strangle**: Select different strikes for CE and PE.
- **Multi-Index Support**: Ready-to-use presets for NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY, SENSEX, and BANKEX.
- **Custom Symbol**: Option to manually input any other symbol.
## How to Use
1. **Select Chart Type**: Choose between "Fixed Straddle" or "Fixed Strangle".
2. **Set Symbol & Expiry**: Choose your index (e.g., NIFTY) and enter the Expiry Date (YYYY-MM-DD).
3. **Enter Strikes**:
* For **Straddle**: Enter the ATM strike.
* For **Strangle**: Enter the specific CE and PE strikes.
4. **Analyze**:
* Use the **Candlestick Chart** to read price action.
* Watch for **SuperTrend** flips for trend changes.
* Use **VWAP** as a dynamic support/resistance reference.
* Monitor the **Table** to compare premiums across nearby strikes.
## Alerts
The indicator includes built-in alert conditions for automation:
- **SuperTrend Change**: Bullish/Bearish flips.
- **VWAP Cross**: Price crossing above or below VWAP.
- **Support/Resistance Break**: Price breaking key swing levels.
---
*Designed for precision options analysis.*
Phát hành các Ghi chú
do analysis with candle chartMã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
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ã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
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.