MFI + Realtime DivergencesMoney Flow Index (MFI) + Realtime Divergences + Alerts
This version of the MFI indicator adds the following 5 additional features to the stock MFI:
- Optional divergence lines drawn directly onto the oscillator in realtime.
- Configurable alerts to notify you when divergences occur.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes, including the ability to enable automatic adjustment of pivot period per chart timeframe.
- Background colouring option to indicate when the MFI oscillator has crossed above or below its centerline, or optionally when both the MFI has crossed its centerline and an external oscillator, which can be linked via the settings, has also crossed its centerline.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
This indicator adds additional features onto the standard MFI , whose core calculations remain unchanged. Namely the configurable option to automatically, quickly and clearly draw divergence lines onto the oscillator for you as they occur in realtime. It also has the addition of unique alerts, so you can be notified when divergences occur without spending all day watching the charts. Furthermore, this version of the TSI comes with configurable lookback periods, which can be configured in order to adjust the sensitivity of the divergences, in order to suit shorter or higher timeframe trading approaches.
What is the Money Flow Index ( MFI )?
Investopedia describes the True Strength Indicator as follows:
“The Money Flow Index ( MFI ) is a technical oscillator that uses price and volume data for identifying overbought or oversold signals in an asset. It can also be used to spot divergences which warn of a trend change in price. The oscillator moves between 0 and 100.
Unlike conventional oscillators such as the Relative Strength Index ( RSI ), the Money Flow Index incorporates both price and volume data, as opposed to just price. For this reason, some analysts call MFI the volume-weighted RSI .”
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.
Configurable pivot periods.
You can adjust the default pivot periods to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer: This script includes code from the stock MFI by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.
M-oscillator
MTF TMOTMO - (T)rue (M)omentum (O)scillator) MTF (Higher Aggregation) Version
TMO calculates momentum using the DELTA of price. Giving a much better picture of the trend, reversals & divergences than most momentum oscillators using price. Aside from the regular TMO, this study combines four different TMO aggregations into one indicator for an even better picture of the trend. Once you look deeper into this study you will realize how complex this tool is. This version also produce much more information like crosses, divergences, overbought / oversold signals, higher aggregation fades etc. It is probably not even possible to explain them all, there could easily be an entire e-book about this study.
I have been using this tool for a couple of years now, and this is what i have learned so far:
Favorite Time Frame Variations:
1. 1m / 5m / 30m - Great for intraday futures or options scalps. 30m TMO serves as the overall trend gauge for the day. 5min dictates the longer term intraday moves as well as direction of the 1min. 1min is for the scalps. When the 5min TMO is sloping higher focus should be on 1min buy signals (red to green cross) and vice versa for the 5min agg. sloping down.
2. 5m / 30m / 60m - Also an interesting variation for day trading the 3-5 min charts. Producing more cleaner & beginner-friendly signals that lasts couple of minutes instead of seconds.
3. 120m / Day / 2 Day - For the 30m to 1H or 2H timeframes. Daily & 2 Day dictates the overall trend. 120 min for the signals. Great for a multi-day swings.
4. Day / 2 Day / Week - Good for the daily charts, swing trading analysis as the weekly dictates the overall trend, daily dictates the signals and the 2 day cleans out the daily signals. If the daily & 2 day are not aligned togather, daily signal means nothing. Weekly dictates 2 day - 2 day dictates daily.
5. Week / Month / 3 Month - Same thing as the previous variation but for the weekly charts.
TMO Length:
The default vanilla settings are 14,5,3. Some traders prefer 21,5,3 as the TMO length is litle higher = TMO will potenially last little longer which could teoretically produce less false signals but slower crosses which means signals will lag more behind price. The lower the length, the faster the oscillator oscillates. It is the noice vs. the lag debate. The Length can be changed, but i would not personally touch the other two. Few points up or down on length will not drastically change much. But changes on Calc Length and Smooth Length can produce totally different signals from the original.
Tips & Tricks:
1. Observe
- This is the best tip & trick I can give you. The #1 best way to learn how any study operates is to just observe how it works in certain situations from the past. MTF TMO is not
an exception.
2. The Power of the Higher Aggregation
- The higher aggregation ALWAYS dictates the lower one. Best way to see this? Just 2x the current timeframe aggregation = so on daily chart, plot the daily & two day TMOs and you will notice how the higher agg. smooths out the current agg. The higher the aggregation is, the smoother (but slower) will the TMO turn. The real power kicks in when the 3 or 4 aggregations are aligned togather in one direction.
3. Position of the Higher Aggregation in Relation to the Extremes
- Overbought / oversold signals might not really work on the current aggregation. But pay attention to the higher aggregations in relation to the extremes. Ex: on the daily chart - daily TMO inside the OB / OS extremes might not mean much. But once the higher aggregations such as 3 day or Weekly TMO enters OB/OS zone togather with the daily, this can be a very powerful signal for a TMO reversion to the zeroline.
4. Crosses
- Yes, crosses do work. Personally, I never really focused on them. The thing about the crosses is that it is crucial to pick the right higher aggregation to the combination of the current one that would be reliable but also print enough signals. The closer the cross is to the OB / OS extremes, the more bigger move can occur. Crosses around the zero line can be considered as less quality crosses.
5. Divergences
- TMO can print awesome divergences. The best divergences are on the current aggregation (TMO agg. same as the chart) since the current agg. oscillates fast, it can usually produce lower lows & higher highs faster then any higher aggregations. Easy setup: wait for the higher aggregation to reach the OB / OS extremes and watch the current (chart) aggregation to print a divergence.
6. Three is Enough
- I personally find more than three aggregations messy and hard to read. But there is always the option to turn on the 4th one. Just switch the TMO 4 Main, TMO 4 Signal and TMO 4 Fill in the style settings.
Hope it helps.
MTF Stoch RSI + Realtime DivergencesMulti-timeframe Stochastic RSI + Realtime Divergences + Alerts + Pivot lookback periods.
This version of the Stochastic RSI adds the following additional features to the stock UO by Tradingview:
- Optional 3 x Multiple-timeframe overbought and oversold signals, indicating where 3 selected timeframes are all overbought (>80) or all oversold (<20) at the same time, with alert option.
- Optional divergence lines drawn directly onto the oscillator in realtime, with alert options.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes, including the ability to enable automatic adjustment of pivot period per chart timeframe.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
- Indications where the Stoch RSI is crossing down from above the overbought threshold (<80) and crossing above the oversold threshold (>20) levels on a given user selected timeframe, by printing gold dots on the indicator.
- Also includes standard configurable Stoch RSI options, including k length, d length, RSI length, Stochastic length, and source type (close, hl2, etc)
While this version of the Stochastic RSI has the ability to draw divergences in realtime along with related settings and alerts so you can be notified as divergences occur without spending all day watching the charts, the main purpose of this indicator was to provide the triple multiple-timeframe overbought and oversold confluence signals and alerts, in an attempt to add more confluence, weight and reliability to the single timeframe overbought and oversold states, commonly used for trade entry confluence. It's primary purpose is intended for scalping on lower timeframes, typically between 1-15 minutes. The triple timeframe overbought can often indicate near term reversals to the downside, with the triple timeframe oversold often indicating neartime reversals to the upside. The default timeframes for this confluence are set to check the 1 minute, 5 minute, and 15 minute timeframes, ideal for scalping the < 15 minute charts.
The Stochastic RSI
The popular oscillator has been described as follows:
“The Stochastic RSI is an indicator used in technical analysis that ranges between zero and one (or zero and 100 on some charting platforms) and is created by applying the Stochastic oscillator formula to a set of relative strength index (RSI) values rather than to standard price data. Using RSI values within the Stochastic formula gives traders an idea of whether the current RSI value is overbought or oversold. The Stochastic RSI oscillator was developed to take advantage of both momentum indicators in order to create a more sensitive indicator that is attuned to a specific security's historical performance rather than a generalized analysis of price change.”
How do traders use overbought and oversold levels in their trading?
The oversold level, that is when the Stochastic RSI is above the 80 level is typically interpreted as being 'overbought', and below the 20 level is typically considered 'oversold'. Traders will often use the Stochastic RSI at an overbought level as a confluence for entry into a short position, and the Stochastic RSI at an oversold level as a confluence for an entry into a long position. These levels do not mean that price will necessarily reverse at those levels in a reliable way, however. This is why this version of the Stoch RSI employs the triple timeframe overbought and oversold confluence, in an attempt to add a more confluence and reliability to this usage of the Stoch RSI.
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose, and also when the triple timeframe overbought and oversold confluences occur.
Configurable pivot lookback values.
You can adjust the default pivot lookback values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action. By default, this indicator has enabled the automatic adjustment of the pivot periods for 4 configurable timeframes, in a bid to optimise the divergences drawn when the indicator is loaded onto any of the 4 timeframes. These timeframes and the auto adjusted pivot periods on each of them can also be reconfigured within the settings menu.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer: This script includes code from the stock UO by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.
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.
Gaussian Average Convergence DivergenceWhat exactly is the Ehlers Gaussian filter?
This filter is useful for smoothing. It rejects higher frequencies (fast movements) more effectively than an EMA and has less lag. John F. Ehlers published it in "Rocket Science For Traders." Dr. René Koch was the first to implement it in Wealth-Lab.
The transfer response of a Gaussian filter is described by the well-known Gaussian bell-shaped curve. Only the upper half of the curve describes the filter in the case of low-pass filters. The use of gaussian filters is a step toward achieving the dual goals of lowering lag and lowering the lag of high-frequency components relative to lower-frequency components.
From Ehlers Book: "The first objective of using smoothers is to eliminate or reduce the undesired high-frequency components in the price data. Therefore these smoothers are called low-pass filters, and they all work by some form of averaging. Butterworth low-pass filters can do this job, but nothing comes for free. A higher degree of filtering is necessarily accompanied by a larger amount of lag. We have come to see that is a fact of life."
References John F. Ehlers: "Rocket Science For Traders, Digital Signal Processing Applications", Chapter 15: "Infinite Impulse Response Filters"
Annualizer: New Indicator + CPI AnalysisThis indicator calculates the annualized month-over-month percent change of a cumulative index and plots it alongside the year-over-year percent change for comparison. It was developed for the purpose of analyzing the inflation rate of CPI indexes such as “CPIAUCSL.” It can also be used on M2 money supply and pretty much any cumulative index. It will not produce useful outputs on percent change indexes such as “USCCPI” because it performs percent change calculations which are already applied to those indexes.
This indicator takes data from the monthly chart, regardless of how often the data is reported or what the timeframe of the current chart is. Doing so allows it to work on all timeframes while displaying only monthly data outputs but limits it from recognizing data which might be released more often than once per month. This limitation should be suitable for macroeconomic data such as CPI and M2 money supply which are usually analyzed on a month-to-month basis.
If the ticker symbol is "M2SL" which is M2 money supply, annualized percent change is plotted in green, otherwise, it’s plotted in blue.
CPI analysis:
Upon deploying this indicator, it was observed that the year-over-year (YoY) inflation rate (red) is a lagging indicator of the annualized month-over-month (MoM) inflation rate (blue) and that it appears to almost be a moving average of it. A moving average plot was temporarily added for comparison to the YoY and it was found that the difference between the two plots is negligible and that for the purposes of high-level analysis of inflation, the two plots can be considered to be no different from one another. Below is a screenshot for demonstration. Notice how closely the white 12-month SMA of the annualized rate tracks the YoY rate.
For other indexes which may see more dramatic changes month-over-month such as M2 money supply, the difference between the two signals becomes more pronounced but they are still comparable. The conclusion is that the YoY inflation rate can be considered to be a 12-month simple moving average of the annualized MoM rate.
12-month SMA:
It’s easy to see and stands to reason that if the annualized MoM inflation rate (blue) remains where it has been for the previous 2 months YoY inflation (red) will begin falling and eventually reach similar levels due to its moving-average-like behavior. This will bring us back to the 2% YoY inflation target of the Fed within no more than 10 months. There may be a perception that deflation is required to bring prices back down to the purple channel of CPI to make prices pre-Covid "normal" again. We were headed in that direction in July with a slightly negative MoM CPI read. What may have freaked investors out about the August report (most recent as of this writing) is that the inflation rate, rather than continuing into negative deflationary territory, has bounced back into positive territory.
M2 money supply isn’t an integral part of this analysis, but it helps demonstrate the indicator. It can be observed that CPI growth lags M2 money supply growth which seems to have leveled off.
I’m not a macroeconomist so I’m probably missing some things, but I do not see a lagging indicator such as YoY inflation being at 8.25% while annualized MoM inflation is at 1.42% as something to freak out about as investors have seemingly done. I’m a stock market bear as of last week, but I do not feel this CPI analysis strongly supports a bearish thesis, nor is it bullish. Next month’s annualized MoM % change may begin to sway me one way or the other depending on what this chart looks like when it’s updated.
DMI Stochastic Momentum IndexConcepts
This is an improved version of the "DMI Stochastic Extreme Refurbished" indicator.
For more information on the main concepts of this indicator, please access this link:
The difference is that here, instead of using the traditional stochastic oscillator, I implemented the use of the Stochastic Momentum Index (SMI).
Stochastic Momentum Index (SMI)
The SMI is considered a refinement of the stochastic oscillator.
It calculates the distance of the current closing price as it relates to the median of the high/low range of price.
William Blau developed the SMI, which attempts to provide a more reliable indicator, less subject to false swings.
The original stochastic is limited to values from 0 to 100, while the SMI varies between the range of -100 to 100.
(Investopedia)
It is worth mentioning that the SMI presented in this script applies to the DMI value, not the screen price.
RSI + Moving AverageSimple regular RSI Indicator that plots a Moving Average (Hull, SMA, EMA, RMA, etc) that you specify the MA and length.
Contains Over Bought and Over Sold areas that you can customize color and zone.
Plots signals of the RSI crossing up over the over sold area or down below the over bought area.
Plots crosses of the RSI crossing the Moving Average.
Free Volume RSIdear fellows,
this indicator is a mod or tweak on the standard RSI here available.
the original RSI formula is, as you know,
100 - 100/(1+RS)
which equals to
100 * RS/(1+RS)
where
the 100 factor is merely a scale adjustment to 100's percent basis
the RS is the ratio between average gain and average loss within the last N candles.
thus, the absolute gain of the up candles within the last N candles window is averaged; same for absolute loss.
this averaging uses EMA.
the ratio between this averages is RS.
the RS ranges from 0 to infinity, thus the ratio RS/(1+RS) locks it between 0 and 1.
in regard of our changes
we use VWMA instead of EMA
we plot the resulting RS directly, instead of its smooth version RS/(1+RS)
we dismiss the 100 factor.
we specify logarithmic scale for the resulting plot
on the justifications of our changes
by using VWMA instead of EMA we get both a more dynamic averaging (WMA is faster) as well as a de facto strength of the price action, since now volume is considered alongside the price change. this way one can quantify accumulation and distribution intensities.
to anyone who ever was restricted against his will over a sufficiently large period of time on his freedom to move, would understand that an unrestricted indicator conveys better its info.
as we're dealing with ratios, the distance between 1 and 2 is the same between 1 and 0.5; thus, a log scale is specified for reading this indicator without distortions.
on how to use this indicators
this is still an early result, hence it lacks more testing.
so far, when it's oversold, buy; and vice versa.
best regards.
Market Signals ComplexMIC is an indicator made from some standard deviations of Bollinger Bands, an EMA ribbon, some oscillators like the RSI, and some candlestick patterns like Bearish and Bullish Engulfing candles. It uses these parameters to help you trade/find high-interest zones in the short time as well as the long term. It can be used in any market.
MqsdNvr Stochastic RSI and TSIFor knowing when and where and how to start a position by the mixture of rsi and tsi on its price. Their inputs and their relations together ... .
Balance of Power Heikin Ashi Investing Strategy Balance of Power Heikin Ashi Investing Strategy
This is a swing strategy designed for investment help.
Its made around the Balace of Power indicator, but has been adapted on using the Monthly Heikin Ashi candle from the SPY asset in order to be used with correlation for US Stock/ETF/Index Markets.
The BOP acts as an oscilallator showing the power of a bull trend when its positive and a bearish trend when its in negative. At the same time we can spot reversals, based on the percentiles ( 99/1)
The rules for entry :
For long : The 99 percentile is ascending, and we are either in a positive value (>0), or we crossed the bottom place ( -0.35)
For short : the 99 and 1 percentile are descending, and we are either in a negative value(<0), or we crossed down the top place ( 0.6)
If you have any questions please let me know !
Lyapunov Hodrick-Prescott Oscillator w/ DSL [Loxx]Lyapunov Hodrick-Prescott Oscillator w/ DSL is a Hodrick-Prescott Channel Filter that is modified using the Lyapunov stability algorithm to turn the filter into an oscillator. Signals are created using Discontinued Signal Lines.
What is the Lyapunov Stability?
As soon as scientists realized that the evolution of physical systems can be described in terms of mathematical equations, the stability of the various dynamical regimes was recognized as a matter of primary importance. The interest for this question was not only motivated by general curiosity, but also by the need to know, in the XIX century, to what extent the behavior of suitable mechanical devices remains unchanged, once their configuration has been perturbed. As a result, illustrious scientists such as Lagrange, Poisson, Maxwell and others deeply thought about ways of quantifying the stability both in general and specific contexts. The first exact definition of stability was given by the Russian mathematician Aleksandr Lyapunov who addressed the problem in his PhD Thesis in 1892, where he introduced two methods, the first of which is based on the linearization of the equations of motion and has originated what has later been termed Lyapunov exponents (LE). (Lyapunov 1992)
The interest in it suddenly skyrocketed during the Cold War period when the so-called "Second Method of Lyapunov" (see below) was found to be applicable to the stability of aerospace guidance systems which typically contain strong nonlinearities not treatable by other methods. A large number of publications appeared then and since in the control and systems literature. More recently the concept of the Lyapunov exponent (related to Lyapunov's First Method of discussing stability) has received wide interest in connection with chaos theory . Lyapunov stability methods have also been applied to finding equilibrium solutions in traffic assignment problems.
In practice, Lyapunov exponents can be computed by exploiting the natural tendency of an n-dimensional volume to align along the n most expanding subspace. From the expansion rate of an n-dimensional volume, one obtains the sum of the n largest Lyapunov exponents. Altogether, the procedure requires evolving n linearly independent perturbations and one is faced with the problem that all vectors tend to align along the same direction. However, as shown in the late '70s, this numerical instability can be counterbalanced by orthonormalizing the vectors with the help of the Gram-Schmidt procedure (Benettin et al. 1980, Shimada and Nagashima 1979) (or, equivalently with a QR decomposition). As a result, the LE λi, naturally ordered from the largest to the most negative one, can be computed: they are altogether referred to as the Lyapunov spectrum.
The Lyapunov exponent "λ" , is useful for distinguishing among the various types of orbits. It works for discrete as well as continuous systems.
λ < 0
The orbit attracts to a stable fixed point or stable periodic orbit. Negative Lyapunov exponents are characteristic of dissipative or non-conservative systems (the damped harmonic oscillator for instance). Such systems exhibit asymptotic stability; the more negative the exponent, the greater the stability. Superstable fixed points and superstable periodic points have a Lyapunov exponent of λ = −∞. This is something akin to a critically damped oscillator in that the system heads towards its equilibrium point as quickly as possible.
λ = 0
The orbit is a neutral fixed point (or an eventually fixed point). A Lyapunov exponent of zero indicates that the system is in some sort of steady state mode. A physical system with this exponent is conservative. Such systems exhibit Lyapunov stability. Take the case of two identical simple harmonic oscillators with different amplitudes. Because the frequency is independent of the amplitude, a phase portrait of the two oscillators would be a pair of concentric circles. The orbits in this situation would maintain a constant separation, like two flecks of dust fixed in place on a rotating record.
λ > 0
The orbit is unstable and chaotic. Nearby points, no matter how close, will diverge to any arbitrary separation. All neighborhoods in the phase space will eventually be visited. These points are said to be unstable. For a discrete system, the orbits will look like snow on a television set. This does not preclude any organization as a pattern may emerge. Thus the snow may be a bit lumpy. For a continuous system, the phase space would be a tangled sea of wavy lines like a pot of spaghetti. A physical example can be found in Brownian motion. Although the system is deterministic, there is no order to the orbit that ensues.
For our purposes here, we transform the HP by applying Lyapunov Stability as follows:
output = math.log(math.abs(HP / HP ))
You can read more about Lyapunov Stability here: Measuring Chaos
What is. the Hodrick-Prescott Filter?
The Hodrick-Prescott (HP) filter refers to a data-smoothing technique. The HP filter is commonly applied during analysis to remove short-term fluctuations associated with the business cycle. Removal of these short-term fluctuations reveals long-term trends.
The Hodrick-Prescott (HP) filter is a tool commonly used in macroeconomics. It is named after economists Robert Hodrick and Edward Prescott who first popularized this filter in economics in the 1990s. Hodrick was an economist who specialized in international finance. Prescott won the Nobel Memorial Prize, sharing it with another economist for their research in macroeconomics.
This filter determines the long-term trend of a time series by discounting the importance of short-term price fluctuations. In practice, the filter is used to smooth and detrend the Conference Board's Help Wanted Index (HWI) so it can be benchmarked against the Bureau of Labor Statistic's (BLS) JOLTS, an economic data series that may more accurately measure job vacancies in the U.S.
The HP filter is one of the most widely used tools in macroeconomic analysis. It tends to have favorable results if the noise is distributed normally, and when the analysis being conducted is historical.
What are DSL Discontinued Signal Line?
A lot of indicators are using signal lines in order to determine the trend (or some desired state of the indicator) easier. The idea of the signal line is easy : comparing the value to it's smoothed (slightly lagging) state, the idea of current momentum/state is made.
Discontinued signal line is inheriting that simple signal line idea and it is extending it : instead of having one signal line, more lines depending on the current value of the indicator.
"Signal" line is calculated the following way :
When a certain level is crossed into the desired direction, the EMA of that value is calculated for the desired signal line
When that level is crossed into the opposite direction, the previous "signal" line value is simply "inherited" and it becomes a kind of a level
This way it becomes a combination of signal lines and levels that are trying to combine both the good from both methods.
In simple terms, DSL uses the concept of a signal line and betters it by inheriting the previous signal line's value & makes it a level.
Included:
Bar coloring
Alerts
Signals
Loxx's Expanded Source Types
BTC Profitable Wallets StrategyBTC Profitable Wallets Strategy - plots the percentage of profitable BTC wallets and places long orders when the profitable wallet share crosses above 50%, historically a very accurate point to catch the next Bull Run early.
The only setting is a smoothing option using the Moving Average method and length of your choice.
On Chain Data is queried from IntoTheBlock.
This is a 'HODL' strategy, with no exit given. If you'd like to see the historical performance check the Open Profit or place a sell order at the current date.
SuperTrend Momentum TableMy goal creating this indicator : Provide a way to see the Past and Current Momentum of multiple different timeframes without using multiple charts.
The Underlying Concept / What is Momentum?
The Momentum shown is derived from a Mathematical Formula, SUPERTREND. When price closes above Supertrend Its bullish Momentum when its below Supertrend its Bearish Momentum.This indicator scans for bullish & bearish Momentum on the Timeframes selected by the user and when there is a shift in momentum on any of those time frames (price closes below or above SUPERTREND ) it notifies the trader with a color change on the Momentum Table.
Back Testing: This indicator will be key for back testing with the SuperTrend-Support-Resistance indicator
since the SuperTrend Momentum Table shows you the visual shift in momentum. Giving the Trader a Clear visual on how Each Support and Resistance Level was made .
Technical Inputs
- If you want to optimize the rate of signals to better fit your trading plan you would change the Factor input and ATR Length input. Increase factor and ATR Length to decrease the frequency of signals and decrease the Factor and ATR Length to increase the frequency of signals.
Quick TIP! : You can Sync all VFX SuperTrend Indicators together! All VFX SuperTrend indicators display unique information but its all derived from that same Momentum Formula. Keep the Factor input and ATR Length the same on other VFX SuperTrend indicators to have them operating on the same data.
Timeframe Inputs
- The indicator has 7 Time frame Displays where you can choose which Time Frames you would like to monitor.
- You can limit the amount of time frames being displayed by changing the Time Frame Amount
Display Inputs
- The trader can specify the bullish and bearish color of all 7 Timeframes
- You can toggle (on or off) the Momentum Switch if you want to highlight the exact candle where momentum switched from bullish to bearish and from bearish to bullish .
How it can be Used ? Check the momentum of other Timeframes and use that information as a variable to structure your trading plan.
- Use Momentum information to track the trend
- Plan and limit trades based on the current Momentum of multiple timeframes
- See if you have higher momentum to fuel your trades
- See breakouts on Multiple Time Frames
KERPD Noise Filter - Kaufman Efficiency Ratio and Price DensityThis indicator combines Kaufman Efficiency Ratio (KER) and Price Density theories to create a unique market noise filter that is 'right on time' compared to using KER or Price Density alone. All data is normalized and merged into a single output. Additionally, this indicator provides the ability to consider background noise and background noise buoyancy to allow dynamic observation of noise level and asset specific calibration of the indicator (if desired).
The basic theory surrounding usage is that: higher values = lower noise, while lower values = higher noise in market.
Notes: NON-DIRECTIONAL Kaufman Efficiency Ratio used. Threshold period of 30 to 40 applies to Kaufman Efficiency Ratio systems if standard length of 20 is applied; maintained despite incorporation of Price Density normalized data.
TRADING USES:
-Trend strategies, mean reversion/reversal/contrarian strategies, and identification/avoidance of ranging market conditions.
-Trend strategy where KERPD is above a certain value; generally a trend is forming/continuing as noise levels fall in the market.
-Mean reversion/reversal/contrarian strategies when KERPD exits a trending condition and falls below a certain value (additional signal confluence confirming for a strong reversal in price required); generally a reversal is forming as noise levels increase in the market.
-A filter to screen out ranging/choppy conditions where breakouts are frequently fake-outs and or price fails to move significantly; noise level is high, in addition to the background buoyancy level.
-In an adaptive trading systems to assist in determining whether to apply a trend following algorithm or a mean reversion algorithm.
THEORY / THOUGHT SPACE:
The market is a jungle. When apex predators are present it often goes quiet (institutions moving price), when absent the jungle is loud.
There is always background noise that scales with the anticipation of the silence, which has features of buoyancy that act to calibrate the beginning of the silence and return to background noise conditions.
Trend traders hunt in low noise conditions. Reversion traders hunt in the onset of low noise into static conditions. Ranges can be avoided during high noise and buoyant background noise conditions.
Distance between the noise line and background noise can help inform decision making.
CALIBRATION:
- Set the Noise Threshold % color change line so that the color cut off is where your trend/reversion should begin.
- Set the Background Noise Buoyancy Calibration Decimal % to match the beginning/end of the color change Noise Threshold % line. Match the Background Noise Baseline Decimal %' to the number set for buoyancy.
- Additionally, create your own custom settings; 33/34 and 50 length also provides interesting results.
- A color change tape option can be enabled by un-commenting the lines at the bottom of this script.
Market Usage:
Stock, Crypto, Forex, and Others
Excellent for: NDQ, J225, US30, SPX
Market Conditions:
Trend, Reversal, Ranging
Leavitt Convolution Slope [CC]The Leavitt Convolution Slope indicator was created by Jay Leavitt (Stocks and Commodities Oct 2019, page 11), who is most well known for creating the Volume-Weighted Average Price indicator. This indicator is very similar to the Leavitt Convolution indicator but the big difference is that it is getting the slope instead of predicting the next Convolution value. I changed quite a few things from the original source code so let me know if you like these changes. I added a normalization function using code from a good friend @loxx that I recommend to leave on but feel free to experiment with it. Last but not least, the unsure levels are essentially acting as a buy or sell threshold. I personally recommend to buy or sell for zero crossovers but another option would be to buy or sell for crossovers using the unsure levels. I have color coded the lines to turn light green for a normal buy signal or dark green for a strong buy signal and light red for a normal sell signal, and dark red for a strong sell signal.
This is another indicator in a series that I'm publishing to fulfill a special request from @ashok1961 so let me know if you ever have any special requests for me.
Softmax Normalized T3 Histogram [Loxx]Softmax Normalized T3 Histogram is a T3 moving average that is morphed into a normalized oscillator from -1 to 1.
What is the Softmax function?
The softmax function, also known as softargmax: or normalized exponential function, converts a vector of K real numbers into a probability distribution of K possible outcomes. It is a generalization of the logistic function to multiple dimensions, and used in multinomial logistic regression. The softmax function is often used as the last activation function of a neural network to normalize the output of a network to a probability distribution over predicted output classes, based on Luce's choice axiom.
What is the T3 moving average?
Better Moving Averages Tim Tillson
November 1, 1998
Tim Tillson is a software project manager at Hewlett-Packard, with degrees in Mathematics and Computer Science. He has privately traded options and equities for 15 years.
Introduction
"Digital filtering includes the process of smoothing, predicting, differentiating, integrating, separation of signals, and removal of noise from a signal. Thus many people who do such things are actually using digital filters without realizing that they are; being unacquainted with the theory, they neither understand what they have done nor the possibilities of what they might have done."
This quote from R. W. Hamming applies to the vast majority of indicators in technical analysis . Moving averages, be they simple, weighted, or exponential, are lowpass filters; low frequency components in the signal pass through with little attenuation, while high frequencies are severely reduced.
"Oscillator" type indicators (such as MACD , Momentum, Relative Strength Index ) are another type of digital filter called a differentiator.
Tushar Chande has observed that many popular oscillators are highly correlated, which is sensible because they are trying to measure the rate of change of the underlying time series, i.e., are trying to be the first and second derivatives we all learned about in Calculus.
We use moving averages (lowpass filters) in technical analysis to remove the random noise from a time series, to discern the underlying trend or to determine prices at which we will take action. A perfect moving average would have two attributes:
It would be smooth, not sensitive to random noise in the underlying time series. Another way of saying this is that its derivative would not spuriously alternate between positive and negative values.
It would not lag behind the time series it is computed from. Lag, of course, produces late buy or sell signals that kill profits.
The only way one can compute a perfect moving average is to have knowledge of the future, and if we had that, we would buy one lottery ticket a week rather than trade!
Having said this, we can still improve on the conventional simple, weighted, or exponential moving averages. Here's how:
Two Interesting Moving Averages
We will examine two benchmark moving averages based on Linear Regression analysis.
In both cases, a Linear Regression line of length n is fitted to price data.
I call the first moving average ILRS, which stands for Integral of Linear Regression Slope. One simply integrates the slope of a linear regression line as it is successively fitted in a moving window of length n across the data, with the constant of integration being a simple moving average of the first n points. Put another way, the derivative of ILRS is the linear regression slope. Note that ILRS is not the same as a SMA ( simple moving average ) of length n, which is actually the midpoint of the linear regression line as it moves across the data.
We can measure the lag of moving averages with respect to a linear trend by computing how they behave when the input is a line with unit slope. Both SMA (n) and ILRS(n) have lag of n/2, but ILRS is much smoother than SMA .
Our second benchmark moving average is well known, called EPMA or End Point Moving Average. It is the endpoint of the linear regression line of length n as it is fitted across the data. EPMA hugs the data more closely than a simple or exponential moving average of the same length. The price we pay for this is that it is much noisier (less smooth) than ILRS, and it also has the annoying property that it overshoots the data when linear trends are present.
However, EPMA has a lag of 0 with respect to linear input! This makes sense because a linear regression line will fit linear input perfectly, and the endpoint of the LR line will be on the input line.
These two moving averages frame the tradeoffs that we are facing. On one extreme we have ILRS, which is very smooth and has considerable phase lag. EPMA has 0 phase lag, but is too noisy and overshoots. We would like to construct a better moving average which is as smooth as ILRS, but runs closer to where EPMA lies, without the overshoot.
A easy way to attempt this is to split the difference, i.e. use (ILRS(n)+EPMA(n))/2. This will give us a moving average (call it IE /2) which runs in between the two, has phase lag of n/4 but still inherits considerable noise from EPMA. IE /2 is inspirational, however. Can we build something that is comparable, but smoother? Figure 1 shows ILRS, EPMA, and IE /2.
Filter Techniques
Any thoughtful student of filter theory (or resolute experimenter) will have noticed that you can improve the smoothness of a filter by running it through itself multiple times, at the cost of increasing phase lag.
There is a complementary technique (called twicing by J.W. Tukey) which can be used to improve phase lag. If L stands for the operation of running data through a low pass filter, then twicing can be described by:
L' = L(time series) + L(time series - L(time series))
That is, we add a moving average of the difference between the input and the moving average to the moving average. This is algebraically equivalent to:
2L-L(L)
This is the Double Exponential Moving Average or DEMA , popularized by Patrick Mulloy in TASAC (January/February 1994).
In our taxonomy, DEMA has some phase lag (although it exponentially approaches 0) and is somewhat noisy, comparable to IE /2 indicator.
We will use these two techniques to construct our better moving average, after we explore the first one a little more closely.
Fixing Overshoot
An n-day EMA has smoothing constant alpha=2/(n+1) and a lag of (n-1)/2.
Thus EMA (3) has lag 1, and EMA (11) has lag 5. Figure 2 shows that, if I am willing to incur 5 days of lag, I get a smoother moving average if I run EMA (3) through itself 5 times than if I just take EMA (11) once.
This suggests that if EPMA and DEMA have 0 or low lag, why not run fast versions (eg DEMA (3)) through themselves many times to achieve a smooth result? The problem is that multiple runs though these filters increase their tendency to overshoot the data, giving an unusable result. This is because the amplitude response of DEMA and EPMA is greater than 1 at certain frequencies, giving a gain of much greater than 1 at these frequencies when run though themselves multiple times. Figure 3 shows DEMA (7) and EPMA(7) run through themselves 3 times. DEMA^3 has serious overshoot, and EPMA^3 is terrible.
The solution to the overshoot problem is to recall what we are doing with twicing:
DEMA (n) = EMA (n) + EMA (time series - EMA (n))
The second term is adding, in effect, a smooth version of the derivative to the EMA to achieve DEMA . The derivative term determines how hot the moving average's response to linear trends will be. We need to simply turn down the volume to achieve our basic building block:
EMA (n) + EMA (time series - EMA (n))*.7;
This is algebraically the same as:
EMA (n)*1.7-EMA( EMA (n))*.7;
I have chosen .7 as my volume factor, but the general formula (which I call "Generalized Dema") is:
GD (n,v) = EMA (n)*(1+v)-EMA( EMA (n))*v,
Where v ranges between 0 and 1. When v=0, GD is just an EMA , and when v=1, GD is DEMA . In between, GD is a cooler DEMA . By using a value for v less than 1 (I like .7), we cure the multiple DEMA overshoot problem, at the cost of accepting some additional phase delay. Now we can run GD through itself multiple times to define a new, smoother moving average T3 that does not overshoot the data:
T3(n) = GD ( GD ( GD (n)))
In filter theory parlance, T3 is a six-pole non-linear Kalman filter. Kalman filters are ones which use the error (in this case (time series - EMA (n)) to correct themselves. In Technical Analysis , these are called Adaptive Moving Averages; they track the time series more aggressively when it is making large moves.
Included:
Bar coloring
Signals
Alerts
Loxx's Expanded Source Types
Squeeze Index [LuxAlgo]The Squeeze Index aims to measure the action of price being squeezed, and is expressed as a percentage, with higher values suggesting prices are subject to a higher degree of compression.
Settings
Convergence Factor: Convergence factor of exponential envelopes.
Length: Period of the indicator.
Src: Source input of the indicator.
Usage
Prices being squeezed refer to the action of price being compressed within a tightening area. Prices in a tight area logically indicate a period of stationarity, price breaking out of this area will generally indicate the trader whether to buy or sell depending on the breakout direction.
The convergence factor and length settings both play an important role in the returned indicator values. A convergence factor greater than the period value will detect more squeezed prices area, while a period greater than the convergence will return fewer detected squeezed areas.
We recommend using a convergence factor equal to the period setting or a convergence factor twice as high.
The above chart makes use of a convergence factor of 100 and a period of 10.
Due to the calculation method, it is possible to see retracements being interpreted as price squeezing. This effect can be emphasized with higher convergence factor values.
Details
In order to measure the effect of price being squeezed in a tighter area we refer to damping, where the oscillations amplitude of a system decrease over time. If the envelopes of a damped system can be estimated, then getting the difference between the upper and lower extremity of these envelopes would return a decreasing series of values.
This approach is used here. First the difference between the exponential envelopes extremities is obtained, the logarithm of this difference if obtained due to the extremities converging exponentially toward their input.
We then use the correlation oscillator to get a scaled measurement.
End-pointed SSA of Williams %R [Loxx]End-pointed SSA of Williams %R is an indicator that runes Williams %R SSA calculation through a Singular Spectrum Analysis (SSA) algorithm to derive a smoother final output. The reduction in noise from the traditional Williams %R is significant.
What is Williams %R?
Williams %R , also known as the Williams Percent Range, is a type of momentum indicator that moves between 0 and -100 and measures overbought and oversold levels. The Williams %R may be used to find entry and exit points in the market. The indicator is very similar to the Stochastic oscillator and is used in the same way. It was developed by Larry Williams and it compares a stock’s closing price to the high-low range over a specific period, typically 14 days or periods.
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.
Included:
Bar coloring
[*Alerts
[*Signals
[*Loxx's Expanded Source Types
Related Williams %R Indicators
Williams %R on Chart w/ Dynamic Zones
Williams %R w/ Bollinger Bands
Intermediate Williams %R w/ Discontinued Signal Lines
Related SSA Indicators
End-pointed SSA of FDASMA
End-pointed SSA of Normalized Price Oscillator
Bull/Bear Candle % Oscillator█ OVERVIEW
This script determines the proportion of bullish and bearish candles in a given sample size. It will produce an oscillator that fluctuates between 100 and -100, where values > 0 indicate more bullish candles in the sample and values < 0 indicate more bearish candles in the sample. Data produced by this oscillator is normalized around the 50% value, meaning that an even 50/50 split between bullish and bearish candles makes this oscillator produce 0; this oscillator indirectly represents the percent proportion of bullish and bearish candles in the sample (see HOW TO USE/INTERPRETATION OF DATA ).
It has two overarching settings: 'classic' and 'range'.
█ CONCEPTS
This script will cover concepts related to candlestick analysis, volumetric analysis, and lower timeframes.
Candlestick Analysis - The idea behind this script is to solely look at the candlesticks themselves and derive information from them in a given sample. It separates candles into two categories, bullish (close > open) and bearish (close < open).
If the indicator's setting is set to 'classic', the size of candles do not matter and all are assigned a value of 1 or 0.
If the indicator's setting is set to 'range', specific candle ranges modify the proportion of bullish/bearish values. Bullish candle values include all bullish candles in the set from their lows to the close, plus the lower wicks of all bearish candles. Bearish candle values include all bearish candles in the set from their highs to the close, plus the upper wicks of all bullish candles.
Volumetric Analysis - One of this script's features allows the user to modify the bullish and bearish candle proportions by its 'weight' determined by its volume compared to the sample set's total volume. Volumetric analysis for the 'range' setting are more complex than 'classic' as described below.
Lower Timeframes - For volumetric analysis to be done on candle wicks, there needed to be a way to determine how much volume had occurred in the wick by itself to find the weight of upper and lower wicks. To accomplish this, I employed PineScrypt's request.security_lower_tf function to grab OHLC values of lower timeframe candles (as well as volume) to determine how much volume had occurred in the wicks of the chart resolution's candle. The default OHLC values used here are the lows for upper wicks and highs for lower wicks. These OHLC values are then compared to the chart resolution candle's close to determine if the volume of that lower timeframe candle should be shifted to the wick weight or stay in the current weight of that candle. The reason 'low' and 'high' are used here is to guarantee that 100% of the volume of a lower timeframe candle had occurred in the wick of the candle at the current resolution (see LIMITATIONS ).
Bullish candles will exclude volume of all lower timeframe candles whose lows were greater than that candle's close. Bearish candles will exclude volume of all lower timeframe candles whose highs were less than that candle's close. These wick volumes are then divided by the volume of the sample set, and wick sizes are then multiplied by this weight before being added to their specific bullish/bearish sums (lower wicks to bullish and upper wicks to bearish).
█ FEATURES
There are 13 inputs for the user to modify the behavior/visual representation of this script.
Sample Length - This determines how many candles are in the sample set to find the proportion of bullish and bearish candles.
Colors and Invert Colors - There are three colors set by the user: a bullish color, neutral color, and bearish color. The oscillator plots two lines, one at 0 and another that represents the proportion of bullish or bearish candles in the sample set (we'll call this the 'signal line'). If the oscillator is above 0, bullish color is used, bearish otherwise. This script generates a gradient to color a filled area between the 0 line and the signal line based on the historical values of the oscillator itself and the signal line. For bullish values, the closer the signal line is to the max (or restricted max described below) that the oscillator has experienced, the more colored toward bullish color the shaded area will be, using the neutral color as a starting point. The same is applied to the bearish values using the bearish color.
There is an additional input to invert the colors so that the bearish color is associated with bullish values and vise-versa.
Calculation Type - This determines the overarching behavior of the oscillator and has two settings:
Classic - The weight of candles are either 1 if they occurred and 0 if not.
Range - The weight of candles is determined by the size of specific sections as described in CONCEPTS - Candlestick Analysis .
Volume Weighted - This enables modifying the weights of candles as described in CONCEPTS - Volumetric Analysis and Lower Timeframes based on which Calculation Type is used.
Wick Slice Resolution - This is the lower timeframe resolution that will be used to slice the chart resolution's candle when determining the volumetric weight of wicks. Lower timeframe resolutions like '1 minute' will yield more precise results as they will give more data points to go off of (see LIMITATIONS ).
Upper/Lower Wick Source - These two inputs allow the user to select which OHLC values to compare against the chart resolution's candle close when determining which lower timeframe candles will have their volumes associated with the wicks of candles being analyzed at the chart's resolution.
Restrict Min/Max Data and Restriction - This will restrict the maximum and minimum values that will be used for the signal line when comparing its value to previous oscillator values and change how the color gradient is generated for the indicator. Restriction is the number of candles back that will determine these maximum and minimum values.
Display Min/Max Guide - This will plot two lines that are colored the corresponding bullish and bearish colors which follow what the maximum and minimum values are currently for the oscillator.
█ HOW TO USE/INTERPRETATION OF DATA
As mentioned in the OVERVIEW section, this oscillator provides an indirect representation of the percent proportion of bullish or bearish candles in a given sample. If the oscillator reads 80, this does not mean that 80% of all candles in the sample were bullish . To find the percentage of candles that were bullish or bearish, the user needs to perform the following:
50% + ((|oscillator value| / 100) * 50)%
If the oscillator value is negative, the value from above will represent the percentage of bearish candles in the sample. If it is positive, this value represents the percentage of bullish candles in the sample.
Example 1 (oscillator value = 80):
50% + ((|80| / 100) * 50)%
50% + ((0.80) * 50)%
50% + 40% = 90%
90% of the candles in the sample were bullish.
Example 2 (oscillator value = -43):
50% + ((|-43| / 100) * 50)%
50% + ((0.43) * 50)%
50% + 21.5% = 71.5%
71.5% of the candles in the sample were bearish.
An example use of this indicator would be to put in a 'buy' order when its value shows a significant proportion of the sampled candles were bearish, and put in a 'sell' order when a significant proportion of candles were bullish. Potential divergences of this oscillator may also be used to plan trades accordingly such as bearish divergence - price continues higher as the oscillator decreases in value and vise-versa.*
* Nothing in this script constitutes any form of financial advice. The user is solely responsible for their trading decisions and I will not be held liable for any losses or gains incurred with the use of this script. Please proceed with caution when using this script to assist with trading decisions.
█ LIMITATIONS
Range Volumetric Weights :
Because of the conditions that must be met in order for volume to be considered part of wicks, it is possible that the default settings and their intended reasoning will not produce reliable results. If all lower timeframe candles have highs or lows that are within the body of the candle at the chart's resolution, the volume for the wicks will effectively be 0, which is not an accurate representation of those wicks. This is one of the reasons why I included the ability to change the source values used for these conditions as certain OHLC values may produce more reliable/intended results under these conditions.
Wick Slice Resolution :
PineScript restricts the number of intrabar references to 100,000 total. This script uses 3 separate request.security_lower_tf calls and has a default resolution of 1 minute. This means that if the user were to set the oscillator to the Range setting, enable volume weighted, and had the Wick Slice Resolution set to 1 minute, this script will exceed this 100,000 reference restriction within 24 days of data and will not produce any results beyond the previous 23.14 days.
Below are example uses of all the different settings of this script, these are done on the 1D chart of COINBASE:BTCUSD :
Default Settings:
Classic - Volume Weighted:
Range - no Volume Weight:
Range - Volume Weighted (1 min slices):
Range - Volume Weighted (1 hour slices):
Display Min/Max Guide - No Restriction:
Display Min/Max Guide - Restriction:
Invert Colors:
TNT_UpgradedThe background of the indicator to show TrendingUp (Green) / TrendingDown (Red) / Range Bound (Blue) Regions.
The concept is very simple, at each candle we look at the size of the candle and use a moving average of these candle body size (ABS (close-open)) and compare it agains a double smoothened average, i.e. moving average of this average to find trending or not trending periods.
In the upgrade the moving average is now looking only at the current day for intraday timeframe, i.e. in the first 5 bars it is an average of last 5 values, for last 10 candles it is an average of 10 values with the max limited to 28 that is for candle 28 onwards the average is always for 28 candles for default values or as defined by user.
I find it useful primarily for entry in options, a green background is more favourable for call option buying, a red background is favourable for put option buying and blue background is more favourable for option selling.
The coloured ranges show the direction bias, this has been designed using RSI on 3 timeframes with different weight-ages, all customisable by the user.
PS, I only trade Bank Nifty for intraday, all my observations are driven only by Bank Nifty.