C&B Auto MK5

Overview
The C&B Auto MK5.2ema BullBear is a versatile Pine Script indicator designed to help traders identify bullish and bearish market conditions across various timeframes. It combines Exponential Moving Averages (EMAs), Relative Strength Index (RSI), Average True Range (ATR), and customizable time filters to generate actionable signals. The indicator overlays on the price chart, displaying EMAs, a dynamic cloud, scaled RSI levels, bull/bear signals, and market condition labels, making it suitable for swing trading, day trading, or scalping in trending or volatile markets.
What It Does
This indicator generates bull and bear signals based on the interaction of two EMAs, filtered by RSI thresholds, ATR-based volatility, a 50/200 EMA trend filter, and user-defined time windows. It adapts to market volatility by adjusting EMA lengths and RSI thresholds. A dynamic cloud highlights trend direction or neutral zones, with candlestick coloring in neutral conditions. Market condition labels (current and historical) provide real-time trend and volatility context, displayed above the chart.
How It Works
The indicator uses the following components:
EMAs: Two EMAs (short and long) are calculated on a user-selected timeframe (1, 5, 15, 30, or 60 minutes). Their crossover or crossunder triggers potential bull/bear signals. EMA lengths adjust based on volatility (e.g., 10/20 for volatile markets, 5/10 for non-volatile).
Dynamic Cloud: The area between the EMAs forms a cloud, colored green for bullish trends, red for bearish trends, or a user-defined color (default yellow) for neutral zones (when EMAs are close, determined by an ATR-based threshold). Users can widen the cloud for visibility.
RSI Filter: RSI is scaled to price levels and plotted on the chart (optional). Signals are filtered to ensure RSI is within volatility-adjusted bull/bear thresholds and not in overbought/oversold zones.
ATR Volatility Filter: An optional filter ensures signals occur during sufficient volatility (ATR(14) > SMA(ATR, 20)).
50/200 EMA Trend Filter: An optional filter restricts bull signals to bullish trends (50 EMA > 200 EMA) and bear signals to bearish trends (50 EMA < 200 EMA).
Time Filter: Signals are restricted to a user-defined UTC time window (default 9:00–15:00), aligning with active trading sessions.
Market Condition Labels: Labels above the chart display the current trend (Bullish, Bearish, Neutral) and optionally volatility (e.g., “Bullish Volatile”). Up to two historical labels persist for a user-defined number of bars (default 5) to show recent trend changes.
Visual Aids: Bull signals appear as green triangles/labels below the bar, bear signals as red triangles/labels above. Candlesticks in neutral zones are colored (default yellow).
The indicator ensures compatibility with standard chart types (e.g., candlestick or bar charts) to produce realistic signals, avoiding non-standard types like Heikin Ashi or Renko.
How to Use It
Add to Chart: Apply the indicator to a candlestick or bar chart on TradingView.
Configure Settings:
Timeframe: Choose a timeframe (1, 5, 15, 30, or 60 minutes) to match your trading style.
Filters:
Enable/disable the ATR volatility filter to focus on high-volatility periods.
Enable/disable the 50/200 EMA trend filter to align signals with the broader trend.
Enable the time filter and set custom UTC hours/minutes (default 9:00–15:00).
Cloud Settings: Adjust the cloud width, neutral zone threshold, color, and transparency.
EMA Colors: Use default trend-based colors or set custom colors for short/long EMAs.
RSI Display: Toggle the scaled RSI and its thresholds, with customizable colors.
Signal Settings: Toggle bull/bear labels and set signal colors.
Market Condition Labels: Toggle current/historical labels, include/exclude volatility, and adjust decay period.
Interpret Signals:
Bull Signal: A green triangle or “Bull” label below the bar indicates potential bullish momentum (EMA crossover, RSI above bull threshold, within time window, passing filters).
Bear Signal: A red triangle or “Bear” label above the bar indicates potential bearish momentum (EMA crossunder, RSI below bear threshold, within time window, passing filters).
Neutral Zone: Yellow candlesticks and cloud (if enabled) suggest a lack of clear trend; consider range-bound strategies or avoid trading.
Market Condition Labels: Check labels above the chart for real-time trend (Bullish, Bearish, Neutral) and volatility status to confirm market context.
Monitor Context: Use the cloud, RSI, and labels to assess trend strength and volatility before acting on signals.
Unique Features
Volatility-Adaptive EMAs: Automatically adjusts EMA lengths based on ATR to suit volatile or non-volatile markets, reducing manual configuration.
Neutral Zone Detection: Uses an ATR-based threshold to identify low-trend periods, helping traders avoid choppy markets.
Scaled RSI Visualization: Plots RSI and thresholds directly on the price chart, simplifying momentum analysis relative to price.
Flexible Time Filtering: Supports precise UTC-based trading windows, ideal for day traders targeting specific sessions.
Historical Market Labels: Displays recent trend changes (up to two) with a decay period, providing context for market shifts.
50/200 EMA Trend Filter: Aligns signals with the broader market trend, enhancing signal reliability.
Notes
Use on standard candlestick or bar charts to ensure accurate signals.
Test the indicator on a demo account to optimize settings for your market and timeframe.
Combine with other analysis (e.g., support/resistance, volume) for better decision-making.
The indicator is not a standalone system; use it as part of a broader trading strategy.
Limitations
Signals may lag in fast-moving markets due to EMA-based calculations.
Neutral zone detection may vary in extremely volatile or illiquid markets.
Time filters are UTC-based; ensure your platform’s timezone settings align.
This indicator is designed for traders seeking a customizable, trend-following tool that adapts to volatility and provides clear visual cues with robust filtering for bullish and bearish market conditions.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.