ARIMA Indicator with Optional SmoothingOverview
The ARIMA (AutoRegressive Integrated Moving Average) Indicator is a powerful tool used to forecast future price movements by combining differencing, autoregressive, and moving average components. This indicator is designed to help traders identify trends and potential reversal points by analyzing the historical price data.
Key Features
AutoRegressive Component (AR): Utilizes past values to predict future prices.
Moving Average Component (MA): Averages past price differences to smooth out noise.
Differencing: Reduces non-stationarity in the time series data.
Optional Smoothing: Applies EMA to the ARIMA output for a smoother signal.
Customizable Parameters: Allows users to adjust AR and MA orders, differencing periods, and smoothing lengths.
Concepts Underlying the Calculations
Differencing: Subtracts previous prices from current prices to remove trends and seasonality, making the data stationary.
AutoRegressive Component (AR): Predicts future prices based on a linear combination of past values.
Moving Average Component (MA): Uses past forecast errors to refine future predictions.
Exponential Moving Average (EMA): Applies more weight to recent prices, providing a smoother and more responsive signal.
How It Works
The ARIMA Indicator first calculates the differenced series to achieve stationarity. Then, it computes the simple moving average (SMA) of this differenced series. The indicator uses the AR and MA components to adjust the SMA, creating an approximation of the ARIMA model. Finally, an optional smoothing step using EMA can be applied to the ARIMA approximation to produce a smoother signal.
How Traders Can Use It
Traders can use the ARIMA Indicator to:
Identify Trends: Detect emerging trends by observing the direction of the ARIMA line.
Spot Reversals: Look for divergences between the ARIMA line and the price to identify potential reversal points.
Generate Trading Signals: Use crossovers between the ARIMA line and the price to generate buy or sell signals.
Filter Noise: Enable the optional smoothing to filter out market noise and focus on significant price movements.
Example Usage Instructions
Add the ARIMA Indicator to your chart.
Adjust the input parameters to suit your trading strategy:
Set the SMA Length (e.g., 14).
Choose the Differencing Period (e.g., 1).
Define the AR Order (p) and MA Order (q) (e.g., 1).
Configure the Smoothing Length if smoothing is desired (e.g., 5).
Enable or disable smoothing as needed.
Observe the ARIMA line (blue) and compare it to the price chart.
Use the ARIMA line to identify trends and potential reversals.
Implement trading decisions based on the ARIMA line’s behavior relative to the price.
Timeseries
CyCLOPECyCLOPE - CYCLe OPErator
by Antonio Pace 2022
All right reserved
The script uses time series decomposition tecniques for decompose the price signal into 10 harmonics waves of increasing
period and wavelength, the sum of which is the signal itself, to eliminate background noise and show a cleaner signal.
Also divides the high frequencies (secondary, short period trend) from the primary trend (long period trend),
which is composed of low frequencies, and show both separately.
Find highs and lows and indicate possible trend reversals, and favorable entry or exit points.
T0 is the basic harmonic with period 8 Time Unit (TU) of the current timeframe.
T1 has a double period compared to T0, T2 has a double period compared to T1 and so on.
The script composes the primary trend by adding the First 5 harmonics of the longer period (T7 + T6 + T5 + T4 + T3), therefore of low frequency.
This eliminates the noise (short-term retracements) from the main trend.
Similarly, it reconstructs the secondary trend (a possible retracement of a primary trend) by adding the two harmonics with the high frequency (T2 + T1)
T0 the harmonic with highest frequency it is too noisy for this TimeFrame and is left out.
The script then identifies the maximums and minimums of the primary trend and the secondary trend, indicating possible trend reversal points or favorable entry points in a continuing trend.
The script finds the maxima and minima of the reconstructed signal so as to have as little noise as possible.
The reconstructed signal is shown on the screen. The blue line for the long term trend and the orange line for the short time trend.
If the cloud changes from red to green, it means that a local minimum has formed on the main tred, we are in the presence of a possible bullish inversion.
If the cloud turns from green to red then a local high has formed, a bearish trend reversal may have started.
The line on the cloud represents the subtrend instead.
If the line goes from green to red it has formed a maximum and if it goes from red to green it has formed a minimum.
For instance:
If the line is red and the cloud becomes red we are in the presence of a possible inversion and the beginning of a bearish trend.
I exit the long position and into the short position.
Similarly If the cloud is red and the line is green it means that I have a rising subtrend in a bearish dominate trend.
If the line turns red I have a bearish entry point.
If the cloud turns green the low of the subtrend has also become a low of the main trend, a bullish trend has started.
The script is designed to run on a daily timeframe, but it should work on any timeframe provided there are enough Time Units (1024 TU) in the past.
Minimum usable timeframe: 8h, at shorter timeframes the signal becomes indistinguishable from noise.
when the main trend and the sub-trend have the same magnitude, that is, the line and the cloud have the same size, but different color the noise prevails,
there is no valid information.
Wait for them to become the same color to enter the market again.
Once you have chosen the timeframe and asset on which to operate, select the harmonics to compose the main trend and those to compose the secondary trend
so that the indicator matches as much as possible with the real results.
Looking for the right balance between signal and noise and then continuing to use these settings, for this specific timeframe.
if you don't want have both Long Term and Short Trend trend on screen you can hide the short therm and add is harmonic to LongTime trend
in these case gren cloud indicate long and red color indicate short.
VERY IMPORTANT!
THE LONG TERM TREND DOMINATE OVER THE SHORT TERM TREND EXCEPT WHERE BOTH HAVE SAME MAGNITUDE.
The short term trend describe price retracemet over long term trend,
enter to market only when both have the same color.
Use short therm trend to find maximum or minimum of retracement.
FIND AND USE THE MINIMUM NUMBER OF WAVE PER TREND, THE RISK IS OVER FITTING THE PRICE LINE AND CREATE CONFUSION.
THE SCRIPT WORK BEST FOR DAILY TIMEFRAME AND COME CONFIGURED FOR THIS.
[Max] Power lag analysis An indicator that is a parametric lag power filter.
I'm starting Time Series Analysis by Hamilton James Douglas, to try to find some fun ideas to test and upgrade my skills on that subject and share them when it produce something that can be useful.
The idea behind that indicator, it's to only get the shape of the biggest movement in percent.
To solve that problem, I iterate about the rate of change of about 15 intervals and I apply a bigger power to the intervals that get bigger.
Why ? If the price is ranging, the indicator will show only the spics, but if the price breakout of the range, each new close that are longer from the price will have a better impact on the indicator and the last ones will be neglected.
I've try to use some parametric lag indicators on top of that indicator but he result is not good enough for me, it can't be used for trade directly but it can be an approach.
If you have upgrade ideas or recommendations on that indicator, I will be please to hear them.
Have fun with the script.
Have a great day !
Max
Autocorrelation PlotA tool to plot auto correlation of time series, this is useful in identifying periodicity in a time series or signal.
Due to the limits of Pine Script you'll need to add it multiple times if you want autocorrelation beyond 55 periods. I have added it 4 times here for 220 periods.
For more information on Autocorrelation see: en.wikipedia.org
Note: There are 1 bar gaps every 55 because I wanted the labels to remain every 5, but you don't have to have gaps....
TimeSync by KingThies TimeSync by Kingthies
Written in Pine v4
Applies one function that was published in the Tradingview Pinescript Manual
The Motivation behind this script - Time is 50% of your chart. Many ignore it entirely. This should help give an idea on how to read it and incorporate it in their analysis.
TimeSync by KingThies takes a simple concept and turns it into a visual tracking system of when timeframes of significant impact, all close at the same time.
By utilizing several high time-frames, we see overlaps in periods and more significant events occurring when multiple periods close at once.
The TFs included are 3D,1W,2W and 1M. When users use the timeframes above intraday, the resolution for these HTF's is shown. When using the LTFs, anything lower than 1D/is intraday, the user sees a similar concept but comprised of the 4H, 6H,8H and 10H charts.
Users can adjust the settings to show the HTFs in sync AND also factor in if the event was on a business quarter or new year, which adds more significance to the occurrence.
By seeing when these periods end in sync, we can assume more volatility is present in a given market, presenting various opportunities for traders to take advantage of a given situation.
Apologies in advance for any questions that come up - I will do my best to reply or respond here on Tradingview.com.
Additional Resources for this topic can be found in my account signature, located at the bottom of this post.