OPEN-SOURCE SCRIPT
已更新 iFCPO MPOB Spike

iFCPO MPOB Volume Spike — flags 3x average volume on/near MPOB release day (10th of month).
MPOB releases monthly palm oil supply/demand data on/around the 10th of each month. Volume spikes around release windows often mark institutional positioning.
Detection: volume > 3x SMA(20) AND within +/-2 days of the 10th. Gold flag above bar + bg highlight. Outputs mpob_spike + near_mpob booleans.
FREE indicator from iFCPO — Malaysia palm-oil futures trading platform.
MPOB releases monthly palm oil supply/demand data on/around the 10th of each month. Volume spikes around release windows often mark institutional positioning.
Detection: volume > 3x SMA(20) AND within +/-2 days of the 10th. Gold flag above bar + bg highlight. Outputs mpob_spike + near_mpob booleans.
FREE indicator from iFCPO — Malaysia palm-oil futures trading platform.
版本注释
v2.0 — Polished release.WHAT'S NEW
- 8-row research stats table: days-to-next MPOB countdown, current vol ratio vs 20-bar avg, configurable spike threshold, last-spike timestamp + ratio, state badge (★ MPOB SPIKE NOW / Window armed / Off-window), and an SL trade-adjustment hint (15→25 pts during the window).
- Spike labels stamped above the bar with the actual ratio (e.g. "3.4× vol").
- MPOB window background tint (amber) with a darker tint on the spike bar itself.
- Adjustable table position (4 corners).
- Two alerts: spike fires + window opens (the day the ±2-day MPOB window first turns on).
- Six chainable boolean outputs in the data window for combining with iFCPO Wick Hunter / Regime Meter.
PURPOSE
The Malaysian Palm Oil Board releases monthly stockpiles ≈ 10th of each month. Range expansion historically clusters in the ±2 day window. This indicator flags volume spikes during that window — a regime-change tell, not a directional signal. Use it to widen SL and stay on the sidelines during the imbalance, or to size up after the regime resolves.
PAIRS WITH
iFCPO Regime Meter (gate), iFCPO Wick Hunter (entry), iFCPO Session Law (timing), iFCPO MPOB Cycle Clock (countdown).
版本注释
v3.0 Polish — Calendar bug fixes:1. Replaced `days_in_month = 30` hardcode with proper days-in-current-month math (handles 28/29/30/31 day months + leap years). Previous version produced wrong "days to next MPOB" countdowns 4 months/year (Feb + 31-day months).
2. Added weekend shift logic: if MPOB's calendar 10th falls on Saturday/Sunday, the effective release day shifts to next Monday (11th or 12th). Previous version flagged the wrong window when the 10th was on a weekend.
Ecosystem updates: "Pair with" expanded to include mpob-cycle-clock — Spike is the LIVE event detector, Cycle Clock is the PLANNING/seasonality view (clear differentiation).
Part of the v3.0 free-tier polish wave.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。