PROTECTED SOURCE SCRIPT

Advanced VWAP Position Sizer

32
Below is a TradingView description for the "Advanced VWAP Position Sizer" script, written in a clear and concise manner suitable for the platform's indicator description field. The description highlights the script's purpose, features, and usage instructions, tailored to its functionality based on the provided code.

---

### Advanced VWAP Position Sizer
**Category:** Custom Indicators
**Type:** Overlay

The **Advanced VWAP Position Sizer** is a powerful trading tool that combines the Volume Weighted Average Price (VWAP) with dynamic position sizing based on your portfolio risk tolerance. This indicator calculates the VWAP with customizable anchor periods and band levels, then determines the optimal trade size to ensure the full distance between the VWAP centerline and a selected band does not exceed 0.3% of your daily portfolio balance. Ideal for day traders seeking to manage risk effectively while leveraging VWAP-based strategies.

#### Key Features:
- **Customizable VWAP**: Adjust the anchor period (Session, Week, Month, Quarter, Year, Decade, Century, Earnings, Dividends, Splits) to reset the VWAP calculation based on your preferred timeframe.
- **Band Calculations**: Displays upper and lower bands using Standard Deviation or Percentage-based multipliers (1.0, 2.0, 3.0), with options to show/hide each band level.
- **Percentage Difference**: Calculates the percentage difference between the VWAP centerline and the selected band (Upper or Lower), automatically chosen based on trade direction (Long/Short).
- **Position Sizing**: Determines the number of shares to trade based on a user-defined portfolio balance and a 0.3% risk limit, accounting for stop loss distance, commissions, and slippage.
- **Interactive Table**: Displays real-time data including Risk per Trade, VWAP-to-Band Distance, Band % Difference, Risk per Share, Shares, and Position Value, with black text for readability.
- **Flexible Entry**: Supports manual entry price or uses the current price, with customizable stop levels relative to the band distance.

#### How to Use:
1. **Input Your Settings**:
- Set your daily **Portfolio Balance** (e.g., $50,000) to reflect your current capital.
- Adjust the **Risk % of Portfolio** (default 0.3%) to define your risk tolerance.
- Choose your **Direction** (Long or Short) and **Band** (Upper, Lower, or Auto by Direction).
- Select **Entry Price** mode (Current Price or Manual) and set a manual entry if needed.
- Configure **VWAP Settings** (Anchor Period, Source, Offset) and **Bands Settings** (Calculation Mode, Multipliers).
- Add **Commission** and **Slippage** per share, and enable **Fractional Shares** if desired.
- Position the table (Top Right, Bottom Right, Top Left, Bottom Left).

2. **Interpret the Table**:
- **Risk / Trade**: Total risk amount based on your portfolio and risk percentage.
- **VWAP→Band Dist**: Dollar distance from VWAP to the selected band.
- **Band % Diff**: Percentage difference between VWAP and the band, ensuring it stays within 0.3% of your portfolio.
- **Risk / Share**: Risk per share including stop distance and costs.
- **Shares**: Recommended number of shares to trade.
- **Position $**: Total position value based on shares and entry price.

3. **Trading Strategy**:
- Use the VWAP as a trend indicator and the bands for potential entry/exit points.
- Adjust your position size to align with the calculated shares, ensuring your risk does not exceed 0.3% of your portfolio balance.
- Monitor the **Entry** and **Stop** plots for trade execution and risk management.

#### Notes:
- This indicator overlays on the price chart and requires volume data to function correctly.
- The table updates on the last bar and may not display on timeframes (1D or above) if "Hide VWAP on 1D or Above" is enabled.
- Ensure your portfolio balance is updated daily to reflect accurate risk calculations.
- Compatible with Pine Script v6; adjust to v5 if compatibility issues arise.

**Disclaimer**: This is not financial advice. Consult a financial advisor and avoid sharing personal identifiable information.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。