OPEN-SOURCE SCRIPT

Historical Price Projection [LuxAlgo]

已更新
The Historical Price Projection tool aims to project future price behavior based on historical price behavior plus a user defined growth factor.

The main feature of this tool is to plot a future price forecast with a surrounding area that exactly matches the price behavior of the selected period, with or without added drift.

Other features of the tool include:

  • User-selected period up to 500 bars anywhere on the chart within 5000 bars
  • User selected growth factor from 0 (no growth) to 100, this is the percentage of drift to be used in the forecast.
  • User selected area wide
  • Show/hide forecast area


🔶 USAGE

快照

This tool generates a price projection with exactly the same price behavior over the period selected by the user, plus a growth factor.

The user must confirm the selection of the anchor point in order for the tool to be executed; this can be done directly on the chart by clicking on any bar, or via the date field in the settings panel.

As we can see on this chart, the four phases of the market cycle are clearly defined and marked, so we choose the distribution phase as our anchor point because in our analysis, we want to see how the market would behave if we were currently at the same point in the cycle.

In the image above, the growth factor parameter is set to 0 so that the projection matches the selection. The tool will use up to 500 bars after the selection point.

The growth factor is defined as the percentage of drift that the tool will use.

Drift is defined as follows:

  • For periods with a positive return: average negative return within the period
  • For negative return periods: average positive return within the period


快照

On the chart above, we have selected the same period but added a growth factor of 10, so that the tool uses a 10% drift in its calculations of future prices.

As the return in the selected period is negative, the added drift will make the projection more bearish than the prices from the selection.

快照

On this chart we have changed the selected period, we have chosen the accumulation phase of the last cycle as the anchor point, again with a growth factor of 10%.

As we can see, prices explode higher, making the projection very bullish, as the added effect of both the bullish selected period and the 10% drift is taken into account.

快照

This last chart is a long-term chart, a quarterly chart of the Dow, and it will serve as a review exercise.

What if... everything goes south and the crash of '29 is repeated?

The answer is in the chart, and it is not for the faint of heart

In this case we have chosen a growth factor of 0 to see exactly the same price behaviour projected into the future.

🔶 SETTINGS

🔹 Data Gathering

  • Anchor point: Starting point for data collection, up to 500 bars will be used.


🔹 Data Transformation

  • Growth Factor: Values from 0 to 100, is the amount of drift used to calculate the next price in the series.
  • Area Width: Values from 0 to 100, controls the width of the area around the forecast as an increment/decrement of the growth factor.


🔹 Style

  • Price line width: Size of the price line.
  • Bullish color
  • Bearish color
  • Show Area: Show forecast area.
  • Area color
發布通知
- Added option to disable the "Execution Window Line"
- Removed minimum "Growth Factor" value requirement
發布通知
- Fixed candles reference bug
educationalforecastinghistoricalhistoricalanalysisluxalgoprojectionTrend Analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
更多:

免責聲明