OPEN-SOURCE SCRIPT
Position Avg Line + P/L Table - SightLine Labs

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.
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 الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Developed by SightLing Labs – Ruthless Focus for Market Dominance.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Developed by SightLing Labs – Ruthless Focus for Market Dominance.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.