OPEN-SOURCE SCRIPT
Multi Brownian Forecast

📊 Multi Brownian Forecast (Time-Adaptive, Probabilistic)
This indicator uses a sophisticated Geometric Brownian Motion (GBM) Monte Carlo simulation to project future price paths. It adapts to any chart timeframe and provides quantitative, multi-period probability signals.
---
🧠 Core Mathematical Methodology
The model relies on GBM, which is a continuous-time stochastic process that models asset prices.
1. Historical Analysis (Drift & Volatility):
* The script first calculates Logarithmic Returns over a user-defined Historical Lookback (Hours).
* Drift ($\mu$): Computed as the average of the log returns.
* Volatility ($\sigma$): Computed as the standard deviation of the log returns.
* These values are then time-adapted to an hourly step, compensating for the chart's current timeframe (e.g., 5-minute, 1-hour).
2. Monte Carlo Simulation:
* It runs a specified Number of Simulations (e.g., 1000).
* For each simulation, the price is stepped forward hourly using the GBM formula, which incorporates the calculated drift and a random shock drawn from a normal distribution (generated via the Box-Muller transform).
---
✨ Key Features
This indicator uses a sophisticated Geometric Brownian Motion (GBM) Monte Carlo simulation to project future price paths. It adapts to any chart timeframe and provides quantitative, multi-period probability signals.
---
🧠 Core Mathematical Methodology
The model relies on GBM, which is a continuous-time stochastic process that models asset prices.
1. Historical Analysis (Drift & Volatility):
* The script first calculates Logarithmic Returns over a user-defined Historical Lookback (Hours).
* Drift ($\mu$): Computed as the average of the log returns.
* Volatility ($\sigma$): Computed as the standard deviation of the log returns.
* These values are then time-adapted to an hourly step, compensating for the chart's current timeframe (e.g., 5-minute, 1-hour).
2. Monte Carlo Simulation:
* It runs a specified Number of Simulations (e.g., 1000).
* For each simulation, the price is stepped forward hourly using the GBM formula, which incorporates the calculated drift and a random shock drawn from a normal distribution (generated via the Box-Muller transform).
---
✨ Key Features
- Probabilistic Quartile Forecast: Plots a dynamic "cone" of probability on the chart. It shows key price percentiles (Q1, Q2/Median, Q3, and Q4/Outer Bound) at the forecast's expiration, visualizing the expected range of price outcomes based on the simulations.
- Multi-Period Probability Signals: This is the core signal feature. Users can define multiple, independent forecast periods (e.g., 4h, 16h, 48h) in a comma-separated list.
* For each period, a Probability Up and Probability Down is calculated based on hitting a custom Target Price Change (%) (e.g., 2%) at a certain confidence level given a simulation over the historical backlook.
* The probabilities are displayed in a chart table. The cell text turns white if the calculated probability exceeds the user-defined Signal Confidence (%). - Conditional Fibonacci Retracement: Optionally displays a Fibonacci Retracement on the chart. This feature is only activated when one of the multi-period signals reaches its minimum confidence threshold, providing a contextual technical level when a probabilistic edge is found.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。