OPEN-SOURCE SCRIPT

Market Bias Dashboard (MBD) [SharpStrat]

681
Market Bias Dashboard - MBD

Trading without context is like driving with a blindfold on.

You see a bullish signal. You enter. Price reverses immediately. Why? Probably because the signal was real but the context was wrong. You were probably buying at the top of a range into a fading trend against a higher timeframe that was screaming bearish. The signal didn't lie to you. You just didn't have the full picture.

MBD gives you the full picture.

It's a context dashboard that sits on your chart and answers the most important question in trading before you even think about entering: What is this market actually doing right now? Not a buy signal. Not a sell signal. Just pure honest market context, measured four different ways, on two timeframes at once, updated every single bar.

The reason it uses four separate components rather than one is deliberate. Any single measurement of the market is incomplete. Structure alone doesn't tell you if the trend has momentum behind it or if it's running out of steam. Momentum alone doesn't tell you where price sits in the bigger range. Volatility alone doesn't tell you the direction. Each component fills in a blind spot that the others have, and together they give you a picture that none of them could give alone.
cuplikan

How it was built — the thinking behind it

Most context indicators fail because they either use one measurement or they combine things in a way that makes the output a black box. MBD was built differently. Every component measure something completely separate, so if one is broken or noisy the others still give you useful information. And every component's reading is visible individually, so you always know why the combined bias says what it says.

The four things it measures are the four things that define market behaviour at any point in time i.e. direction, position, energy, and state. Take away any one of them and your read of the market is incomplete.

Component 1 — Structure

The foundation. Before anything else, you need to know which direction the market is moving.

cuplikan
Structure is determined by looking at real swing highs and swing lows actual turning points in price, confirmed by a configurable number of bars on either side. MBD then compares the last two swing highs and the last two swing lows to each other:
  • Higher High + Higher Low = price is making upward progress = Bullish structure
  • Lower High + Lower Low = price is making downward progress = Bearish structure
  • Mixed = price is going nowhere with conviction = Neutral

The key distinction here is that this uses actual pivot points, not a moving average that lags behind price. When price makes a genuine new swing high above the previous one, that is a fact. MBD records it. When structure flips, when a bullish sequence suddenly becomes bearish the dashboard immediately flags it as Transitioning, which is a warning to pay attention even before the other components react.

Component 2 — Range Position

Knowing the direction is not enough. You also need to know where price currently sits within the bigger picture.

cuplikan
Think of it this way if a stock has been trading between 100 and 150 for the past two months and it is currently at 148, the structure might still say bullish. But you are buying right at the top of a two-month range. That is a very different risk than buying the same stock at 108.

Range Position solves this. It takes the highest high and lowest low over the last 50 bars (configurable) and calculates exactly where the current price sits inside that range as a percentage. It then displays that as a visual progress bar so you can see it instantly without reading a number:
  • Above 60% — price is in the upper portion of the range, bullish context
  • 40% to 60% — price is in the middle, neutral, no positional edge
  • Below 40% — price is in the lower portion of the range, bearish context

This component is especially powerful when it contradicts structure. Bullish structure but range position at 90%? That tension is worth knowing. You are buying a bullish trend right at the top of the range the exact level where sellers tend to appear. MBD puts that conflict in front of you so you can decide what to do with it.

Component 3 — Momentum

A trend can be intact and dying at the same time. Momentum is what tells you which one it is.

cuplikan
Here is something most beginners don't realize: a market can keep making higher highs while simultaneously running out of steam. The direction is still up. The structure still says bullish. But each successive push is covering less ground than the one before it. That is a trend that is exhausting itself and being in it without knowing that is how you get caught in a reversal you did not see coming.

MBD measures momentum by tracking the size of recent price swings and comparing them to earlier ones. How much distance each swing is covering relative to past swings. Then it smooths that comparison to filter out noise.
  • Swings getting bigger = Accelerating. The trend has fuel. It is building, not dying.
  • Swings roughly the same size = Steady. Trend is continuing at a consistent pace.
  • Swings getting smaller = Fading. Energy is leaving the move. Proceed with caution.

The most powerful combination is Bullish structure + Accelerating momentum. That is a market with direction and energy behind it. The most dangerous combination is Bullish structure + Fading momentum a trend that looks fine on the surface but is quietly breaking down underneath.

Component 4 — Volatility

Market cycle between expansion and contraction. This component tells you which phase you're in.
After a big move, markets tend to calm down and compress. Volatility drops. Ranges tighten. Then at some point the compression end and when it does, the next move tends to be sharp and clean. Understanding where you are in that cycle completely changes how you should be treating the market.

MBD measures this by comparing the current ATR (Average True Range a measure of how much price is actually moving bar to bar) against its own longer-term average. Three states are possible:
  • Expanding — the market is moving more than usual. Trends are active and clean. Good environment for trend following entries.
  • Normal — Volatility is around its historical average. Market is in a typical state, nothing exceptional to flag.
  • Coiling — Volatility has contracted significantly below normal. The market is compressing like a spring. It will not stay this quiet forever.

When you see Coiling on the dashboard, a breakout is typically approaching. It does not tell you the direction but it tells you to pay attention, tighten your stops if you are in a trade, and have a plan ready. Many of the cleanest, most explosive moves in any market come directly out of a coiling period.

The combined bias

Each component scores +1 for a bullish reading, -1 for bearish, and 0 for neutral. Those scores are added up and the total maps to these labels:
  • ▲ Strong Bullish — most or all components aligned bullish
  • ▲ Moderate Bullish — clear bullish lean with some components neutral
  • ▲ Weak Bullish — marginal bullish lean, proceed carefully
  • ◆ Ranging — no directional edge at all
  • ▼ Weak / Moderate / Strong Bearish — same logic in the bearish direction
  • ⚡ Coiling — breakout approaching, direction unclear.
  • ↔ Transitioning — structure just flipped. Wait for confirmation.

The bias label is visible for both your current timeframe and your higher timeframe simultaneously, so you always have both perspectives in front of you.

Multi-Timeframe
At the bottom of the component section there is a TF Alignment row. This is arguably the most valuable reading in the entire indicator.
It tells you whether your current timeframe and your higher timeframe are saying the same thing:
  • Aligned — both timeframes agree on direction. This is where the highest probability setups live. When you are bullish on the 15-minute and the 4-hour is also bullish, you have the wind at your back.
  • Conflicting — the timeframes disagree. You might be seeing a bullish setup on your trading timeframe but the higher timeframe is bearish. That does not mean you can't trade but you are fighting the bigger picture, and that should affect your position size and your expectations. Mixed — partial agreement. Somewhere in between.
  • The most common mistake beginners make is entering a trade that looks perfect on their timeframe without ever checking the bigger picture. This removes that blind spot entirely.

The most common mistake beginners make is entering a trade that looks perfect on their timeframe without ever checking the bigger picture. This removes that blind spot entirely.

Past Bias Trail

The trail row shows the last 10 bias states the market has moved through, from oldest on the left to newest on the right. Each symbol represents a complete past bias when the bias changed state. This filters out noise and shows you meaningful shifts.
cuplikan
Three patterns to watch for:

  1. Consistent — sustained bullish symbols across most of the trail. This tells you the market has been in a clean trend for a while and the current bullish reading is not new it has been the dominant state. Trade with it.
  2. Choppy — random mix of bullish, bearish, and neutral. The market has been going nowhere with conviction for a while. Even if the current bias looks bullish, history says this market cannot hold a direction. Reduce size or sit out.
  3. Reversal — bearish, then ranging, then coiling, then transitioning, then bullish. This is a textbook reversal building over time. Each step makes sense in sequence. This is the kind of trail that tells you a genuine directional shift has happened and the new bias has momentum behind it.


How to Use

Each step builds context, so following a consistent flow helps you understand not just what the market is doing, but whether it’s worth trading at all.
1: Check Timeframe Alignment - Start by comparing your current timeframe with the higher timeframe.
When both are aligned, the market has directional agreement and trades carry higher probability. If they conflict, you are trading against the broader trend, which increases risk. Mixed conditions usually indicate uncertainty.
At this stage, you are simply deciding whether the environment is favorable enough to proceed.
2: Read the Overall Bias- A strong bias means multiple factors are supporting the same direction, while a weak or neutral bias suggests there is no clear edge. This step helps you quickly judge whether the market has conviction or is just moving without structure.
3: Understand the Components - Look at structure, range position, momentum, and volatility together. These components explain why the bias exists. For example, a bullish bias supported by strong structure and accelerating momentum is very different from a bullish bias where momentum is already fading.
4: Evaluate Entry Location - Before entering, check where price sits within its range.
Even in a strong trend, entering near extremes increases risk. Good trades come from combining direction with reasonable positioning, not chasing price at the edges.
5: Confirm Momentum
Momentum tells you if the move still has strength.
Accelerating momentum supports continuation, while fading momentum warns that the move may be weakening. This helps you avoid entering late into exhausted trends.
6: Check Volatility
Now assess the volatility state.
Expanding volatility supports trending moves, while coiling indicates compression and a potential breakout. During coiling phases, it is usually better to wait for confirmation rather than predict direction.
7: Review Recent History
Finally, glance at the bias history trail.
A consistent sequence suggests a stable trend, while a mixed sequence indicates choppy conditions. This adds context and helps you judge whether the current state is likely to hold.
Final Decision
When alignment, bias, components, and conditions all support each other, you have a strong setup. If they conflict, the better decision is often to stay out.

SETTINGS
  • Swing Length — How strict the pivot detection is. Higher = fewer but more significant swings detected (default: 5)
  • Range Lookback — How many bars define the recent high/low range (default: 50)
  • ATR Period — Bars used to measure current volatility (default: 14)
  • ATR Average Period — Volatility baseline (default: 50)
  • Coiling Threshold - How compressed volatility must be to trigger the Coiling state (default: 0.75)
  • Higher Timeframe —Multi timeframe (default: 240 = 4H)
  • History Count — Number of observations in the past bias trail (default: 8)
  • Panel Position — Where the dashboard sits on your chart (default: Top Right)
  • Color Theme — Dark / Light


Works everywhere

MBD is built to work universally not just on one asset type or one timeframe. The four components it measures are structure, range position, momentum, volatility these exist in every liquid market that has ever traded. Whether you are scalping Bitcoin on the one minute chart, swing trading stocks on the daily, or analyzing forex on the four hour, the dashboard reads the same way and the interpretation is identical.

This is not a signal tool. It is a context tool. Use it to understand the market before you enter, not to decide for you.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.