OPEN-SOURCE SCRIPT

Market Bias (CEREBR)

625
Market Bias (CEREBR) [JopAlgo] — quick read of who’s in control

What it does, in one line:
It builds a clean, smoothed Heikin-Ashi view (optionally from a higher timeframe) and an oscillator that says: bullish, bearish, or cooling off. You use it to decide directional bias and to avoid trading against that bias.

What you see on the chart

Smoothed HA candles (optional): green = bullish bias, red = bearish bias.

A soft fill band around the HA body:

Brighter = bias is strengthening.

Faded = bias is weakening.

(In Data Window) “Bias High / Low / Average” = the smoothed HA range and midline.

If you only look at one thing: green means look for longs, red means look for shorts. Faded color = be picky or trim.

How to use it (simple playbook)

Pick your higher timeframe (HTF) for the bias.

On a 4H chart, try HTF = 12H or 1D.

Rule: HTF must be equal to or higher than your chart TF.

Trade with the bias at real levels.

Longs only when the bias is green.

Shorts only when the bias is red.

Take entries at location: Volume Profile v3.2 levels (VAH/VAL/POC/LVNs) or Anchored VWAP.

Quality check (optional but strong):

Before clicking, glance at CVDv1.

Green bias + CVD Alignment OK and no Absorption = better odds.

If CVD shows Absorption against you, skip or wait for a retest.

When to pass:

Color flips every other bar (chop) → do less.

Color is fading (weakening) into your entry → size down or wait.

Timeframe guidance

Scalps (1–5m): HTF = 15m/30m. Use bias to filter direction; enter on pullbacks at AVWAP/VA edges.

Intraday (15m–1H): HTF = 4H. Buy dips in green / sell pops in red at VP levels.

Swing (2H–4H): HTF = 12H/1D. First pullback after a fresh flip is usually the best.

Position (1D–1W): HTF = 1W. Hold while color stays consistent; reduce on weakening near HVNs.

Entries, exits, and stops

Entry with trend:

Bias green, price pulls back to AVWAP / VAL / prior HA mid, then holds.

Click the long. Reverse for shorts in red.

Exit / reduce:

When “Trend Weakens” alert fires, or color fades while hitting your POC/HVN target.

Hard exit on opposite flip (green→red or red→green) if your idea was pure trend-follow.

Stops:

Behind structure/level (not just on color).

If the next bar flips bias against you and CVD also disagrees, cut it early.

Inputs that matter (keep these simple)

Timeframe (HA Market Bias): your HTF. Must be ≥ chart TF.

Period (default 100): smoothing for the base OHLC. Higher = steadier.

Smoothing (default 100): extra smoothing for the HA feed. Higher = fewer flips.

Oscillator Period (default 7): affects how fast strengthening/weakening shows in the fill color. Lower = quicker.

Tip: If you see too many flips, raise Period/Smoothing or pick a higher HTF. If it feels slow, lower them one notch.

Alerts (plain meaning)

Bullish Trend Switch: bias turned bearish → bullish.

Bullish Trend Strengthens / Weakens: same direction, momentum building / cooling.

Bearish Trend Switch: bullish → bearish.

Bearish Trend Strengthens / Weakens: same idea for shorts.

Use “Switch” to prepare for new setups; use “Strengthens/Weakens” to add/trim or tighten risk.

How it works (one paragraph, no math)

The script smooths price, builds Heikin-Ashi values on your chosen HTF, smooths those again, and doesn’t repaint on closed bars. From the HA open/close difference it creates a simple bias oscillator: above zero = bullish, below zero = bearish. The fill brightness tells you if that bias is getting stronger or weaker right now.

Good combos (optional, but recommended)

Volume Profile v3.2 [JopAlgo]: use VAH/VAL/POC/LVNs as your battleground.

Anchored VWAP [JopAlgo]: use reclaims/rejections for timing.

CVDv1 [JopAlgo]: sanity-check flow quality before entry.

FAQ (quick)

Does it repaint?
No on closed bars. HTF values are requested with a safe offset.

Best starting setup?
4H chart, HTF = 1D, Period/Smoothing 100/100, Oscillator 7.

Can I hide the HA candles?
Yes—toggle “Show HA Candles.” Keep only the bias fill if you want a cleaner price chart.

Short disclaimer

Educational tool, not advice. Markets carry risk. Test first, size small, and trade with your plan.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.