OPEN-SOURCE SCRIPT
Updated iFCPO MYR Context

iFCPO MYR Context — USDMYR strength gauge + 30-day FCPO↔USDMYR correlation flag for Bursa Crude Palm Oil Futures.
WHY IT MATTERS
The Malaysian ringgit drives FCPO export competitiveness. Soft MYR (USDMYR rising) makes Malaysian palm oil cheaper for foreign buyers — bullish FCPO. Strong MYR (USDMYR falling) hurts exporters — bearish FCPO. But the FCPO/MYR relationship isn't always live: when correlation is decoupled (|r| < 0.3), the MYR signal is noise. This indicator gauges both USDMYR strength AND tells you when to listen.
HOW TO USE
- USDMYR > 30-day MA by +0.5%: Soft MYR — FCPO tailwind (bullish bias)
- USDMYR < 30-day MA by −0.5%: Strong MYR — FCPO headwind (bearish bias)
- |corr| > 0.5: Relationship is live — apply MYR bias
- |corr| < 0.3: Decoupled — IGNORE the MYR signal entirely
This is a SIZE / SL MODIFIER — it adjusts conviction, not entries. Pair with iFCPO Wick Hunter (entries) + iFCPO Regime Meter (regime) + iFCPO Session Law (timing).
KPIs
- Lookback: 30 daily bars (configurable)
- Strong correlation threshold: |r| ≥ 0.5
- Default symbol: FX_IDC:USDMYR (free TV symbol)
OUTPUTS
USDMYR daily, % deviation vs 30-day MA, 30-day FCPO↔USDMYR correlation, color-graded line (green soft / red strong / grey neutral), full status table top-right (USDMYR, deviation %, correlation strength, bias, pair-with).
Open-source. Part of the iFCPO free hero stack.
WHY IT MATTERS
The Malaysian ringgit drives FCPO export competitiveness. Soft MYR (USDMYR rising) makes Malaysian palm oil cheaper for foreign buyers — bullish FCPO. Strong MYR (USDMYR falling) hurts exporters — bearish FCPO. But the FCPO/MYR relationship isn't always live: when correlation is decoupled (|r| < 0.3), the MYR signal is noise. This indicator gauges both USDMYR strength AND tells you when to listen.
HOW TO USE
- USDMYR > 30-day MA by +0.5%: Soft MYR — FCPO tailwind (bullish bias)
- USDMYR < 30-day MA by −0.5%: Strong MYR — FCPO headwind (bearish bias)
- |corr| > 0.5: Relationship is live — apply MYR bias
- |corr| < 0.3: Decoupled — IGNORE the MYR signal entirely
This is a SIZE / SL MODIFIER — it adjusts conviction, not entries. Pair with iFCPO Wick Hunter (entries) + iFCPO Regime Meter (regime) + iFCPO Session Law (timing).
KPIs
- Lookback: 30 daily bars (configurable)
- Strong correlation threshold: |r| ≥ 0.5
- Default symbol: FX_IDC:USDMYR (free TV symbol)
OUTPUTS
USDMYR daily, % deviation vs 30-day MA, 30-day FCPO↔USDMYR correlation, color-graded line (green soft / red strong / grey neutral), full status table top-right (USDMYR, deviation %, correlation strength, bias, pair-with).
Open-source. Part of the iFCPO free hero stack.
Release Notes
v2.0 Polish — Bug fix: Eliminated daily close intraday repaint. Previous version pulled today's still-forming USDMYR daily close into the % vs MA + 30-day correlation, which made the on-chart bias signal noisy/non-deterministic during the day. Now uses `close[1]` inside request.security() for both USDMYR and FCPO daily series — readings reflect the most recent CONFIRMED daily close.Header reframed as "heuristic" — MYR/FCPO economic relationship is a macro rule-of-thumb, not a backtested edge. The on-chart correlation flag tells you whether the relationship is currently active (|r|>0.5) or decoupled (ignore).
Ecosystem updates: "Pair with" expanded to include soyoil-spread (cross-market context).
Part of the v3.0 free-tier polish wave.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.