Dual price forecast with Projection Zone [FXSMARTLAB]The Dual Price Forecast with Projection Zone indicator is built to simulate potential future price paths based on historical price movements over two defined lookback periods. By running multiple trials (or simulations) on these historical price movements, the indicator achieves a more robust forecast, incorporating the inherent variability of price behavior.
Key Components and Calculation Details
1. Lookback Periods and Historical Price Movements
Lookback Period 1 and Lookback Period 2 specify the range of past data used to generate each projection. For each period, the indicator calculates the price variations (differences between the closing and opening prices) and stores these in arrays.
These historical price variations capture the volatility and price patterns within each period, serving as templates for future price behavior.
2. Trials: Purpose and Function
The trials are a critical element in the projection calculation. Each trial represents a single simulation of possible future price movements, derived from a random reordering of the historical price variations in each lookback period.
By running multiple trials , the indicator explores various sequences of historical movements, simulating different possible future paths. Each trial adds to the projection’s robustness by capturing a unique potential price path based on past behavior.
Running these multiple trials allows the indicator to account for randomness in price behavior, making the projections more comprehensive by covering a range of scenarios rather than relying on a single deterministic forecast.
3. Reverse Option
The reverse option allows the indicator to invert the direction of price movements within each lookback period. When enabled, historical uptrends are treated as downtrends, and vice versa.
This feature is particularly valuable in scenarios where traders expect a potential reversal in market direction. By enabling the reverse option, the indicator can simulate what might happen if past trends inverted, providing an alternative forecast path that considers possible market reversals.
This allows traders to assess both continuation and reversal scenarios, giving them a more balanced view of potential future price paths and helping them prepare for either market direction.
4. Generating the Average Projection Path
Once the trials are complete, the indicator calculates an average projected price path for each lookback period by averaging the results of all trials. This average represents the most likely price trend based on historical data and provides a smoothed projection that mitigates extreme outliers.
By averaging across all trial paths, the indicator generates a more reliable and balanced forecast line, smoothing out the fluctuations that might appear if only one trial or a small number of trials were used.
5. Projection Zone Visualization
The indicator plots the two average projection paths (one for each lookback period) as Projection 1 and Projection 2, each in a user-defined color.
The Projection Zone is the area between these two lines, filled with a semi-transparent color. This zone visually represents the potential range of future price movement, highlighting where prices are likely to oscillate if historical trends persist.
The Projection Zone effectively functions as a potential support and resistance boundary, providing traders with a visual reference for possible price fluctuations within a specific range.
6. Display of Lookback Zones
To give context to the projections, the indicator can also display colored lookback zones on the chart. These zones correspond to Lookback Period 1 and Lookback Period 2 and are color-coded to match their respective projection lines.
These zones allow traders to see the sections of historical data used in the calculation, helping them understand which past price behaviors influenced the current projections.
Benefits of the Indicator
The "Dual Price Forecast with Projection Zone" indicator provides a multi-scenario forecast based on past price dynamics. Its use of trials ensures that projections are not based on a single deterministic path but on a range of possible scenarios that better reflect the inherent randomness in financial markets.
By generating a probabilistic forecast within a defined zone, the indicator helps traders to:
Anticipate potential price ranges and areas of support/resistance based on historical trends.
Understand the influence of different timeframes (short-term and long-term lookbacks) on future price behavior.
Make informed decisions by visualizing the likely variability of future prices within a controlled projection zone.
Prepare for both continuation and reversal scenarios, thanks to the reverse option. This feature is especially useful in markets where trends may change direction, as it allows traders to explore what might happen
Future
Forecast: PastFluxDelta PredictionThe theory is that time periods and the conditions during these periods repeat themselves. Especially if it is the same day of the week in the past, there is a high probability that price fluctuations will roughly repeat themselves.
Eternal return (or eternal recurrence) is a philosophical concept which states that time repeats itself in an infinite loop, and that exactly the same events will continue to occur in exactly the same way, over and over again, for eternity.
History does repeat itself.
The stock market is a manifest example.
Chief market strategist at Miller Tabak + Co. Matt Maley pointed out the strong resemblance between the stock market recently and that in the past.
Various scientific studies and articles show that there could be something to this theory
Most of the investors are ignoring the parallels between stocks today and "heady" years 1929, 1999 and 2007…
Post Labor Day sees investors returning to the S&P 500 near all-time highs and some dark economic shadows lurking …
So how should we regard these inescapable results?
Nietzsche said we should embrace them, accept them, and love them. Once they stop, expect them to start again.
But remember that the future is fundamentally uncertain and that past results are by no means a guarantee of future performance.
Based on this, this indicator uses historical trading data from a year, a week or a day ago and compares price fluctuations in the past with current conditions.
"Bars to predict" can be used to indicate how far into the future the indicator is looking.
"Amount of bars to show" determines how many bars are generally displayed. A high value allows you to see how accurate the method was in the past.
Golden Level Predictions v1.0Golden Level Predictions (GLP) Trading Indicator
This script introduces a custom trading indicator named "GLP" tailored for the TradingView platform. It offers various price levels derived from Fibonacci calculations and other mathematical models, assisting traders in pinpointing potential overpriced and discounted price levels.
Key Features:
User Inputs : Users have the flexibility to select their desired timeframe, with options ranging from Weekly, Daily, Monthly, and more. Additionally, they can opt to showcase Fibonacci lines and the associated prices within these levels.
Price Level Calculations :
- Employs constants such as the Golden Ratio (PHI) and Pi (PI) to extract various multipliers and factors.
- Assesses if the current asset is a cryptocurrency and tweaks calculations accordingly.
- Determines overpriced and discounted price levels, drawing from the current open price and past data.
Fibonacci Levels :
- For each overpriced and discounted level, the script computes intermediary Fibonacci levels, including 23.6%, 38.2%, 50%, 61.8%, and 78.6% (the 3rd level is excluded due to plot limitations).
- These levels are illustrated on the chart, granting traders a more detailed view of price targets.
Visual Elements :
- Projects horizontal lines to the subsequent selected indicator interval for every calculated price level.
- Exhibits potential percentage gains or losses at each tier, indicating the prospective price alteration upon reaching that level.
- Differentiates overpriced (green) and discounted (red) levels using color codes. A neutral price is depicted in yellow.
Anticipated Close Calculation : Offers a projected closing price for the current timeframe, based on a myriad of factors.
This indicator is particularly effective with cryptocurrencies due to their inherent volatility. It's also compatible with stocks and is most efficient with tickers that provide volume data.
YinYang Bar ForecastOverview:
YinYang Bar Forecast is a prediction indicator. It predicts the movement for High, Low, Open and Close for up to 13 bars into the future. We created this Indicator as we felt the TradingView community could benefit from a bar forecast as there wasn’t any currently available.
Our YinYang Bar Forecast is something we plan on continuously working on to better improve it, but at its current state it is still very useful and decently accurate. It features many calculations to derive what it thinks the future bars will hold. Let’s discuss some of the logic behind it:
Each bar has its High, Low, Open and Close calculated individually for highest accuracy. Within these calculations we first check which bar it is we are calculating and base our span back length that we are getting our data from based on the bar index we are generating. This helps us get a Moving Average for this bar index.
We take this MA and we apply our Custom Volume Filter calculation on it, which is essentially us dividing the current bars volume over the average volume in the last ‘Filtered Length’ (Setting) length. We take this decimal and multiply it on our MA and smooth it out with a VWMA.
We take the new Volume Filtered MA and apply a RSI Filter calculation on it. RSI Filter is where we take the difference between the high and low of this bar and we multiply it with an RSI calculation using our Volume Filtered MA. We take the result of that multiplication and either add or subtract it from the Volume Filtered MA based on if close > open. This makes our RSI Filtered MA.
Next, we do an EMA Strength Calculation which is where we check if close > ema(close, ‘EMA Averaged Length’) (Setting). Based on this condition we assign a multiplier that is applied to our RSI Filtered MA. We divide by how many bars we are predicting and add a bit to each predictive bar so that the further we go into the future the stronger the strength is.
Next we check RSI and RSI MA levels and apply multiplications based on its RSI levels and if it is greater than or less than the MA. Also it is affected by if the RSI is <= 30 and >= 70.
Finally we check the MFI and MFI MA levels and like RSI we apply multiplications based on its MFI levels and if it is greater than or less than the MA. It is also affected by if the MFI is <= 30 and >= 70.
Please note the way we calculate this may change in the future, this is just currently what we deemed works best for forecasting the future bars. Also note this script uses MA calculations out of scope for efficiency but there is potential for inconsistencies.
Innately it’s main use is the projection it provides. It only draws the bars for realtime bars and not historical ones, so the best way to backtest it is with TradingView’s Replay Tool.
Well, enough of the logic behind it, let's get to understanding how to use it:
Tutorial:
So unfortunately we aren’t able to plot legit bars/candles into the future so we’ve had to do a bit of a work around using lines and fills. As you can see here we have 4 Lines and 3 Zones:
Lines:
Green: Represents the High
Orange: Represents the Open
Teal: Represents the Close
Red: Represents the Low
Zones:
High Zone: This zone is from either Open or Close to the High and is ALWAYS filled with Green.
Open/Close Zone: This zone is from the Open to the Close and is filled with either Green or Red based on if it's greater than the previous bar (real or forecasted).
Low Zone: This zone is from either Open or Close to the Low and is ALWAYS filled with Red.
As you can see generally the Forecasted bars are generally within strong pivot locations and are a good estimation of what will likely go on. Please note, the WHOLE structure of the prediction can change based on the current bars movements and the way it affects the calculations.
Let's look 1 bar back from the current bar just so we can see what it used to Forecast:
As you can see it has changed quite a bit from the previous bar, but if you look close, we drew horizontal lines around where its projecting the next bar to be (our current realtime bar), if we go back to the live chart:
Its projections were pretty close for the high and low. Generally, right now at least, it does a much better job at predicting the high and low than it does the open and close, however we will do our best to fine tune that in future updates.
Remember, this indicator is not meant to base your trades on, but rather give you a Forecast towards the general direction of the next few bars. Somewhat like weather, the farther the bar (or day for weather), the harder it is to predict. For this reason we recommend you focusing on the first few bars as they are more accurate, but review the further ones as they may help show the trend and the way that pair will move.
We will conclude this tutorial here, hopefully this Predictive Indicator can be of some help and use to you. If you have any questions, comments, ideas or concerns please let us know.
Settings:
Forecast Length: How many bars should we predict into the Future? Max 13
Each Bar Length Multiplier: For each new Forecast bar, how many more bars are averaged? Min 2
VWMA Averaged Length: All Forecast bars are put into a VWMA, what length should we use?
EMA Averaged Length: All Forecast bars are put into a EMA, what length should we use?
Filtered Length: What length should we use for Filtered Volume and RSI?
EMA Strength Length: What length should we use for the EMA Strength
HAPPY TRADING!
MF Time Travel (Delay or Forward Charts) by MigueFinanceThis indicator allows you to "Time Travel" aka. delay or advance (or forward) the on-screen chart/indicator as well as well as to do the same with other additional charts that can be configured in the settings.
This might be very useful when comparing with other (or the same) indicator in time, if you consider probably an incoming move based on another time performance.
About the Settings:
The moved in time charts can also be expanded or contracted, as well as they can be moved vertically (offset).
To Delay put positive values on the weeks settings, to Advance put Negative values on the same.
The Expansion or Contraction Factor is simply a multiplier of amplitude so you can multiply by number like 0.5, 2, etc
The Vertical Offset simply moves up and down the indicator.
The Labels will also tell you the number of weeks and years that were changed so as to have a reference, as well as the indicator being used.
High Impact NewsDo you have a difficult time remembering high-impact news events throughout the trading week? Now there is an indicator that allows the user to put labels directly on their charts at specific times in the future so news events won’t sneak up on the user.
Description
The “High Impact News” TradingView indicator by Infinity Trading gives the user complete control of three labels that can be set to any time and day of the trading week, even in the future. Each label can be displayed at a specific time, on a unique day of the week, and with custom text. Also, each label has a choice of over 20 emojis to display on the chart along with user-defined text. The text color and size can be independently adjusted.
The position of the labels on the chart can be easily moved up or down with 5 built-in presents: Current Week High, Current Day High, Current Price, Current Day Low, and Current Week Low. Additionally, each label has a separate buffer that allows the users to move the label up or down in increments of five. All of these user-controls ensure the labels are exactly where the user wants them on their charts.
Limitations
This indicator displays labels in the future. TradingView sets a limit of 500 bars/candles in the future you can interact on. This TradingView limit means that labels can only be drawn 500 candles in the future on any timeframe. On larger timeframes this is not a problem and one trading week can easily display any labels. But on smaller timeframes labels multiple days in the future will exceed the 500 candle limit. When a label exceeds the 500 candle limit the indicator will have a temporary error. THIS IS NOT A PROBLEM. Simply go back to a higher timeframe or wait until the label is within 500 candles. All of your Settings will be saved! This is just a limit placed by TradingView that cannot be overwritten.
Important Notice
As stated above, this indicator draws labels in the future on your charts. To achieve future labels, this indicator draws labels in the present and shifts them to the right (which is the future) certain number of bars. Please be aware of the following characteristics of this indicator:
Labels will not appear until after midnight EST on Monday of each trading week
Labels will not appear over the weekends
Labels set to “Monday” won’t appear until midnight EST on Monday (or later)
Labels set to “Tuesday” through “Friday” won’t appear until the time specified in the Settings on Monday. For example, a FOMC label set to 2pm EST on Wednesday will not appear on the chart until 2pm EST on Monday
On 1-Hour or 2-Hour charts, please note that labels with a non-hour time will be shifted slightly so they appear on the chart. For example, a label at 8:15 am on the 5-min chart will be adjusted to 8:00 am on the 1-Hour chart so the label will appear
The above characteristics are a result of having to draw the labels at a specified time (of the trading week) and then calculating how many bars it takes to get the label to the correct time in the future.
Advanced Donchian Channels
Advanced Donchian Channels displays future donchian channel values based on the current information on the chart.
It displays a normal donchian channel at the specified user length with the future values extending from the current bar.
Depending on the direction of price movement, these values do not repaint. It is known when it does and does not repaint, and the actions are normal. See below for more information.
In a down trend, when the price is making new lows, the future "channel low" value will update every time the low is broken. The mean will also update, since the mean is the average of the channel high and channel low.
In a downtrend, the "channel high" value is concrete . It will not update until the high is broken.
Reverse these examples for uptrends.
Q;
How does it know the future values?
A:
Consider This: If we are below the current highest high, going down (aka: not setting new highs), the donchian channel "high" value will create a flat top, the flat top will start to decrease after we go further than our specified length. This is because the highest high within our specified length is no longer what it was previously. This action of time decay is a consistent movement of donchian channels . Because of this I am able to calculate these values before the current bar actually reaches them.
The indicator calculates the current length donchian channel at the current bar and then for every future bar up to your length specified it subtracts 1 from your length, calculates and displays the values accordingly.
The farthest future value is 1 length and the current bar is your specified length.
VALUES WILL ONLY BE UPDATED WHEN THE CHANNEL HIGH OR LOW IS BROKEN.
If price stays within the channel, all the future channel values will become solidified when the time reaches them.
This is not a gimmick, This data is accurate and can be used to help see future price trends
This chart should assist in visualizing what data you are seeing in this indicator.
Enjoy!
Fourier Spectrometer of Price w/ Extrapolation Forecast [Loxx]Fourier Spectrometer of Price w/ Extrapolation Forecast is a forecasting indicator that forecasts the sinusoidal frequency of input price. This method uses Linear Regression with a Fast Fourier Transform function for the forecast and is different from previous forecasting methods I've posted. Dotted lines are the forecast frequencies. You can change the UI colors and line widths. This comes with 8 frequencies out of the box. Instead of drawing sinusoidal manually on your charts, you can use this instead. This will render better results than eyeballing the Sine Wave that folks use for trading. this is the real math that automates that process.
Each signal line can be shown as a linear superposition of periodic (sinusoidal) components with different periods (frequencies) and amplitudes. Roughly, the indicator shows those components. It strongly depends on the probing window and changes (recalculates) after each tick; e.g., you can see the set of frequencies showing whether the signal is fast or slow-changing, etc. Sometimes only a small number of leading / strongest components (e.g., 3) can extrapolate the signal quite well.
Related Indicators
Fourier Extrapolator of 'Caterpillar' SSA of Price
Real-Fast Fourier Transform of Price w/ Linear Regression
Fourier Extrapolator of Price w/ Projection Forecast
Itakura-Saito Autoregressive Extrapolation of Price
Helme-Nikias Weighted Burg AR-SE Extra. of Price
***The period parameter doesn't correspond to how many bars back the drawing begins. Lines re rendered according to skipping mechanism due to TradingView limitations.
Future's spread with base contract (MOEX)English:
Indicator calculates spread between future and it's theoretical price baased on base contract, number of days to expiration and central bank key rate.
I didn't find any means of getting base contract of security on chart so I hardcoded futures and corresponding base contracts.
Hardcoded futures are MOEX (Moscow Exchange) only and key rate used in script is Russian Central Bank's key rate from 2013, but I believe you can easily adapt it to any other key rate history. I can share source code of tiny C++20 utility for easy generation of get_rate(time) function from more human-readable date format rather then UNIX timestamp used in PineScript.
Only quarterly futures are supported. Only in "SIU2022" like notation. "SI1!" like aliases are not supported.
Русский:
Индикатор отображает спред фьючерса к его теоретической цене с учётом усыхания на каждый день.
Не нашёл, как определить базовый актив фьючерса средствами TradingView - поэтому это соответствие захардкожено вручную.
Поддерживаются только квартальные фьючерсы, только MOEX, только хардкор.
Поддерживается история ключевой ставки ЦБ РФ с 2013 года.
Используйте коды фьючерсов вида "SIU2022".
Не поддерживаются альясы вроде "SI1!", "EU1!".
Future PreviewFuture Preview
Calculate real-time future order profit with open price, leverage and commission fee. Simple and straight forward. If you need any additional feature, please leave a comment below. I am glad to help.
Usage:
When adding Future Preview to chart, it will ask order open time and open price on the chart by clicking with left mouse on the desired value. These value can be changed lately, as well as the leverage and commission fee. Default leverage is 10 and default commission fee is 0.06% (taker).
There will be two horizontal lines. The solid longer line is the open price line, it shows the order open price. The shorter line moving with real-time price is the current price line, it shows the current price. There will be preview data shows on top or below the price line. Open price line is red for short order and green for long order. The current price line is red when the order is losing and it is green when it profiting. The back ground color follows the color of current price line. Background color transparency and gain/loss color can be changed in options.
There will be one horizontal line on the left if the option of showing open time is on (default is on). It shows the time stamp when current order opened.
After adding Future Preview to chart, there is option to add Taking Profit(TP) or Stop Loss(SL) to the chart.
Font size can be changed in option
Open Interest Divergence (OI vs Price)This indicator show having increasing Open Interest but price still move in a range (Open Interest Divergence vs price).
It is same with Divergence of indicators as RSI Divergence, Macd Divergence, .... It is easy to understand.
Additional, with MA line OI, you can see the change of OI.
Future Grand Trend This my version of try to think about next movement of chart.
WARNING:
- For purpose educate only
Ichimoku RONINA Full version of Ichimoku Kinko Hyo with many features ...
Features :
- Ichimoku Default Lines
- Settings for Shift all of Ichimoku Lines
- 52, 103, 108, 216 Periods Line
- Future TenkanSen, Kijunsen & Kumo Clouds
- 9/26/52 Cycle Counter
- Optimized for Pine Script 5
BTC ATH ROIThis indicator shows the ROI % of Bitcoin from when it passed its ATH of the previous bull cycle. I found it interesting that each time it crossed its ATH it took around 260-280 days to peak for each one. This bull run seems to follow between both of the previous bull runs including this recent dip.
There are a couple issues I want to fix but can't figure out:
1. You need to completely scroll out and move towards 2013 on the Daily chart for all 3 lines to show up. Would be nice to load all of that data at the start.
2. I can't query the value of the plots after they have been offset. This would be useful to create a prediction bias for the current plot so would could see where btc might go.
If you peeps know of a way to load all data or query plot values after offsets, please share. That would be awesome.
Example - Future Line DrawingExample primarily focuses on:
• creating a simple function to get a time offset value
• using the offset to set drawing locations in the future
• how to properly set up and manipulate line positions
Extras ( end of script ):
• inclusion of vertical lines for visualising start and end points using the time offsets
• inclusion of label to read out the current time offset forwards/backwards
This script publication is intended for:
• Educational Purposes
Who is it for?
• anyone who wants to learn the basics of drawing using 'time' for purposes of positioning
Sneeze ProjectionAlong a range of historical price values, this script draws a line from each previous price to the current price and moves the line so it begins at the current price instead of ending at it. The resulting polar array of lines which projects potential price trajectories into the future in a pattern which resembles a sneeze can be used as a visual aid to help anticipate future price direction. Sinus pressure can be adjusted to consider a lesser or greater historical range than the default which is 100 bars and the sneeze trajectory length will reflect the adjustments. I could not get the sneeze lines to be the exact lengths they should be due to type casting difficulties when scaling future delta x to be the same length as past delta x, but they're close enough.
Bitcoin Implied VolatilityThis simple script collects data from FTX:BVOLUSD to plot BTC’s implied volatility as a standalone indicator instead of a chart.
Implied volatility is used to gauge future volatility and often used in options trading.
Future PivotNormaly Pivot is calculate from the last candle.
Future Pivot is calculate from the running candle.
The Future Pivot Indicator is usefull at the end of a period (11pm, Sundays, and end of the month)
Have Fun
Please do not Copy&Paste, use this Link
Have Fun
BTC FS Diff / Percentage (XBTH20)Shows price difference by a percentage of future (BITMEX:XBTH20) and spot index (BITMEX:XTB) .
ANN Next Coming Candlestick Forecast SPX 1D v1.0WARNING:
Experimental and incomplete.
Script is open to development and will be developed.
This is just version 1.0
STRUCTURE
This script is trained according to the open, close, high and low values of the bars.
It is tried to predict the future values of opening, closing, high and low values.
A few simple codes were used to correlate expectation with current values. (You can see between line 129 - 159 )
Therefore, they are all individually trained.
You can see in functions.
The average training error of each variable is less than 0.011.
NOTE :
This script is designed for experimental use on S & P 500 and connected instruments only on 1-day bars.
The Plotcandle function is inspired by the following script of alexgrover :
Since we estimate the next values, our error rates should be much lower for all candlestick values. This is just first version to show logic.
I will continue to look for other variables to reach average error = 0.001 - 0.005 for each candlestick status.
Feel free to use and improve , this is open-source.
Best regards.
Commercial Short IndexThis script takes the hedger (commercial short) from the COT report and normalize the chart for configurable time frames (e.g. 26 weeks, 152 weeks and 260 weeks).
Based on the "Commercial Index-Buschi" script by MagicEins.
SPY FRACTAL S-R LEVELS (FIXED ANN MACD)
This is a fractal version of my deep learning script for SPY
In addition, buy and sell conditions may appear in bar colors in green and red.
You can choose from the menu if you wish.
Fractal codes do not belong to me.
So I didn't put any license.
You can use it as you want, you can change and modify.
Regards.Noldo
BTC FRACTAL ANN S-R LEVELS (Fixed ANN MACD)
This script is an adaptation of my deep learning system for Bitcoin to fractals.
Fractal codes are not belong to me. Original :
The code for the Deep learning (ANN MACD BTC) work belongs to me. Original:
I didn't get license for this script because the fractal codes don't belong to me.You can use it for any purpose.
This command can be a very helpful guide.You can use that fractals with your indicators for Bitcoin.
You can also combine these levels with ANN - MACD - BTC script.
Scripts about Artificial Neural Networks (ANN) will continue soon !
I hope it will help us to gain insight into technical analysis.
Best regards. Noldo.