OPEN-SOURCE SCRIPT
FCPO KDJ Tower HA EMA Strategy

FCPO 5-Min Strategy Backtest v1 — A day-trading strategy for FCPO (Malaysia Crude Palm Oil Futures, BMD:FCPO1!) built on a 5-layer confluence system: KDJ + Tower (Baota) + Heikin Ashi + EMA20 + MACD. It uses the exact same entry logic as the companion "FCPO 5min Signal System v2" indicator, converted to the Strategy Tester to validate signal quality.
Entry Conditions (all 5 layers must align):
- Layer 1 — Trend filter: price above EMA20 = long only; below EMA20 = short only
- Layer 2 — Momentum: MACD histogram direction (5,20,5)
- Layer 3 — Extreme signal: KDJ J value < 20 (oversold) or > 80 (overbought)
- Layer 4 — Candle confirmation: Heikin Ashi direction matches raw candle close direction
- Layer 5 — Final filter: Tower (Baota) line flips red (bullish) / green (bearish)
- Entries only when flat; each signal fires once, on the first bar all conditions align
Exit Rules (intraday discipline):
- Fixed stop-loss / take-profit: 8 points each by default (1 lot = RM25 per point, i.e. RM200 / RM200)
- Max holding time: 60 bars by default (can be disabled)
- End-of-day liquidation at 17:45 — no overnight positions
- No new entries after 17:15 (MYT)
Backtest Settings: commission RM12.5/lot and 1-tick slippage included; initial capital 10,000, fixed 1 lot.
How to Use: Open FCPO1! (or BMD:FCPO1!) on a 5-minute chart — keep regular candlesticks (do NOT enable Heikin Ashi candles, as fill prices would be distorted) — add the strategy, then open the Strategy Tester. All parameters (EMA / KDJ / MACD / stop-take points / time windows) are adjustable in the settings panel.
Disclaimer: This script is a technical-analysis tool for validation only. Backtest results do not guarantee future performance, and this is not financial advice. Futures trading involves high risk; always use proper risk management and stop-loss discipline.
FCPO 5分钟 策略回测 v1 —— 基于 KDJ + 宝塔线 + Heikin Ashi + EMA20 + MACD 五层共振入场系统的 FCPO(马来西亚棕榈油期货,BMD:FCPO1!)日内交易策略,与「FCPO 系统警报 v2」指标使用同一套入场逻辑,用于在策略回测器中验证信号质量。
入场条件(五层全部满足才开仓):
- 第1层 大方向:价格在 EMA20 上方只做多,下方只做空
- 第2层 动量背景:MACD 柱状线方向(5,20,5)
- 第3层 极端信号:KDJ J 值 < 20(KDJL)或 > 80(KDJH)
- 第4层 K线确认:Heikin Ashi 同向 + 普通K线收盘同向
- 第5层 最终过滤:宝塔线翻红 / 翻绿
- 只在空仓时进场,信号首次满足时只触发一次
出场规则(按日内交易纪律):
- 固定止损 / 止盈:默认各 8 点(1手合约每点 = RM25,即 RM200 / RM200)
- 最长持仓超时:默认 60 根K线(可关闭)
- 日内强平:17:45 触发清仓,不留隔夜仓
- 17:15 后不开新仓
回测设置:已含手续费(RM12.5/手)与滑点(1 tick);初始资金 10,000,固定 1 手。
使用方法:FCPO1!(或 BMD:FCPO1!)5 分钟图 → 保持普通K线蜡烛模式(不要开 Heikin Ashi 蜡烛,否则成交价失真)→ 添加策略 → 打开策略回测器查看结果。EMA / KDJ / MACD / 止损止盈点数 / 时间窗口等参数均可在设置面板调整。
提醒:本策略仅为技术分析验证工具,回测结果不代表未来表现,不构成任何投资建议。期货交易风险高,请务必配合资金管理与止损纪律。
Entry Conditions (all 5 layers must align):
- Layer 1 — Trend filter: price above EMA20 = long only; below EMA20 = short only
- Layer 2 — Momentum: MACD histogram direction (5,20,5)
- Layer 3 — Extreme signal: KDJ J value < 20 (oversold) or > 80 (overbought)
- Layer 4 — Candle confirmation: Heikin Ashi direction matches raw candle close direction
- Layer 5 — Final filter: Tower (Baota) line flips red (bullish) / green (bearish)
- Entries only when flat; each signal fires once, on the first bar all conditions align
Exit Rules (intraday discipline):
- Fixed stop-loss / take-profit: 8 points each by default (1 lot = RM25 per point, i.e. RM200 / RM200)
- Max holding time: 60 bars by default (can be disabled)
- End-of-day liquidation at 17:45 — no overnight positions
- No new entries after 17:15 (MYT)
Backtest Settings: commission RM12.5/lot and 1-tick slippage included; initial capital 10,000, fixed 1 lot.
How to Use: Open FCPO1! (or BMD:FCPO1!) on a 5-minute chart — keep regular candlesticks (do NOT enable Heikin Ashi candles, as fill prices would be distorted) — add the strategy, then open the Strategy Tester. All parameters (EMA / KDJ / MACD / stop-take points / time windows) are adjustable in the settings panel.
Disclaimer: This script is a technical-analysis tool for validation only. Backtest results do not guarantee future performance, and this is not financial advice. Futures trading involves high risk; always use proper risk management and stop-loss discipline.
FCPO 5分钟 策略回测 v1 —— 基于 KDJ + 宝塔线 + Heikin Ashi + EMA20 + MACD 五层共振入场系统的 FCPO(马来西亚棕榈油期货,BMD:FCPO1!)日内交易策略,与「FCPO 系统警报 v2」指标使用同一套入场逻辑,用于在策略回测器中验证信号质量。
入场条件(五层全部满足才开仓):
- 第1层 大方向:价格在 EMA20 上方只做多,下方只做空
- 第2层 动量背景:MACD 柱状线方向(5,20,5)
- 第3层 极端信号:KDJ J 值 < 20(KDJL)或 > 80(KDJH)
- 第4层 K线确认:Heikin Ashi 同向 + 普通K线收盘同向
- 第5层 最终过滤:宝塔线翻红 / 翻绿
- 只在空仓时进场,信号首次满足时只触发一次
出场规则(按日内交易纪律):
- 固定止损 / 止盈:默认各 8 点(1手合约每点 = RM25,即 RM200 / RM200)
- 最长持仓超时:默认 60 根K线(可关闭)
- 日内强平:17:45 触发清仓,不留隔夜仓
- 17:15 后不开新仓
回测设置:已含手续费(RM12.5/手)与滑点(1 tick);初始资金 10,000,固定 1 手。
使用方法:FCPO1!(或 BMD:FCPO1!)5 分钟图 → 保持普通K线蜡烛模式(不要开 Heikin Ashi 蜡烛,否则成交价失真)→ 添加策略 → 打开策略回测器查看结果。EMA / KDJ / MACD / 止损止盈点数 / 时间窗口等参数均可在设置面板调整。
提醒:本策略仅为技术分析验证工具,回测结果不代表未来表现,不构成任何投资建议。期货交易风险高,请务必配合资金管理与止损纪律。
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน