Indicator · Pine Script v6 · Own pane

VN Dầu–CPI OB — Split Visual Bands

by Thanhtran-165

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).

View on GitHub

Repaints

GitHub stars2on the repository
Pine versionv6current
Lines of code1,129
Settings40inputs
LicenceNone stated
Last update7 weeks ago4 Sep 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 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.

Details

Published by

Thanhtran-165 on GitHub

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Screeners & dashboards, AI / machine learning

Markets

Forex, Oil & commodities

Timeframes

H4 and above

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Nguồn giá dầu BrentsymbolTVC:UKOILmaDau
Nguồn tỷ giá USD/VNDsymbolFX_IDC:USDVNDmaFX
CPI toàn phần so với tháng trướcsymbolECONOMICS:VNIRMMmaCPIMoM
CPI toàn phần so với cùng kỳsymbolECONOMICS:VNIRYYmaCPIYoY
CPI nhóm giao thôngsymbolECONOMICS:VNCPITmaCPIVanTai
Dạng dữ liệu CPI giao thôngstringMức chỉ sốkieuVNCPIT
Bật mô hình kênh truyền dẫn trực tiếpbooltrueuseDirectModel
Tuổi dữ liệu CPI tối đa (tháng)int2maxDataAge
Cửa sổ hiệu chuẩn cuốn chiếu (tháng)int96trainLen
Hệ số điều chuẩn Ridgefloat2.0ridgeLambda
Số năm dùng để khử mùa vụ theo thángint5seasonYears
Mức biến động hệ số tối đa trong 12 thángfloat1.00maxCoefDrift
Show all 40 settings
SettingTypeDefaultVariable
Năm bắt đầu kiểm địnhint2023validationStartYear
Tháng bắt đầu kiểm địnhint1validationStartMonth
Số quan sát kiểm định tối thiểuint18minValidationObs
R² ngoài mẫu tối thiểu cho mức tin cậy vừafloat0.00minOOSR2Medium
R² ngoài mẫu tối thiểu cho mức tin cậy caofloat0.10minOOSR2High
Ngưỡng theo dõi CPI dự báo (% tháng)float0.30forecastWatch
Ngưỡng cảnh báo mạnh CPI dự báo (% tháng)float0.50forecastWarning
Đóng góp dầu tối thiểu để phát tín hiệu (điểm %)float0.10oilContributionMin
Đóng góp dầu tối thiểu để xác nhận truyền dẫn (điểm %)float0.10passThroughMin
Ngưỡng cú sốc dầu để kiểm tra xung đột (%)float5.0nguongSocDau
Tỷ lệ độ trễ cùng dấu tối thiểufloat0.60tyLeDoTreCungDau
Dung sai khi kiểm tra dấu tác động (điểm %)float0.02dungSaiDauTacDong
Độ rộng khoảng dự báo tối đa để công bố (điểm %)float1.50doRongKhoangToiDa
Chế độ hiển thịstringĐọc nhanhuiMode
Hiển thị bảng thông tinbooltruehienBang
Tô nền theo trạng tháibooltruehienNen
Hiển thị nhãn tại tháng hiện tạibooltruehienNhan
Luôn hiển thị ước lượng thôbooltruehienUocLuong
Hiển thị dải dự báo 95%booltruehienKhoang
Hiển thị xung lực / truyền dẫn / khoảng cáchbooltruehienDongLuc
Tô vùng chênh lệch xung lực–truyền dẫnbooltruehienVungKhoangCach
Ngưỡng hiện cột khoảng cáchfloat0.25nguongHienThiGap
Vị trí trung tâm dải truyền dẫnfloat-1.65banDoNen
Độ cao nửa dải truyền dẫnfloat0.35doCaoBanDo
Số tháng hiện dự báo ở Đọc nhanhint24soThangKhoangDocNhanh
Số tháng tô nền ở Đọc nhanhint36soThangNenDocNhanh
Ngưỡng xung lực để tô nền sự kiệnfloat0.65nguongNenXungLuc
Ngưỡng khoảng cách để tô nền sự kiệnfloat0.35nguongNenKhoangCach
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.

Similar Pine Scripts

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

Indicator v6 AI / machine learningTrend
Updated yesterday · MIT GitHub repository of Markov State Engine [WavesUnchained]

AI Debug Helper

by monch1962
3 stars

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

Indicator v5 AI / machine learningScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of AI Debug Helper

Medallion Cipher

by ricksimpsontrading
3 stars

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

Indicator v6 AI / machine learningMean reversion
Updated 8 days ago · None stated GitHub repository of Medallion Cipher

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

Indicator v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · None stated GitHub repository of Machine Learning: Optimal RSI [YinYangAlgorithms]
46 stars

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

Indicator v5 AI / machine learningTrend
Updated 7 weeks ago · None stated GitHub repository of HMM Enhanced: Regime Probability

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

Indicator v6 TrendVolatility & bands
Updated 4 months ago · MIT GitHub repository of ML SuperTrend (Ultimate) - Auto-Optimized AI with LSTM

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers