This indicator provides an econometric nowcasting framework to track transmission risks from Brent crude oil prices and USD/VND exchange rates to Vietnam Consumer Price Index (CPI).
1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
Operating on a monthly chart, it employs a rolling asymmetric Ridge ARDL regression model to evaluate oil price pass-through, seasonality, and model reliability. It plots CPI estimates, split visual bands for impulse transmission, and displays a detailed status dashboard table in a separate pane. Intra-month predictions update dynamically as live monthly oil and exchange rate prices fluctuate.
Rolling asymmetric Ridge ARDL regression model
Oil and exchange rate pass-through nowcasting
Out-of-sample performance metrics and verification
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Nguồn giá dầu Brent
symbol
TVC:UKOIL
maDau
Nguồn tỷ giá USD/VND
symbol
FX_IDC:USDVND
maFX
CPI toàn phần so với tháng trước
symbol
ECONOMICS:VNIRMM
maCPIMoM
CPI toàn phần so với cùng kỳ
symbol
ECONOMICS:VNIRYY
maCPIYoY
CPI nhóm giao thông
symbol
ECONOMICS:VNCPIT
maCPIVanTai
Dạng dữ liệu CPI giao thông
string
Mức chỉ số
kieuVNCPIT
Bật mô hình kênh truyền dẫn trực tiếp
bool
true
useDirectModel
Tuổi dữ liệu CPI tối đa (tháng)
int
2
maxDataAge
Cửa sổ hiệu chuẩn cuốn chiếu (tháng)
int
96
trainLen
Hệ số điều chuẩn Ridge
float
2.0
ridgeLambda
Số năm dùng để khử mùa vụ theo tháng
int
5
seasonYears
Mức biến động hệ số tối đa trong 12 tháng
float
1.00
maxCoefDrift
Show all 40 settings
Setting
Type
Default
Variable
Năm bắt đầu kiểm định
int
2023
validationStartYear
Tháng bắt đầu kiểm định
int
1
validationStartMonth
Số quan sát kiểm định tối thiểu
int
18
minValidationObs
R² ngoài mẫu tối thiểu cho mức tin cậy vừa
float
0.00
minOOSR2Medium
R² ngoài mẫu tối thiểu cho mức tin cậy cao
float
0.10
minOOSR2High
Ngưỡng theo dõi CPI dự báo (% tháng)
float
0.30
forecastWatch
Ngưỡng cảnh báo mạnh CPI dự báo (% tháng)
float
0.50
forecastWarning
Đóng góp dầu tối thiểu để phát tín hiệu (điểm %)
float
0.10
oilContributionMin
Đóng góp dầu tối thiểu để xác nhận truyền dẫn (điểm %)
float
0.10
passThroughMin
Ngưỡng cú sốc dầu để kiểm tra xung đột (%)
float
5.0
nguongSocDau
Tỷ lệ độ trễ cùng dấu tối thiểu
float
0.60
tyLeDoTreCungDau
Dung sai khi kiểm tra dấu tác động (điểm %)
float
0.02
dungSaiDauTacDong
Độ rộng khoảng dự báo tối đa để công bố (điểm %)
float
1.50
doRongKhoangToiDa
Chế độ hiển thị
string
Đọc nhanh
uiMode
Hiển thị bảng thông tin
bool
true
hienBang
Tô nền theo trạng thái
bool
true
hienNen
Hiển thị nhãn tại tháng hiện tại
bool
true
hienNhan
Luôn hiển thị ước lượng thô
bool
true
hienUocLuong
Hiển thị dải dự báo 95%
bool
true
hienKhoang
Hiển thị xung lực / truyền dẫn / khoảng cách
bool
true
hienDongLuc
Tô vùng chênh lệch xung lực–truyền dẫn
bool
true
hienVungKhoangCach
Ngưỡng hiện cột khoảng cách
float
0.25
nguongHienThiGap
Vị trí trung tâm dải truyền dẫn
float
-1.65
banDoNen
Độ cao nửa dải truyền dẫn
float
0.35
doCaoBanDo
Số tháng hiện dự báo ở Đọc nhanh
int
24
soThangKhoangDocNhanh
Số tháng tô nền ở Đọc nhanh
int
36
soThangNenDocNhanh
Ngưỡng xung lực để tô nền sự kiện
float
0.65
nguongNenXungLuc
Ngưỡng khoảng cách để tô nền sự kiện
float
0.35
nguongNenKhoangCach
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
Markov State Engine classifies market conditions into six distinct regimes, including strong trends, weak trends, compression, and expansion. It evaluates historical state transitions using an exit-conditional Markov model with Laplace smoothing to estimate re
AI Debug Helper is a Pine Script indicator that provides AI-powered debugging suggestions for PineScript code. It loads a simulated database of common error patterns such as series index out of bounds, division by zero, Na propagation, infinite loops, and best
Medallion Cipher is a separate-pane indicator that combines a four-state hidden Markov model (bull, bear, range, and crisis) with weighted confluence signals. It can include mean reversion, trend, session timing, pattern matching, Hurst exponent, Shannon entro
This indicator plots an optimal RSI in a separate pane and uses a k-nearest neighbour machine learning routine to adjust lookback and RSI count. It can mark RSI crossings, draw adaptive Bollinger bands around the RSI, and show tables of current settings. Users
This indicator uses a Hidden Markov Model (HMM) framework combined with an adaptive dual moving average engine and Directional Movement Index (DMI) features to identify market regimes (bullish, bearish, or ranging/chop). It calculates regime probabilities on e
This overlay indicator plots a SuperTrend-style band on the price chart using ATR length, a selectable source, and a base factor. Optional settings enable an adaptive factor driven by rate of change, a volatility filter, K-means clustering, and an LSTM layer w