OPEN-SOURCE SCRIPT
Market Bias [Mario]

Indicator Description: Market Bias [Mario]
Core Objective and Philosophy
The Market Bias [Mario] indicator is designed not as a simple signal generator, but as a comprehensive tool for trend analysis and directional bias assessment. Its primary purpose is to provide traders with a clear, at-a-glance understanding of the market's direction across multiple timeframes. By visualizing the alignment of trends, it helps traders make more informed decisions, ensuring they are trading in harmony with the broader market momentum rather than against it. This is a tool for strategic positioning, not for providing blind buy or sell commands.
How It Works: The Core Mechanic
The indicator's logic is based on the relationship between two configurable moving averages (MAs): a Fast MA (defaulting to a 9-period EMA) and a Slow MA (defaulting to a 21-period SMA). The market bias on any given timeframe is determined as follows:
Bullish Bias: When the Fast MA is trading above the Slow MA, it indicates positive, upward momentum.
Bearish Bias: When the Fast MA is trading below the Slow MA, it indicates negative, downward momentum.
Users have full control to customize the type (SMA, EMA, WMA, etc.) and length of each moving average to fit their specific trading style and the asset being analyzed.
Key Feature: The Higher Timeframe (HTF) Bias Table
This is the most powerful feature of the indicator and its main reason for existence. It displays a simple, color-coded table in the corner of the chart, showing the real-time bias for the Daily (D), 4-Hour (4H), and 1-Hour (1H) timeframes.
Purpose: The HTF table solves a critical problem for traders: losing sight of the bigger picture. A trader on a 15-minute chart might see a setup to go long, but if the 4H and Daily charts are strongly bearish, that trade is fighting a powerful current and has a lower probability of success.
Application: By checking this table, a trader can instantly verify if their intended trade direction is aligned with the higher timeframe trends. The ideal scenario is "confluence," where the bias is the same across all key timeframes (e.g., D, 4H, and 1H are all Bullish), giving the trader a strong conviction to only look for long entries.
On-Chart Visual Aids
To support the analysis on the current chart, the indicator provides several visual aids:
Moving Average Plots: Both the Fast and Slow MAs are drawn directly on the chart, allowing traders to see their interaction with price in real-time.
Color-Coded Bars: To make the current trend immediately obvious, the chart's price bars can be colored. Green bars signify a bullish bias (Fast > Slow), while red bars signify a bearish bias (Fast < Slow).
Crossover Markers (Optional): While the indicator is not a signal provider, it can optionally display "Buy" (up arrow) and "Sell" (down arrow) markers when the MAs cross. These should not be interpreted as direct trade signals. Instead, they serve as alerts that the market momentum may be shifting on the current timeframe. They are best used as points of interest or for confirming a thesis that is already supported by the HTF bias.
Summary
In essence, the Market Bias [Mario] indicator is a decision-support tool. It encourages a disciplined, top-down approach to trading.
Use the HTF Table first to establish your strategic directional bias for the day or week.
Use the on-chart MAs and colored bars to analyze the trend on your preferred trading timeframe.
Use the optional crossover markers only as a final confirmation or timing tool, ensuring they align with the dominant bias established by the higher timeframes.
Core Objective and Philosophy
The Market Bias [Mario] indicator is designed not as a simple signal generator, but as a comprehensive tool for trend analysis and directional bias assessment. Its primary purpose is to provide traders with a clear, at-a-glance understanding of the market's direction across multiple timeframes. By visualizing the alignment of trends, it helps traders make more informed decisions, ensuring they are trading in harmony with the broader market momentum rather than against it. This is a tool for strategic positioning, not for providing blind buy or sell commands.
How It Works: The Core Mechanic
The indicator's logic is based on the relationship between two configurable moving averages (MAs): a Fast MA (defaulting to a 9-period EMA) and a Slow MA (defaulting to a 21-period SMA). The market bias on any given timeframe is determined as follows:
Bullish Bias: When the Fast MA is trading above the Slow MA, it indicates positive, upward momentum.
Bearish Bias: When the Fast MA is trading below the Slow MA, it indicates negative, downward momentum.
Users have full control to customize the type (SMA, EMA, WMA, etc.) and length of each moving average to fit their specific trading style and the asset being analyzed.
Key Feature: The Higher Timeframe (HTF) Bias Table
This is the most powerful feature of the indicator and its main reason for existence. It displays a simple, color-coded table in the corner of the chart, showing the real-time bias for the Daily (D), 4-Hour (4H), and 1-Hour (1H) timeframes.
Purpose: The HTF table solves a critical problem for traders: losing sight of the bigger picture. A trader on a 15-minute chart might see a setup to go long, but if the 4H and Daily charts are strongly bearish, that trade is fighting a powerful current and has a lower probability of success.
Application: By checking this table, a trader can instantly verify if their intended trade direction is aligned with the higher timeframe trends. The ideal scenario is "confluence," where the bias is the same across all key timeframes (e.g., D, 4H, and 1H are all Bullish), giving the trader a strong conviction to only look for long entries.
On-Chart Visual Aids
To support the analysis on the current chart, the indicator provides several visual aids:
Moving Average Plots: Both the Fast and Slow MAs are drawn directly on the chart, allowing traders to see their interaction with price in real-time.
Color-Coded Bars: To make the current trend immediately obvious, the chart's price bars can be colored. Green bars signify a bullish bias (Fast > Slow), while red bars signify a bearish bias (Fast < Slow).
Crossover Markers (Optional): While the indicator is not a signal provider, it can optionally display "Buy" (up arrow) and "Sell" (down arrow) markers when the MAs cross. These should not be interpreted as direct trade signals. Instead, they serve as alerts that the market momentum may be shifting on the current timeframe. They are best used as points of interest or for confirming a thesis that is already supported by the HTF bias.
Summary
In essence, the Market Bias [Mario] indicator is a decision-support tool. It encourages a disciplined, top-down approach to trading.
Use the HTF Table first to establish your strategic directional bias for the day or week.
Use the on-chart MAs and colored bars to analyze the trend on your preferred trading timeframe.
Use the optional crossover markers only as a final confirmation or timing tool, ensuring they align with the dominant bias established by the higher timeframes.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.