VN Stock Risk + RS CombinedDescription
This script is a cycle-based risk and relative strength indicator designed for the Vietnam stock market.
It combines:
Market Risk (long-term cycle & trend extension)
Relative Strength (RS) versus VN-Index
The goal is to identify stocks that are not overheated and are outperforming the broader market.
How it works
The indicator calculates:
Risk score (0–1) using:
Deviation from long-term cycle SMA
Price distance from 40-week MA
Medium-term flow (20W / 40W MA)
Relative Strength (RS):
Stock price divided by VN-Index price
Compared to RS 40-week MA
How to use
Timeframe: Weekly only
Green zone: Low risk + RS above MA → accumulate / hold
Yellow zone: Mixed signals → wait
Red zone: High risk or weak RS → avoid / reduce exposure
Rule of thumb:
Buy stocks with lower risk than VN-Index and RS above its 40-week MA.
Intended use
Mid-to-long-term investing
Portfolio allocation
Avoiding market tops
❌ Not for day trading or scalping
Pine Script®指标






















