PROTECTED SOURCE SCRIPT

PKSE Buy/Sell Signals Table - Two Columns with VWAP

86
ndicator Description: PKSE Buy/Sell Signals Table - Two Columns with VWAP
Overview
The PKSE Buy/Sell Signals Table - Two Columns with VWAP is a robust Pine Script indicator for Pakistan Stock Exchange (PSX) traders. It generates buy and sell signals for 19 PSX stocks based on Simple Moving Average (SMA) crossovers, KSE100 Index trends, and daily Volume Weighted Average Price (VWAP) conditions, displayed in two compact, side-by-side tables optimized for monitor viewing.
Purpose
This indicator helps traders identify high-probability trading opportunities by filtering signals with VWAP to reduce noise, ideal for swing traders, day traders, and investors monitoring PSX stocks.
Key Features
Dual-Table Layout: Displays 19 stocks in two side-by-side tables (10 and 9 stocks) for a monitor-friendly view.

Enhanced Signal Logic: Combines three conditions:
KSE100 Trend: Signals depend on the KSE100 Index being above/below its SMA.

Stock SMA: Signals based on stock price crossing or being above/below its SMA.

Daily VWAP Filter: Buy signals require the stock to be above its daily VWAP; sell signals require it to be below.

Signal Types:
Buy NOW: Stock crosses above SMA, KSE100 is bullish, stock above VWAP.

Buy: Stock above SMA, KSE100 bullish, stock above VWAP.

Sell NOW: Stock crosses below SMA, KSE100 bearish, stock below VWAP.

Sell: Stock below SMA, KSE100 bearish, stock below VWAP.

Neutral: Conditions not fully met.

No Data: Invalid or missing data.

Customizable Inputs:
SMA length (default: 5).

Timeframe (5, 15, 30, 60 minutes, daily; default: 30 minutes).

KSE100 symbol (default: "PSX:KSE100").

Color-Coded Signals: Green (Buy), lime (Buy NOW), red (Sell), orange (Sell NOW), gray (No Data), white (Neutral).

Stock Coverage: Tracks 19 PSX stocks (e.g., FFC, OGDC, HUBC, UBL, MCB, LUCK).

Error Handling: Handles invalid symbols or missing data with "No Data" signals.

How It Works
Fetches KSE100 and stock prices in the selected timeframe (default: 30 minutes) and daily VWAP.

Calculates SMA for KSE100 and stocks; evaluates VWAP position.

Generates signals when all conditions align, based on the 30-minute candle close.

Displays results in two tables (Stock, Signal, Timeframe) at top-right and top-center.

Usage Instructions
Add the indicator to your TradingView chart.

Configure inputs: SMA length, timeframe, KSE100 symbol.

View tables showing signals for 19 PSX stocks.

Use signals to guide trading, combining with other analysis.

Adjust table positions if needed (modify position.top_right/top_center).

Ideal For
PSX traders using SMA and VWAP strategies.

Swing/day traders seeking filtered signals.

Investors tracking KSE100 and stock trends.

Limitations
Limited to 19 stocks due to TradingView’s 40-security-call limit.

Signals rely on SMA, VWAP, and KSE100; combine with other analysis.

Hardcoded stock list; contact the author for customizations.

Notes
Verify stock symbols are valid on your TradingView platform.

Best on 1920x1080+ resolution. Adjust chart scaling if tables overlap.

Published on June 12, 2025, at 11:50 AM PKT.

Disclaimer
Trading carries risk. This indicator is for informational purposes only and not financial advice. Conduct your own research before trading.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.