OPEN-SOURCE SCRIPT
已更新 CBC Engine [MMT]

CBC Engine [MMT] is a Candle-By-Candle (CBC) Flip strategy indicator for TradingView, specifically optimized for the 3-minute chart with a 10-minute higher-timeframe (HTF) bias.
It is based on the CBC Flip method originally popularized by MapleStax. The core idea is simple yet powerful: a new directional bias is established the moment price closes beyond the previous candle’s extreme.
Core Logic – CBC Flip
Strong Flip (optional, higher accuracy):
Key Filters & Enhancements
1. Trend Environment (EMA + VWAP)
2. Dual Timeframe Bias (3m + 10m)
3. Stop Loss Logic
Visual & Usability Features
- Background Coloring: Shows the current 10m HTF bias (green = bullish, red = bearish, gray = neutral).
- EMA Cloud: Filled areas between 9/13 and 13/21 EMAs to visualize trend strength and pullbacks.
- VWAP: Session-anchored VWAP with customizable style.
- Signals:
- Dashboard: Shows 10m Bias, 3m State, EMA/VWAP environment, Current Position (Main or Bounce), Stop Loss, and Mode (Strong Flip vs All Flips).
- Session Filter: Optional intraday session (default 09:30–16:00).
Best Use Case
It is based on the CBC Flip method originally popularized by MapleStax. The core idea is simple yet powerful: a new directional bias is established the moment price closes beyond the previous candle’s extreme.
Core Logic – CBC Flip
- Bullish Flip (Long): Current candle closes above the previous candle’s High
- Bearish Flip (Short): Current candle closes below the previous candle’s Low
- If neither happens, the previous CBC state persists (no new flip).
Strong Flip (optional, higher accuracy):
- Long: Price first sweeps below the previous low (liquidity grab), then closes above the previous high.
- Short: Price first sweeps above the previous high, then closes below the previous low.
Key Filters & Enhancements
1. Trend Environment (EMA + VWAP)
- Longs are only allowed when the Slow EMA > VWAP (bullish environment)
- Shorts are only allowed when the Slow EMA < VWAP (bearish environment)
- You can also display a Pullback EMA for extra context.
2. Dual Timeframe Bias (3m + 10m)
- The 10-minute chart provides the overall bias using its own CBC state.
- Primary rule: Only take 3m flips that align with the 10m CBC bias.
- Bounce Override (very useful): If the 3m flip goes against the 10m bias, it can still fire only if price bounces off the 10m EMA band (Fast & Slow EMA) while that band is trending in the direction of the trade.
3. Stop Loss Logic
- Long SL = Lowest low of the last N candles (default N=2)
- Short SL = Highest high of the last N candles
- The SL is plotted on the chart and tracked internally. The position is invalidated if price closes beyond the SL.
Visual & Usability Features
- Background Coloring: Shows the current 10m HTF bias (green = bullish, red = bearish, gray = neutral).
- EMA Cloud: Filled areas between 9/13 and 13/21 EMAs to visualize trend strength and pullbacks.
- VWAP: Session-anchored VWAP with customizable style.
- Signals:
- Main aligned signals → Lime ▲ LONG or Red ▼ SHORT labels with SL level.
- Bounce overrides → Blue ▲ BOUNCE or Orange ▼ REJECT labels.
- Weak flips (when “Show ALL Flip Arrows” is on) → small faint triangles for context.
- Dashboard: Shows 10m Bias, 3m State, EMA/VWAP environment, Current Position (Main or Bounce), Stop Loss, and Mode (Strong Flip vs All Flips).
- Session Filter: Optional intraday session (default 09:30–16:00).
Best Use Case
- Primary setup: 3-minute chart for entries + 10-minute for bias.
- Works best in trending markets where the HTF bias is clear.
- The bounce override makes it more flexible in choppy or ranging conditions by allowing counter-bias entries when price respects the HTF EMA band.
- “Strong Flips Only” mode significantly reduces noise but gives fewer signals.
版本注释
What's New- Add setup quality rating
- Add more alerts
- Update bounce/reject logic
- Update script to Pinescript v6
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。