Kaschko's Seasonal TrendThis script calculates the average price moves (using each bar's close minus the previous bar's close) for the trading days, weeks or months (depending on the timeframe it is applied to) of a number of past calendar years (up to 30) to construct a seasonal trend which is then drawn as a seasonal chart (overlay) onto the price chart. Supported are the 1D,1W,1M timeframes.
The seasonal chart is adjusted to the price chart (so that both occupy the same height on the overall chart) and it is also de-trended, which means that the seasonal chart's starting value is the same in each year and the progression during the year is adjusted so that no abrupt gap occurs between years and the highs and lows of consecutive years of the seasonal chart (if projected over more than one year) are also at the same level. Of course, this also means that the absolute value of the seasonal chart has no meaning at all.
You can configure the number of bars the seasonal chart is drawn into the future. This projection shows how price could move in the future if the market shows the same seasonal tendencies like in the past. On the daily chart, the trading week of year (TWOY), trading day of month (TDOM) and trading day of year (TDOY) are shown in the status line.
Caution is advised as seasonality is based on the past. It is not a reliable prediction of the future. But it can still be used as an additional confirmation or contradiction of an otherwise recognized possible impending trend.
I have used a virtually identical indicator for a long time in a commercial software package popular among futures traders, but have not found anything comparable here. Therefore I implemented it myself. I hope you find it useful.
Forecast
Machine Learning Regression Trend [LuxAlgo]The Machine Learning Regression Trend tool uses random sample consensus (RANSAC) to fit and extrapolate a linear model by discarding potential outliers, resulting in a more robust fit.
🔶 USAGE
The proposed tool can be used like a regular linear regression, providing support/resistance as well as forecasting an estimated underlying trend.
Using RANSAC allows filtering out outliers from the input data of our final fit, by outliers we are referring to values deviating from the underlying trend whose influence on a fitted model is undesired. For financial prices and under the assumptions of segmented linear trends, these outliers can be caused by volatile moves and/or periodic variations within an underlying trend.
Adjusting the "Allowed Error" numerical setting will determine how sensitive the model is to outliers, with higher values returning a more sensitive model. The blue margin displayed shows the allowed error area.
The number of outliers in the calculation window (represented by red dots) can also be indicative of the amount of noise added to an underlying linear trend in the price, with more outliers suggesting more noise.
Compared to a regular linear regression which does not discriminate against any point in the calculation window, we see that the model using RANSAC is more conservative, giving more importance to detecting a higher number of inliners.
🔶 DETAILS
RANSAC is a general approach to fitting more robust models in the presence of outliers in a dataset and as such does not limit itself to a linear regression model.
This iterative approach can be summarized as follow for the case of our script:
Step 1: Obtain a subset of our dataset by randomly selecting 2 unique samples
Step 2: Fit a linear regression to our subset
Step 3: Get the error between the value within our dataset and the fitted model at time t , if the absolute error is lower than our tolerance threshold then that value is an inlier
Step 4: If the amount of detected inliers is greater than a user-set amount save the model
Repeat steps 1 to 4 until the set number of iterations is reached and use the model that maximizes the number of inliers
🔶 SETTINGS
Length: Calculation window of the linear regression.
Width: Linear regression channel width.
Source: Input data for the linear regression calculation.
🔹 RANSAC
Minimum Inliers: Minimum number of inliers required to return an appropriate model.
Allowed Error: Determine the tolerance threshold used to detect potential inliers. "Auto" will automatically determine the tolerance threshold and will allow the user to multiply it through the numerical input setting at the side. "Fixed" will use the user-set value as the tolerance threshold.
Maximum Iterations Steps: Maximum number of allowed iterations.
Autocorrelation - The Quant ScienceAutocorrelation - The Quant Science it is an indicator developed to quickly calculate the autocorrelation of a historical series. The objective of this indicator is to plot the autocorrelation values and highlight market moments where the value is positive and exceeds the attention threshold.
This indicator can be used for manual analysis when a trader needs to search for new price patterns within the historical series or to create complex formulas in estimating future prices.
What is autocorrelation?
Autocorrelation in trading is a statistical measure used to determine the presence of a relationship or pattern of dependence between values in a financial time series over time. It represents the correlation of past values in a series with its future values. In other words, autocorrelation in trading aims to identify if there are systematic relationships between the past prices or returns of a security or market and its future prices or returns. This analysis can be helpful in identifying patterns or trends that can be leveraged for informed trading decisions. The presence of autocorrelation may suggest that market prices or returns follow a certain pattern or trend over time.
Limitations of the model
It is important to note that autocorrelation does not necessarily imply a causal relationship between past and future values. Other variables or market factors may influence the dynamics of prices or returns, and therefore autocorrelation could be merely a random coincidence. Therefore, it is essential to carefully evaluate the results of autocorrelation analysis along with other information and trading strategies to make informed decisions.
How to use
The usage is very simple, you just need to add it to the current chart to activate the indicator.
From the user interface, you can manage two important features:
1. Lenght: the delay period applied to the historical series during the autocorrelation calculation can be managed from the user interface. By default, it is set to 20, which means that the autocorrelation ratio within the historical series is calculated with a delay of 20 bars.
2. Threshold: the threshold value that the autocorrelation level must meet can be managed from the user interface. By default, it is set to 0.50, which means that the autocorrelation value must be higher than this threshold to be considered valid and displayed on the chart.
3. Bar color: the color used to display the autocorrelation data and highlight the bars when autocorrelation is valid can be managed from the user interface.
To set up the chart
We recommend disabling the 'wick' and 'border' of the candlesticks from the chart settings for a high-quality user experience.
Inverted ProjectionThe "Inverted Projection" indicator calculates the Simple Moving Average (SMA) and draws lines representing an inverted projection. The indicator swaps the highs and lows of the projection to provide a unique perspective on price movement.
This indicator is a simple study that should not be taken seriously as a tool for predicting future price movements; it is purely intended for exploratory purposes.
Auto Trend ProjectionAuto Trend Projection is an indicator designed to automatically project the short-term trend based on historical price data. It utilizes a dynamic calculation method to determine the slope of the linear regression line, which represents the trend direction. The indicator takes into account multiple length inputs and calculates the deviation and Pearson's R values for each length.
Using the highest Pearson's R value, Auto Trend Projection identifies the optimal length for the trend projection. This ensures that the projected trend aligns closely with the historical price data.
The indicator visually displays the projected trend using trendlines. These trendlines extend into the future, providing a visual representation of the potential price movement in the short term. The color and style of the trendlines can be customized according to user preferences.
Auto Trend Projection simplifies the process of trend analysis by automating the projection of short-term trends. Traders and investors can use this indicator to gain insights into potential price movements and make informed trading decisions.
Please note that Auto Trend Projection is not a standalone trading strategy but a tool to assist in trend analysis. It is recommended to combine it with other technical analysis tools and indicators for comprehensive market analysis.
Overall, Auto Trend Projection offers a convenient and automated approach to projecting short-term trends, empowering traders with valuable insights into the potential price direction.
Ultimate Trend LineThe "Ultimate Trend Line" indicator, designed for overlay on financial charts, calculates and plots a global trend line. It works by first allowing users to input several parameters such as different lengths for up to 21 groups, a multiplier that defines the deviation from the linear regression line for calculating the upper and lower bands, and a color for the fill.
Using these inputs, it calculates the upper and lower bands for each length group based on a multiple of the standard deviation from the linear regression line. It then averages these bands to define the global trend line, which is plotted on the graph.
Although the code includes commented-out lines for plotting each individual upper and lower band, the indicator as it stands only displays the overall average trend line. The line's color and linewidth can be adjusted according to user preferences.
This indicator can be effectively used on both logarithmic and linear scales. This versatility allows it to be adaptable to various types of financial charts and trading styles, providing a flexible tool for users to assess and visualize trend patterns across different market conditions and time frames. It maintains its accuracy and relevance, regardless of the scale used, thus making it a comprehensive solution for trend line analysis in diverse scenarios.
It's important to note that the "Ultimate Trend Line" indicator requires a substantial amount of historical data to function properly. If insufficient historical data is available, the indicator may not display accurately or at all. This issue is particularly prevalent when using larger time units, such as weekly or monthly charts, where the available data may not stretch back far enough to satisfy the requirements of the indicator. As such, users should ensure they are operating on a time scale and data set that provides adequate historical depth for the reliable operation of this indicator.
TrueLevel BandsTrueLevel Bands is a powerful trading indicator that employs linear regression and standard deviation to create dynamic, envelope-style bands around the price action of a financial instrument. These bands are designed to help traders identify potential support and resistance levels, trend direction, and volatility.
The TrueLevel Bands indicator consists of multiple envelope bands, each constructed using different timeframes or lengths, and a multiple (mult) factor. The multiple factor determines the width of the bands by adjusting the number of standard deviations from the linear regression line.
Key Features of TrueLevel Bands
1. Multi-Timeframe Analysis: Unlike traditional moving average-based indicators, TrueLevel Bands allow traders to incorporate multiple timeframes into their analysis. This helps traders capture both short-term and long-term market dynamics, offering a more comprehensive understanding of price behavior.
2. Customization: The TrueLevel Bands indicator offers a high level of customization, allowing traders to adjust the lengths and multiple factors to suit their trading style and preferences. This flexibility enables traders to fine-tune the indicator to work optimally with various instruments and market conditions.
3. Adaptive Volatility: By incorporating standard deviation, TrueLevel Bands can automatically adjust to changing market volatility. This feature enables the bands to expand during periods of high volatility and contract during periods of low volatility, providing traders with a more accurate representation of market dynamics.
4. Dynamic Support and Resistance Levels: TrueLevel Bands can help traders identify dynamic support and resistance levels, as the bands adjust in real-time according to price action. This can be particularly useful for traders looking to enter or exit positions based on support and resistance levels.
5. The "Global Trend Line" refers to the average of the bands used to indicate the overall trend.
Why TrueLevel Bands are Different from Classic Moving Averages
TrueLevel Bands differ from conventional moving averages in several ways:
1. Linear Regression: While moving averages are based on simple arithmetic means, TrueLevel Bands use linear regression to determine the centerline. This offers a more accurate representation of the trend and helps traders better assess potential entry and exit points.
2. Envelope Style Bands: Unlike moving averages, which are single lines, TrueLevel Bands form envelope-style bands around the price action. This provides traders with a visual representation of potential support and resistance levels, trend direction, and volatility.
3. Multi-Timeframe Analysis: Classic moving averages typically focus on a single timeframe. In contrast, TrueLevel Bands incorporate multiple timeframes, enabling traders to capture a broader understanding of market dynamics.
4. Adaptive Volatility: Traditional moving averages do not account for changing market volatility, whereas TrueLevel Bands automatically adjust to volatility shifts through the use of standard deviation.
The TrueLevel Bands indicator is a powerful, versatile tool that offers traders a unique approach to technical analysis. With its ability to adapt to changing market conditions, provide multi-timeframe analysis, and dynamic support and resistance levels, TrueLevel Bands can serve as an invaluable asset to both novice and experienced traders looking to gain an edge in the markets.
Price Action Color Forecast (Expo)█ Overview
The Price Action Color Forecast Indicator , is an innovative trading tool that uses the power of historical price action and candlestick patterns to predict potential future market movements. By analyzing the colors of the candlesticks and identifying specific price action events, this indicator provides traders with valuable insights into future market behavior based on past performance.
█ Calculations
The Price Action Color Forecast Indicator systematically analyzes historical price action events based on the colors of the candlesticks. Upon identifying a current price action coloring event, the indicator searches through its past data to find similar patterns that have happened before. By examining these past events and their outcomes, the indicator projects potential future price movements, offering traders valuable insights into how the market might react to the current price action event.
The indicator prioritizes the analysis of the most recent candlesticks before methodically progressing toward earlier data. This approach ensures that the generated candle forecast is based on the latest market dynamics.
The core functionality of the Price Action Color Forecast Indicator:
Analyzing historical price action events based on the colors of the candlesticks.
Identifying similar events from the past that correspond to the current price action coloring event.
Projecting potential future price action based on the outcomes of past similar events.
█ Example
In this example, we can see that the current price action pattern matches with a similar historical price action pattern that shares the same characteristics regarding candle coloring. The historical outcome is then projected into the future. This helps traders to understand how the past pattern evolved over time.
█ How to use
The indicator provides traders with valuable insights into how the market might react to the current price action event by examining similar historical patterns and projecting potential future price movements.
█ Settings
Candle series
The candle lookback length refers to the number of bars, starting from the current one, that will be examined in order to find a similar event in the past.
Forecast Candles
Number of candles to project into the future.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Trend forecasting by c00l75----------- ITALIANO -----------
Questo codice è uno script di previsione del trend creato solo a scopo didattico. Utilizza una media mobile esponenziale (EMA) e una media mobile di Hull (HMA) per calcolare il trend attuale e prevedere il trend futuro. Il codice utilizza anche una regressione lineare per calcolare il trend attuale e un fattore di smorzamento per regolare l’effetto della regressione lineare sulla previsione del trend. Infine il codice disegna due linee tratteggiate per mostrare la previsione del trend per i periodi futuri specificati dall’utente. Se ti piace l'idea mettimi un boost e lascia un commento!
----------- ENGLISH -----------
This code is a trend forecasting script created for educational purposes only. It uses an exponential moving average (EMA) and a Hull moving average (HMA) to calculate the current trend and forecast the future trend. The code also uses a linear regression to calculate the current trend and a damping factor to adjust the effect of the linear regression on the trend prediction. Finally, the code draws two dashed lines to show the trend prediction for future periods specified by the user. If you like the idea please put a boost and leave a comment!
Volume Forecasting [LuxAlgo]The Volume Forecasting indicator provides a forecast of volume by capturing and extrapolating periodic fluctuations. Historical forecasts are also provided to compare the method against volume at time t .
This script will not work on tickers that do not have volume data.
🔶 SETTINGS
Median Memory: Number of days used to compute the median and first/third quartiles.
Forecast Window: Number of bars forecasted in the future.
Auto Forecast Window: Set the forecast window so that the forecast length completes an interval.
🔶 USAGE
The periodic nature of volume on certain securities allows users to more easily forecast using historical volume. The forecast can highlight intervals where volume tends to be more important, that is where most trading activity takes place.
More pronounced periodicity will tend to return more accurate forecasts.
The historical forecast can also highlight intervals where high/low volume is not expected.
The interquartile range is also highlighted, giving an area where we can expect the volume to lie.
🔶 DETAILS
This forecasting method is similar to the time series decomposition method used to obtain the seasonal component.
We first segment the chart over equidistant intervals. Each interval is delimited by a change in the daily timeframe.
To forecast volume at time t+1 we see where the current bar lies in the interval, if the bar is the 78th in interval then the forecast on the next bar is made by taking the median of the 79th bar over N intervals, where N is the median memory.
This method ensures capturing the periodic fluctuation of volume.
Momentum Covariance Oscillator by TenozenWell, guess what? A new indicator is here! Again it's a coincidence, as I experiment with my formula. So far it's less noisy than Autoregressive Covariance Oscillator, so possibly this one is better. The formula is much simpler, care me to explain.
___________________________________________________________________________________________________
Yt = close - previous average
Val = Yt/close
___________________________________________________________________________________________________
Welp that's the formula lol. Funny thing is that it's so simple, but it's good! What matters is the use of it haha.
So how to use this Oscillator? If the value is above 0, we expect a bullish response, if the value is below 0 we expect a bearish response. That simple. Ciao.
(Any questions and suggestions? feel free to comment!)
Autoregressive Covariance Oscillator by TenozenWell to be honest I don't know what to name this indicator lol. But anyway, here is my another original work! Gonna give some background of why I create this indicator, it's all pretty much a coincidence when I'm learning about time series analysis.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Well, the formula of Auto-covariance is:
E{(X(t)-(t) * (X(t-s)-(t-s))}= Y_s
But I don't multiply both values but rather subtract them:
E{(X(t)-(t) - (X(t-s)-(t-s))}= Y_s?
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
For arm_vald, the equation is as follows:
arm_vald = val_mu + mu_plus_lsm + et
val_mu --> mean of time series
mu_plus_lsm --> val_mu + LSM
et --> error term
As you can see, val_mu^2. I did this so the oscillator is much smoother.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
After I get the value, I normalize them:
aco = Y_s? / arm_vald
So by this calculation, I get something like an oscillator!
(more details in the code)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
So how to use this indicator? It's so easy! If the value is above 0, we gonna expect a bullish response, if the value is below 0, we gonna expect a bearish response; that simple. Be aware that you should wait for the price to be closed before executing a trade.
Well, try it out! So far this is the most powerful indicator that I've created, hope it's useful. Ciao.
(more updates for the indicator if needed)
Fed Projected Interest RatesThis script shows you the current interest rates by the FED (see ZQ symbol nearest expiration)
and the next expirations (see ZQ further expiration dates).
It is important to keep your expiration and descriptions up to date, to do that to the indicator inputs and change as you please.
BB Mod + ForecastThis is a combination of two previous indicators; ALMA stdev band with fibs and Vector MACD.
Bollinger Band Mod fits the standard deviation on both sides of the center moving average ( ALMA +/- stdev / 2 ) and calculates Fibonacci ratios from stdev on both sides.
It is more averaging and more responsive at the same time compared to Bollinger Band.
Forecast is calculated from difference between origin ma ( ALMA from hl2 ) and six different period Hull moving averages averaged together and added to the center ma on both sides.
Fibonacci levels for 0.618 1.618 and 2.618 are added.
The dashed lines point towards the trend. Gives you a better idea of the current trend and momentum in the band.
Faytterro Oscillatorwhat is Faytterro oscillator?
An oscillator that perfectly identifies overbought and oversold zones.
what it does?
this places the price between 0 and 100 perfectly but with a little delay. To eliminate this delay, it predicts the price to come, and the indicator becomes clearer as the probability of its prediction increases.
how it does it?
This indicator is obtained with "faytterro bands", another indicator I designed. For more information about faytterro bands:
A kind of stochastic function is applied to the faytterro bands indicator, and then another transformation formula that I have designed and explained in detail in the link above is applied. These formulas are also applied again to calculate the prediction parts.
how to use it?
Use this indicator to see past overbought and oversold zones and to see future ones.
The input named source is used to change the source of the indicator.
The length serves to change the signal frequency of the indicator.
Hurst Spectral Analysis Oscillator"It is a true fact that any given time history of any event (including the price history of a stock) can always be considered as reproducible to any desired degree of accuracy by the process of algebraically summing a particular series of sine waves. This is intuitively evident if you start with a number of sine waves of differing frequencies, amplitudes, and phases, and then sum them up to get a new and more complex waveform." (Spectral Analysis chapter of J M Hurst's book, Profit Magic )
Background: A band-pass filter or bandpass filter is a device that passes frequencies within a certain range and rejects (attenuates) frequencies outside that range. Bandpass filters are widely used in wireless transmitters and receivers. Well-designed bandpass filters (having the optimum bandwidth) maximize the number of signal transmitters that can exist in a system while minimizing the interference or competition among signals. Outside of electronics and signal processing, other examples of the use of bandpass filters include atmospheric sciences, neuroscience, astronomy, economics, and finance.
About the indicator: This indicator will accept float/decimal length inputs to display a spectrum of 11 bandpass filters. The trader can select a single bandpass for analysis that includes future high/low predictions. The trader can also select which bandpasses contribute to a composite model of expected price action.
10 Statements to describe the 5 elements of Hurst's price-motion model:
Random events account for only 2% of the price change of the overall market and of individual issues.
National and world historical events influence the market to a negligible degree.
Foreseeable fundamental events account for about 75% of all price motion. The effect is smooth and slow changing.
Unforeseeable fundamental events influence price motion. They occur relatively seldom, but the effect can be large and must be guarded against.
Approximately 23% of all price motion is cyclic in nature and semi-predictable (basis of the "cyclic model").
Cyclicality in price motion consists of the sum of a number of (non-ideal) periodic cyclic "waves" or "fluctuations" (summation principle).
Summed cyclicality is a common factor among all stocks (commonality principle).
Cyclic component magnitude and duration fluctuate slowly with the passage of time. In the course of such fluctuations, the greater the magnitude, the longer the duration and vice-versa (variation principle).
Principle of nominality: an element of commonality from which variation is expected.
The greater the nominal duration of a cyclic component, the larger the nominal magnitude (principle of proportionality).
Shoutouts & Credits for all the raw code, helpful information, ideas & collaboration, conversations together, introductions, indicator feedback, and genuine/selfless help:
🏆 @TerryPascoe
🏅 DavidF at Sigma-L, and @HPotter
👏 @Saviolis, parisboy, and @upslidedown
Wavechart v2 ##Wave Chart v2##
For analyzing Neo-wave theory
Plot the market's highs and lows in real-time order.
Then connect the highs and lows
with a diagonal line. Next, the last plot of one day (or bar) is connected with a straight line to the
first plot of the next day (or bar).
Movement Polarization (MoP)This shows the negative or positive charge of price movement and volume .
The "Polarization" shows how much negativity or positivity the movement of the price and volume have.
IMPORTANT:
Use with crypto currencies only is highly recommended.
If the volume in a currency is not visible, adjust the "Factor" number higher in the "Inputs" tab.
Adjust it until there is a balance between the vertical spread of the volume and polarization.
There will be a noticeable jump in the scale of the indicator if it is set too high.
The "Factor" is scaled at a baseline for SHIB prices. Any lower price scales than SHIB's will not show the volume .
Version:
This is a forked codebase to conserve the functionality of "RSI TV". The "RSI TV" focuses only on the RSI trend, this focuses on price and volume movement.
As such, there is no need for the MA of the RSI. Also, the TV Line from the "RSI TV" is used to show polarization of movement in this context.
The Trend Veracity line from the "RSI TV" has a broad scope in verifying different, particular trends, not just the RSI trend.
The RSI, volume, and polarization are all conveniently placed within the same scale to facilitate longer-term trading with price action. See also: "RSI TV" .
How this indicator is original; what it does, and how it does it:
This indicator has an original, unique ability to give the volume a further-projecting forecast.
The MoP does this by placing the volume on a vertical scale. It then compares it to a polarization level.
This gives 3 reference points: 1) Past data of volume, 2) volume vertical thresholds, and 3) polarization levels.
The volume by itself has no reference but its own past data. This gives a short-sighted forecast.
How to use it:
Useful with a trend finding indicator and price-action trading. See notes in picture above (scroll chart left to see first note).
Extra indicator shown in chart is an adjusted "ARL Bands" .
1) A condensing of volume and polarization usually means that an uptrend will soon turn.
2) A widening of volume and polarization usually means that a downtrend will soon turn.
3) A weak uptrend is indicated when volume falls while low, positive polarization also falls.
4) A growing uptrend is indicated when volume and positive polarization grow together.
5) Overlapping volume and positive polarization usually signifies oncoming peaks.
DB Change Forecast ProDB Change Forecast Pro
What does the indicator do?
The DB Change Forecast Pro is a unique indicator that uses price change on HLC3 to detect buy and sell periods along with plotting a linear regression price channel with oversold and undersold zones. It also has a linear regression change forecast mode to optionally project market direction.
Change is calculated by taking a two-bar change of HLC3 and dividing that by the price or, optionally, a fixed divisor.
A fast-moving change cloud is then calculated and displayed as the "regular version" plot (shown in light gray). When the cloud bottom is above low, a buy zone is detected. When the cloud top is below the high, a sell zone is detected.
The linear regression price channel is calculated similarly but using a much slower change rate. The linear regression price channel shows reasonable high, low and HLC3 ranges. At the bar's opening, the channel will be more compact and come fairly accurate about 1/4 into the bar timeframe.
The change forecasted price is projected on the right side of the current bar to indicate the current timeframe direction. Please note this forecasting feature is shown in orange when it's early in the timeframe and gray when the timeframe is more likely to produce an accurate direction forecast for the upcoming bar.
You can use these projected dashed lines to see possible market movements for the Current bar and possible market direction for the next bar. Kindly note these projects change; they should be used to understand possible extreme highs/lows for the current bar or market direction.
The indicator includes an optional change forecast projection feature hidden by default. It will project the market forecast channel with an offset of 1. The forecast is defaulted to an offset of 1 to show market direction. However, you can modify to zero the offset to show the current bar forecast and forecast history.
How should this indicator be used?
First, very important,
1. Settings > Set Symbol to Desired
2. Settings > Set High Timeframe to "Chart"
3. Settings > Ensure "Use price as divisor" is checked.
It's recommended to use this indicator in higher timeframes. Buy and sell signals are displayed in real-time. However, waiting until 1/4 to 1/2 into the current bar is recommended before taking action, and change can happen.
The buy/sell signals (zones) provide recommendations on playing a long vs. a short. When in a buy sone, only play longs. When in a sell zone, only play shorts.
Then use the linear regression price channel oversold and undersold zones to optionally open and close positions within the buy/sell zones.
For example, consider opening a long in a buy zone when the linear regression price channel shows undersold. Then consider closing the long when the price moves into the linear regression oversold or higher. Then repeat as long as it's in the buy zone. Then vice versa for sell zones and shorting.
At basic design, buy in the buy zone, sell or short in the sell zone. If you are up for higher trading frequencies, use the linear regression price channel as described in the example above.
Please note, as, with all indicators, you may need to adjust to fit the indicator to your symbol and desired timeframe.
This is only an example of use. Please use this indicator as your own risk and after doing your due diligence.
Does the indicator include any alerts?
Yes,
"DB CFHLC3: Signal BUY" - Is triggered when a buy signal is fired.
"DB CFHLC3: Signal SELL" - Is triggered when a sell signal is fired.
"DB CFHLC3: Zone BUY" - Is triggered when a buy zone is detected.
"DB CFHLC3: Zeon SELL" - Is triggered when a sell zone is detected.
"DB CFHLC3: Oversold SELL" - Is triggered when the price exceeds the oversold level.
"DB CFHLC3: Undersold BUY" - Is triggered when the price goes below the undersold level.
Any other tips?
Once you have configured the indicator for your symbol and chart timeframe. Meaning the plots are displayed over the price. Check out larger timeframes such as W, 2W, 3W, 4W, M, and 4M. It works wonderfully for showing market lows and highs for long-term investing too!
Another, tip is to combine it with your favorite indicator, such as TTM Squeeze or MACD for confirmation purposes. You may be surprised how fast the indicator shows market direction changes on higher timeframes.
You can just as easily use a high timeframe such as D, 2D, or 3D for day trading due to how the linear price channel works.
Why am I not selling this indicator?
I would like to bless the TradingView community, and I enjoy publishing custom indicators.
If you enjoy this indicator, please consider leaving a thumbs up or a comment for others to know about your experience or recommendations.
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.
Fourier Extrapolator of 'Caterpillar' SSA of Price [Loxx]Fourier Extrapolator of 'Caterpillar' SSA of Price is a forecasting indicator that applies Singular Spectrum Analysis to input price and then injects that transformed value into the Quinn-Fernandes Fourier Transform algorithm to generate a price forecast. The indicator plots two curves: the green/red curve indicates modeled past values and the yellow/fuchsia dotted curve indicates the future extrapolated values.
What is the Fourier Transform Extrapolator of price?
Fourier Extrapolator of Price is a multi-harmonic (or multi-tone) trigonometric model of a price series xi, i=1..n, is given by:
xi = m + Sum( a*Cos(w*i) + b*Sin(w*i), h=1..H )
Where:
xi - past price at i-th bar, total n past prices;
m - bias;
a and b - scaling coefficients of harmonics;
w - frequency of a harmonic ;
h - harmonic number;
H - total number of fitted harmonics.
Fitting this model means finding m, a, b, and w that make the modeled values to be close to real values. Finding the harmonic frequencies w is the most difficult part of fitting a trigonometric model. In the case of a Fourier series, these frequencies are set at 2*pi*h/n. But, the Fourier series extrapolation means simply repeating the n past prices into the future.
Quinn-Fernandes algorithm find sthe harmonic frequencies. It fits harmonics of the trigonometric series one by one until the specified total number of harmonics H is reached. After fitting a new harmonic , the coded algorithm computes the residue between the updated model and the real values and fits a new harmonic to the residue.
see here: A Fast Efficient Technique for the Estimation of Frequency , B. G. Quinn and J. M. Fernandes, Biometrika, Vol. 78, No. 3 (Sep., 1991), pp . 489-497 (9 pages) Published By: Oxford University Press
Fourier Transform Extrapolator of Price inputs are as follows:
npast - number of past bars, to which trigonometric series is fitted;
nharm - total number of harmonics in model;
frqtol - tolerance of frequency calculations.
What is Singular Spectrum Analysis ( SSA )?
Singular spectrum analysis ( SSA ) is a technique of time series analysis and forecasting. It combines elements of classical time series analysis, multivariate statistics, multivariate geometry, dynamical systems and signal processing. SSA aims at decomposing the original series into a sum of a small number of interpretable components such as a slowly varying trend, oscillatory components and a ‘structureless’ noise. It is based on the singular value decomposition ( SVD ) of a specific matrix constructed upon the time series. Neither a parametric model nor stationarity-type conditions have to be assumed for the time series. This makes SSA a model-free method and hence enables SSA to have a very wide range of applicability.
For our purposes here, we are only concerned with the "Caterpillar" SSA . This methodology was developed in the former Soviet Union independently (the ‘iron curtain effect’) of the mainstream SSA . The main difference between the main-stream SSA and the "Caterpillar" SSA is not in the algorithmic details but rather in the assumptions and in the emphasis in the study of SSA properties. To apply the mainstream SSA , one often needs to assume some kind of stationarity of the time series and think in terms of the "signal plus noise" model (where the noise is often assumed to be ‘red’). In the "Caterpillar" SSA , the main methodological stress is on separability (of one component of the series from another one) and neither the assumption of stationarity nor the model in the form "signal plus noise" are required.
"Caterpillar" SSA
The basic "Caterpillar" SSA algorithm for analyzing one-dimensional time series consists of:
Transformation of the one-dimensional time series to the trajectory matrix by means of a delay procedure (this gives the name to the whole technique);
Singular Value Decomposition of the trajectory matrix;
Reconstruction of the original time series based on a number of selected eigenvectors.
This decomposition initializes forecasting procedures for both the original time series and its components. The method can be naturally extended to multidimensional time series and to image processing.
The method is a powerful and useful tool of time series analysis in meteorology, hydrology, geophysics, climatology and, according to our experience, in economics, biology, physics, medicine and other sciences; that is, where short and long, one-dimensional and multidimensional, stationary and non-stationary, almost deterministic and noisy time series are to be analyzed.
"Caterpillar" SSA inputs are as follows:
lag - How much lag to introduce into the SSA algorithm, the higher this number the slower the process and smoother the signal
ncomp - Number of Computations or cycles of of the SSA algorithm; the higher the slower
ssapernorm - SSA Period Normalization
numbars =- number of past bars, to which SSA is fitted
Included:
Bar coloring
Alerts
Signals
Loxx's Expanded Source Types
Related Fourier Transform Indicators
Real-Fast Fourier Transform of Price w/ Linear Regression
Fourier Extrapolator of Variety RSI w/ Bollinger Bands
Fourier Extrapolator of Price w/ Projection Forecast
Related Projection Forecast Indicators
Itakura-Saito Autoregressive Extrapolation of Price
Helme-Nikias Weighted Burg AR-SE Extra. of Price
Related SSA Indicators
End-pointed SSA of FDASMA
End-pointed SSA of Williams %R
Full Volatility Statistics and Forecast
This is a tool designed to translate the data from the expected volatility of different assets, such as for example VIX, which measures the volatility of SP500 index.
Once get the data from the volatility asset we want to measure(for this test I have used VIX), we are going to translate it the required timeframe expected move by dividing the initial value into :
252 = if we want to use the daily timeframe, since there are ~252 aproximative daily trading days
52 = if we want to use the weekly timeframe, since there 52 trading weeks in a year
12 = if we want to use the monthly timeframe, since there are 12 months in a year
For this example I have used 252 with the daily timeframe.
In this scenario, we can see that we had 5711 total cnadles which we analysed, and in this case, we had 942 crosses, where the daily movement ended up either above or below the channel made from the opening daily candle value + expected movement from the volatility, giving as a total of 16.5% of occurances that volatility was higher than expected, and in 83.5% of the times, we can see that the price stayed within our channel.
At the same time, we can see that we had 6 max losses in a row ( OUT) AND 95 max wins in a row (IN), and at the same time in those moments when the volatility crosses happen we had a 0.51% avg movements when the top crossed happened, and 0.67% avg movements when the bot happened.
Lastly on the second part of the panel, we had E which means the expected movement of today, for example it has 61.056$ , so lets say price opened on 4083, our top is 4083 + 61 and our bot is 4083 - 61 ( giving us the daily channel). At continuation we can see that overall the avg bull candle os 0.714% and avg bear candle was 0.805% .
I hope this tool will help you with your future analysis and trades !
If you have any questions please let me know !
vol_coneDraws a volatility cone on the chart, using the contract's realized volatility (rv). The inputs are:
- window: the number of past periods to use for computing the realized volatility. VIX uses 30 calendar days, which is 21 trading days, so 21 is the default.
- stdevs: the number of standard deviations that the cone will cover.
- periods to project: the length of the volatility cone.
- periods per year: the number of periods in a year. for a daily chart, this is 252. for a thirty minute chart on a contract that trades 23 hours a day, this is 23 * 2 * 252 = 11592. for an accurate cone, this input must be set correctly, according to the chart's time frame.
- history: show the lagged projections. in other words, if the cone is set to project 21 periods in the future, the lines drawn show the top and bottom edges of the cone from 23 periods ago.
- rate: the current interest or discount rate. this is used to compute the forward price of the underlying contract. using an accurate forward price allows you to compare the realized volatility projection to the implied volatility projections derived from options prices.
Example settings for a 30 minute chart of a contract that trades 23 hours per day, with 1 standard deviation, a 21 day rv calculation, and half a day projected:
- stdevs: 1
- periods to project: 23
- window: 23 * 2 * 21 = 966
- periods per year: 23 * 2 * 252 = 11592
Additionally, a table is drawn in the upper right hand corner, with several values:
- rv: the contract's current realized volatility.
- rnk: the rv's percentile rank, compared to the rv values on past bars.
- acc: the proportion of times price settled inside, versus outside, the volatility cone, "periods to project" into the future. this should be around 65-70% for most contracts when the cone is set to 1 standard deviation.
- up: the upper bound of the cone for the projection period.
- dn: the lower bound of the cone for the projection period.
Limitations:
- pinescript only seems to be able to draw a limited distance into the future. If you choose too many "periods to project", the cone will start drawing vertically at some limit.
- the cone is not totally smooth owing to the facts a) it is comprised of a limited number of lines and b) each bar does not represent the same amount of time in pinescript, as some cross weekends, session gaps, etc.