OPEN-SOURCE SCRIPT

Position Avg Line + P/L Table - SightLine Labs

46
Position Avg – SLL is a lightweight position-tracking indicator designed to display a persistent average price level on the chart along with a real-time position summary table.

This script is non-trading and does not generate signals, entries, or exits. It is intended strictly for position awareness and visual reference.

What this indicator does:
Plots a persistent horizontal average price line (dashed by default)

Displays a live position statistics table showing:
Shares owned
Average price
Current price
Unrealized profit/loss in dollars
Unrealized profit/loss in percent
Updates automatically as price changes
Works across all timeframes
Does not depend on broker integration or strategy logic

Key features:

Average Price Line:
User-defined average price input
Persistent across the entire chart
Adjustable color and width
Visibility toggle

Position Table:
Six selectable table positions:
Top Left, Top Center, Top Right, Bottom Left, Bottom Center, Bottom Right
Adjustable text size (Tiny through Huge)
Optional table background fill
Optional inner grid lines
Optional outer frame border

Independent color control for:
Header background
Header text
Value text
Positive and negative P/L values

Chart Overlay Options:
Optional chart background tint
Does not modify the global chart theme

Inputs overview:

Position Settings:
Shares Owned
Average Price

Visual Settings:
Show or hide average price line
Line color and width

Table Settings:
Table position
Table text size

Color Settings:
Header background and text colors
Value text color
Positive and negative P/L colors
Optional table background, grid, and frame colors

How to use:
Add the indicator to a chart
Open the settings panel
Enter the number of shares and the average price
Adjust table position, size, and colors as desired
Use the average price line and table as a visual reference for trade and risk management

Notes and limitations:
This indicator does not place trades
It does not connect to any broker
All values are manually entered
Unrealized P/L is calculated using the chart’s current price
Commissions, fees, and slippage are not included

Disclaimer:

This script is provided for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or trade signals. All trading decisions are the sole responsibility of the user.

Developed by SightLine Labs.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน