OPEN-SOURCE SCRIPT
Meta-LR Forecast v2

Meta-LR Forecast is a tool that helps visualize whether the market is acting more like a trend (moving strongly in one direction) or more like a range (sideways/mean-reverting). It is designed to give context, not to generate buy or sell signals.
The script looks at multiple timeframes at once (for example minutes, hours, days, or weeks depending on your chart) and projects where price could go if each timeframe’s “bias” plays out. These projected points are then drawn ahead of current price.
Each timeframe’s bias is based on how straight and consistent the recent move has been (Directional Efficiency), combined with how well a line fits that move (R²). Together these form a “Bias %.” Higher positive values suggest upward pressure, higher negative values suggest downward pressure, and values near zero suggest indecision or chop.
A logistic blend adjusts between trend-following and range/anti-trend behavior. When the market shows strong direction, the forecast leans more toward trend; when it’s choppy or moving sideways, the forecast leans more toward range. In some conditions, a counter-trend (anti-trend) adjustment is allowed, but only when volatility and efficiency fall within certain thresholds.
ATR (Average True Range) is used to normalize everything, so the indicator adapts to different symbols and volatility levels. This way, the projection size is expressed in “Bias × ATR” units added to current price, making the forecasts scale appropriately across assets.
The projected points are spaced in time according to the real length of their timeframe. For example, a 1-day projection will be drawn farther away on the chart than a 15-minute projection. This makes the forward path visually match the true horizon of each timeframe.
The top-right table shows “Meta Bias %,” which is the overall bias calculated from all selected timeframe projections chained together. Positive Meta Bias means the combined path leans upward, negative means downward, and values close to zero mean mixed conditions.
How to use it: treat the Meta Bias % and polyline as context. If the forecast path is stacked upward with a strong positive Meta Bias, it suggests supportive conditions. If it stacks downward with a strong negative Meta Bias, it suggests pressure. If it alternates up and down and the bias hovers near zero, conditions may be indecisive. Always confirm with your own analysis before acting.
Important limitations: this tool is educational and for visualization only. It does not give entry or exit signals, and it does not guarantee profitable outcomes. Higher-timeframe values can change until that bar closes, so the display may adjust in real time. Market shocks, news events, and low liquidity conditions are not modeled.
Good practice: combine this indicator with your own trading plan, structure analysis, and risk management. Backtest responsibly in a simulator before using it live. Adjust inputs to fit your symbol and timeframe.
Compliance note: this script does not claim to be a “holy grail” or promise guaranteed results. It is not financial advice. It is meant to help traders better visualize context and market behavior. Use it as one part of a broader decision-making process.
The script looks at multiple timeframes at once (for example minutes, hours, days, or weeks depending on your chart) and projects where price could go if each timeframe’s “bias” plays out. These projected points are then drawn ahead of current price.
Each timeframe’s bias is based on how straight and consistent the recent move has been (Directional Efficiency), combined with how well a line fits that move (R²). Together these form a “Bias %.” Higher positive values suggest upward pressure, higher negative values suggest downward pressure, and values near zero suggest indecision or chop.
A logistic blend adjusts between trend-following and range/anti-trend behavior. When the market shows strong direction, the forecast leans more toward trend; when it’s choppy or moving sideways, the forecast leans more toward range. In some conditions, a counter-trend (anti-trend) adjustment is allowed, but only when volatility and efficiency fall within certain thresholds.
ATR (Average True Range) is used to normalize everything, so the indicator adapts to different symbols and volatility levels. This way, the projection size is expressed in “Bias × ATR” units added to current price, making the forecasts scale appropriately across assets.
The projected points are spaced in time according to the real length of their timeframe. For example, a 1-day projection will be drawn farther away on the chart than a 15-minute projection. This makes the forward path visually match the true horizon of each timeframe.
The top-right table shows “Meta Bias %,” which is the overall bias calculated from all selected timeframe projections chained together. Positive Meta Bias means the combined path leans upward, negative means downward, and values close to zero mean mixed conditions.
How to use it: treat the Meta Bias % and polyline as context. If the forecast path is stacked upward with a strong positive Meta Bias, it suggests supportive conditions. If it stacks downward with a strong negative Meta Bias, it suggests pressure. If it alternates up and down and the bias hovers near zero, conditions may be indecisive. Always confirm with your own analysis before acting.
Important limitations: this tool is educational and for visualization only. It does not give entry or exit signals, and it does not guarantee profitable outcomes. Higher-timeframe values can change until that bar closes, so the display may adjust in real time. Market shocks, news events, and low liquidity conditions are not modeled.
Good practice: combine this indicator with your own trading plan, structure analysis, and risk management. Backtest responsibly in a simulator before using it live. Adjust inputs to fit your symbol and timeframe.
Compliance note: this script does not claim to be a “holy grail” or promise guaranteed results. It is not financial advice. It is meant to help traders better visualize context and market behavior. Use it as one part of a broader decision-making process.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。