OPEN-SOURCE SCRIPT
ที่อัปเดต: iFCPO Soyoil Spread

iFCPO Soyoil Spread — z-score divergence between FCPO (Bursa Crude Palm Oil Futures) and CBOT soybean oil (ZL/BO).
WHY IT MATTERS
FCPO and soybean oil are 0.85+ correlated long-run (substitute oils in the global vegetable-oil complex). When the FCPO/BO ratio z-score blows out beyond ±2σ over a 50-day lookback, FCPO is statistically rich or cheap vs the global benchmark. Mean-reversion bias kicks in.
HOW TO USE
- z > +2: FCPO over-extended vs BO — bias short / fade longs
- z < −2: FCPO cheap vs BO — bias long / fade shorts
- |z| < 1: ignore — pairs are tracking normally
- 1 < |z| < 2: stretched, watch for reversal
This is a CONTEXT layer — it modifies conviction. NEVER trade z alone. Pair with iFCPO Wick Hunter (entries) + iFCPO Regime Meter (regime) + iFCPO Session Law (timing).
KPIs
- Lookback: 50 daily bars (configurable)
- Extreme threshold: ±2σ (configurable)
- Symbol: CBOT:ZL1! (TradingView's continuous front-month soybean oil)
OUTPUTS
Dimensionless ratio z (FCPO close / BO close), mean / ±1σ / ±2σ hlines, color-graded line (red rich / green cheap / amber stretched), tinted background at extremes, full status table top-right (FCPO, BO, z, state, pair-with).
Open-source. Part of the iFCPO free hero stack.
WHY IT MATTERS
FCPO and soybean oil are 0.85+ correlated long-run (substitute oils in the global vegetable-oil complex). When the FCPO/BO ratio z-score blows out beyond ±2σ over a 50-day lookback, FCPO is statistically rich or cheap vs the global benchmark. Mean-reversion bias kicks in.
HOW TO USE
- z > +2: FCPO over-extended vs BO — bias short / fade longs
- z < −2: FCPO cheap vs BO — bias long / fade shorts
- |z| < 1: ignore — pairs are tracking normally
- 1 < |z| < 2: stretched, watch for reversal
This is a CONTEXT layer — it modifies conviction. NEVER trade z alone. Pair with iFCPO Wick Hunter (entries) + iFCPO Regime Meter (regime) + iFCPO Session Law (timing).
KPIs
- Lookback: 50 daily bars (configurable)
- Extreme threshold: ±2σ (configurable)
- Symbol: CBOT:ZL1! (TradingView's continuous front-month soybean oil)
OUTPUTS
Dimensionless ratio z (FCPO close / BO close), mean / ±1σ / ±2σ hlines, color-graded line (red rich / green cheap / amber stretched), tinted background at extremes, full status table top-right (FCPO, BO, z, state, pair-with).
Open-source. Part of the iFCPO free hero stack.
Release Note
v2.0 Polish — Two upgrades:1. CRITICAL math fix: Replaced raw FCPO/BO ratio z-score with log-ratio z-score `z(log(FCPO/BO))`. Previous version mixed RM/MT (FCPO) with USD¢/lb (BO) — the resulting ratio drift was dominated by USDMYR + unit-scale, not palm/soy economics. Log-ratio is dimensionally consistent and the z-score now measures relative dislocation around the rolling mean (not arbitrary scale).
2. Repaint fix: Both daily series (BO and FCPO) now pull `close[1]` inside request.security() — locked to confirmed daily bar. Previous version used today's still-forming close which made the z-score noisy intraday.
Header reframed: explicit "STATISTICAL stretch only" disclaimer added — cross-currency arb is imperfect, so read this as a conviction modifier, never an entry.
Ecosystem updates: "Pair with" expanded to include myr-context.
Part of the v3.0 free-tier polish wave.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน