Stock Tech Bot One ViewTechnical indicators are not limited. Hence, here is another indicator with the combination of OBV, RSI, and MACD along with support, and resistance that follows the price while honoring the moving average of 200, 90 & 50.
The default lookback period of this indicator is 21 though it is changeable as per the user's desire.
The highest high and lowest low for the last 21 days lookback period proven to be the perfect Support & Resistance as the price of particular stock values are decided by market psychology. The support and resistance lines are very important to understand the market psychology which is very well proven with price action patterns and the lines are drawn based on,
Lower Extreme = 0.1 (Changeable)
Maximum Range = 21 days highest high - 21 days lowest low.
Support Line = 21 days lowest low + (Maximum Range * Lower Extreme)
Resistance Line = 21 days highest high - (Maximum Range * Lower Extreme)
RSI - Relative strength indicator is very famous to find the market momentum within the range of 0 - 100. Though the lookback period is changeable, the 14 days lookback period is the perfect match as the momentum of market movement for the last 3 weeks will always assist to identify the market regime. Here the momentum is just to highlight the indication (green up arrow under the candle for long and red down arrow above the candle for short) of market movement though it is not very important to consider if the price of the stock respect the support & resistance lines along with volume indicator (* = violet color).
OBV - Momentum:
The on-balance volume is always going indicator on any kind of tickers, which helps to identify the buying interest. Now, applying momentum on OBV with the positive movement for at least two consecutive days gives perfect confirmation for entry. A combination of the price along with this momentum(OBV) in the chart will help us to know the whipsaw in the price.
The Symbol "*" on top of each bar shows the market interest in that particular stock. If your ticker is fundamentally strong then you can see this "*" even when the market falls.
MACD:
One of the favorites and simple indicators widely used, where the thump of the rule is not to change the length even if it is allowed. It's OK to believe blindly in certain indicator and consider it while trading. That's why the indicator changes the bar color by following the MACD histogram.
Volume:
It may be the OBV works based on the open price and close price along with volume movement, it is wise to have the volume that is plotted along with price movement that should help you to decide whether the market is greedy or fearful.
The symbol "-" on top of each bar tells you a lot and don't ignore it.
Moving Average:
Moving average is a very good trend indicator as everyone considers seeing along with the price in the chart which is not omitted while we gauge the price movement alone with volume in this indicator. The 200, 90 & 50 MA's are everyone's favorite, and the same is plotted on the chart.
As explained above, the combination of all four indicators with price movement will give us very good confidence to take entry.
Candlestick Pattern:
You should admire the techniques of the candlestick pattern as you navigate the chart from right to left. Though there are a lot of patterns that exist, it is easy to enable and disable to view the signal as the label.
Further, last but not least, the exit always depends on individual conviction and how often the individual watch the price movement, if your conviction is strong then follow the down arrow red indication. If not, then exit with a trailing stop that indicates the bar with orange color.
Happy investing
Note: It is just a combination of multiple indicators and patterns to get one holistic view. So, the credit goes to all wise developers who publically published.
Bands and Channels
Polynomial Regression Bands w/ Extrapolation of Price [Loxx]Polynomial Regression Bands w/ Extrapolation of Price is a moving average built on Polynomial Regression. This indicator paints both a non-repainting moving average and also a projection forecast based on the Polynomial Regression. I've included 33 source types and 38 moving average types to smooth the price input before it's run through the Polynomial Regression algorithm. This indicator only paints X many bars back so as to increase on screen calculation speed. Make sure to read the tooltips to answer any questions you have.
What is Polynomial Regression?
In statistics, polynomial regression is a form of regression analysis in which the relationship between the independent variable x and the dependent variable y is modeled as an nth degree polynomial in x. Polynomial regression fits a nonlinear relationship between the value of x and the corresponding conditional mean of y, denoted E(y |x). Although polynomial regression fits a nonlinear model to the data, as a statistical estimation problem it is linear, in the sense that the regression function E(y | x) is linear in the unknown parameters that are estimated from the data. For this reason, polynomial regression is considered to be a special case of multiple linear regression .
Related indicators
Polynomial-Regression-Fitted Oscillator
Polynomial-Regression-Fitted RSI
PA-Adaptive Polynomial Regression Fitted Moving Average
Poly Cycle
Fourier Extrapolator of Price w/ Projection Forecast
MTF EMA Ribbon & Bands + BBMulti Timeframe Exponential Moving Average Ribbon & Bands + Boillinger Bands
I used the script "EMA Ribbon - low clutter, configurable " by adam24x, I made some color change and I added a few indicators (Boillinger Bands, EMA on multi timeframe and EMA bands from "34 EMA Bands " by VishvaP).
The script can display various EMA from the chart's timeframe but also EMA from other timeframes.
Bollinger Bands and EMA bands can also be added to the chart.
Bermaui Variety Averages Bands [Loxx]Bermaui Variety Averages Bands is a reverse Bollinger Bands indicator with Loxx's Variety Moving Averages and Loxx's Expanded Source Types.
What are Bermaui Bands?
Bermaui Bands (BB) is a technical analysis tool that help filter between ranging and trending price movements. A buy signal is made when price crosses above the upper band, a sell signal is made when price crosses below the bottom band. The idea is when the bands are far apart, this is low volatility; when the bands are close together, this is high volatility.
Included
Loxx's Expanded Source Types
Loxx's Moving Averages
Alerts
Signals
Ultimate IndicatorThis is a combination of all the price chart indicators I frequently switch between. It contains my day time highlighter (for day trading), multi-timeframe long-term trend indicator for current commodity in the bottom right, customizable trend EMA which also has multi-timeframe drawing capabilities, VWAP, customizable indicators with separate settings from the trend indicator including: EMA, HL2 over time, Donchian Channels, Keltner Channels, Bollinger Bands, and Super Trend. The settings for these are right below the trend settings and can have their length and multiplier adjusted. All of those also have multi-timeframe capabilities separate from the trend multi-time settings.
The Day Trade Highlight option will draw faint yellow between 9:15-9:25, red between 9:25-9:45, yellow between 9:45-10:05. There will be one white background at 9:30am to show the opening of the market. while the market is open there will be a very faint blue background. For the end of the day there will be yellow between 15:45-15:50, red between 15:50-16:00, and yellow between 16:00-16:05. During the night hours, there is no coloring. The purpose of this highlight is to show the opening / closing times of the market and the hot times for large moves.
The indicators can also be colored in the following ways:
1. Simple = Makes all colors for the indicator Gray
2. Trend = Will use the Donchian Channels to get the short-trend direction and by default will color the short-term direction as Blue or Red. Unless using Super Trend, the Donchian Channel is used to find short-term trend direction.
3. Trend Adv = Will use the Donchian Channels to get the short-trend direction and by default will color the short-term direction as Blue or Red. Unless using Super Trend, the Donchian Channel is used to find short-term trend direction. If there is a short-term up-trend during a long-term down-trend, the Blue will become Navy. If short-term down-trend during long-term up-trend, the Red will be Brown.
4. Squeeze = Compares the Bollinger Bands width to the Keltner Channels width and will color based on relative squeeze of the market: Teal = no squeeze. Yellow = little squeeze. Red = decent squeeze. White = huge squeeze. if you do not understand this one, try drawing the Bollinger Bands while using the Squeeze color option and it should become more apparent how this works. I also recommend leaving the length and multiplier to the default 20 and 2 if using this setting and only changing the timeframe to get longer/shorter lengths as I've seen that changing the length or multiplier can more or less make it not work at all.
Along with the indicator settings are options to draw lines/labels/fills for the indicator. I enjoy having only fills for a cleaner look.
The Labels option will show Buy/Sell signals when the short-term trend flips to agree with the long-term trend.
The Trend Bars option will do the same as the Labels option but instead will color the bars white when a Buy/Sell option is given.
The Range Bars option shows will color a bar white when the Close of a candle is outside of a respective ranging indicator option (Bollinger or Keltner).
The Trend Bars will draw white candles no matter which indicator selection you make (even "Off"). However, Range Bars will only draw white when either Bollinger or Keltner are selected.
The Donchian Channels and Super Trend are trending indicators and should be used during trending markets. I like to use the MACD in conjunction with these indicators for possibly earlier entries.
The Bollinger Bands and Keltner Channel are ranging indicators and should be used during ranging markets. I like to use the RSI in conjunction with these indicators and will use 60/40 for overbought and oversold areas rather than 70/30. During a range, I wait for an overbought or oversold indication and will buy/sell when it crosses back into the middle area and close my position when it touches the opposite band.
I have a MACD/RSI combination indicator if you'd like that as well :D
As always, trade at your own risk. This is not some secret indicator that will 100% win. As always, the trades you see in the picture use a 1:1.5 or 1:2 risk to reward ratio, for today (August 8, 2022) it won 5/6 times with one trade still open at the end of the day. Manage your account correctly and you'll win in the long term. Hit me up with any questions or suggestions. Happy Trading!
MTF VWAP & StDev BandsMulti Timeframe Volume Weighted Average Price with Standard Deviation Bands
I used the script "Koalafied VWAP D/W/M/Q/Y" by Koalafied_3 and made some changes, such as adding more standard deviation bands.
The script can display the daily, weekly, monthly, quarterly and yearly VWAP.
Standard deviation bands values can be changed (default values are 0.618, 1, 1.618, 2, 2.618, 3).
Also the previous standard deviation bands can be displayed.
Value At Risk Channel [AstrideUnicorn]The Value at Risk Channel (VaR Channel) is a trading indicator designed to help traders control the level of risk exposure in their positions. The user can select a time period and a probability value, and the indicator will plot the upper and lower limits that the price can reach during the selected time period with the given probability.
CONCEPTS
The indicator is based on the Value at Risk (VaR) calculation. VaR is an important metric in risk management that quantifies the degree of potential financial loss within a position, portfolio or company over a specific period of time. It is widely used by financial institutions like banks and investment companies to forecast the extent and likelihood of potential losses in their portfolios.
We use the so-called “historical method” to compute VaR. The algorithm looks at the history of past returns and creates a histogram that represents the statistical distribution of past returns. Assuming that the returns follow a normal distribution, one can assign a probability to each value of return. The probability of a specific return value is determined by the distribution percentile to which it belongs.
HOW TO USE
Let’s assume you want to plot the upper and lower limits that price will reach within 4 hours with 5% probability. To do this, go to the indicator Settings tab and set the Timeframe parameter to "4 hours'' and the Probability parameter to 5.0.
You can use the indicator to set your Stop-Loss at the price level where it will trigger with low probability. And what's more, you can measure and control the probability of triggering.
You can also see how likely it is that the price will reach your Take-Profit within a specific period of time. For example, you expect your target level to be reached within a week. To determine this probability, set the Timeframe parameter to "1 week" and adjust the Probability parameter so that the upper or lower limit of your VaR channel is close to your Take-Profit level. The resulting Probability parameter value will show the probability of reaching your target in the expected time.
The indicator can be a useful tool for measuring and managing risk, as well as for developing and fine-tuning trading strategies. If you find other uses for the indicator, feel free to share them in the comments!
SETTINGS
Timeframe - sets the time period, during which the price can reach the upper or lower bound of the VaR channel with the probability, set by the Probability parameter.
Probability - specifies the probability with which the price can reach the upper or lower bound of the VaR channel during the time period specified by the Timeframe parameter.
Window - specifies the length of history (number of historical bars) used for VaR calculation.
Return Moving Average [SpiritualHealer117]The return moving average is similar to a simple moving average, but is based on return instead of close prices. This indicator works in two modes, oscillator mode and default mode, which can be selected from the inputs menu for the indicator. Oscillator mode features an oscillator centered around 1, which shows the return, and how it relates to the moving average for returns, highest return and lowest return. Default mode features three lines, a white moving average line which shows the average return multiplied by the source, a red line which is calculated from the highest return multiplied by the source, and a green line which shows the lowest return multiplied by the source.
The indicator can be used for checking trends or as an indicator of reversals.
Hodrick-Prescott Channel [Loxx]Hodrick-Prescott Channel is a fast and slow moving average that moves inside a channel. Breakouts are when the fast ma crosses up over the slow ma and breakdowns are the opposite. The white moving average is the fast ma, the slow moving average is the red/green ma.
What is Hodrick–Prescott filter?
The Hodrick–Prescott filter (also known as Hodrick–Prescott decomposition) is a mathematical tool used in macroeconomics, especially in real business cycle theory, to remove the cyclical component of a time series from raw data. It is used to obtain a smoothed-curve representation of a time series, one that is more sensitive to long-term than to short-term fluctuations. The adjustment of the sensitivity of the trend to short-term fluctuations is achieved by modifying a multiplier Lambda.
The filter was popularized in the field of economics in the 1990s by economists Robert J. Hodrick and Nobel Memorial Prize winner Edward C. Prescott, though it was first proposed much earlier by E. T. Whittaker in 1923.
There are some drawbacks to use the HP filter than you can read here: en.wikipedia.org
Included
Bar coloring
Signals
Alerts
Scalp LevelsThis script is to provide scalp levels based on Price Action. It is mainly built keeping price action of SPY/SPX in mind.
J-AutomationJust a simple automation for FX trading.
This strategy goes long if the MACD histogram and the MACD momentum are both above zero and the fast MACD moving average is above the slow MACD moving average. As additional long filter the recent price has to be above the SMA 200. If the inverse logic is true, the strategy goes short.
DEMA Supertrend Bands [Misu]█ Indicator based on DEMA (Double Exponential Moving Average) & Supertrend to show Bands .
DEMA attempts to remove the inherent lag associated with Moving Averages by placing more weight on recent values.
Supertrend aims to detect price trends, it's also used to set protective stops.
█ Usages:
Combining Dema to calculate Supertrend results in nice lower and upper bands.
This can be used to identify potential supports and resistances and set protective stops.
█ Parameters:
Length DEMA: Double Ema lenght used to calculate DEMA. Dema is used by Supertrend indicator.
Length Atr: Atr lenght used to calculate Atr. Atr is used by Supertrend indicator.
Band Mult: Used to calculate Supertrend Bands width.
█ Other Applications:
The mid band can be used to filter bad signals in the manner of a more classical Moving Average.
AveragerStrategy:
The indicator builds horizontal channels to help you make a buying decision.
Rules:
1. First purchase:
1.1 If the price is in the green channel (3): feel free to buy in the amount of 3 lots.
1.2 If the price is in the blue channel, then we look for moving averages to be closer to the corresponding channel lines.
1.2.1 In channel 2, the blue MA is closer to the blue channel line (above the green one), the green MA is closer to the green channel line (below the blue one).
1.2.2 In channel 4, the blue moving average is closer to the blue channel line (below the green one), the green moving average is closer to the green channel line (above the blue one). If the conditions are met, we make a purchase in the number of lots indicated in the channel label (2 or 4 lots).
1.3 We do not make the first purchase in the red channels (1, 2, 5).
2. Subsequent purchases/sales:
2.1 When the price moves from one channel to another, we keep the number of lots in accordance with the channel labels. If the price went into the lower channel, we buy 1 more lot, if it goes into the upper channel, we sell 1 lot.
3. Suitable timeframes: from 1H to 1W. Best of all shows the result on the 1D timeframe.
Labels (except 0) contain information about the number of lots and the average price of the channel for placing pending orders ONLY for sale. We always buy manually.
The strategy is not an individual recommendation.
-----
Стратегия:
Индикатор строит горизонтальные каналы, помогающие принять решение о покупке.
Правила:
1. Первая покупка:
1.1 Если цена находится в зеленом канале (3): смело покупаем в количестве 3 лота.
1.2 Если цена в синем канале, то смотрим, чтобы скользящие средние были ближе к соответствующим линиям канала.
1.2.1 В канале 2 синяя скользящая - ближе к синей линии канала (выше зеленой), зеленая скользящая - ближе к зеленой линии канала (ниже синей).
1.2.2 В канале 4 синяя скользящая - ближе к синей линии канала (ниже зеленой), зеленая скользящая - ближе к зеленой линии канала (выше синей). Если условия соблюдены, делаем покупку в количестве лотов, указанному в лейбле канала (2 или 4 лота).
1.3 В красных каналах (1, 2, 5) первую покупку не совершаем.
2. Последующие покупки/продажи:
2.1 При переходе цены из одного канала в другой держим количество лотов в соответствии с лейблами канала. Если цена ушла в нижний канал - докупаем 1 лот, если в верхний - продаем 1 лот.
3. Подходящие таймфреймы: от 1Ч до 1Н. Лучше всего показывает результат на 1Д таймфрейме.
Лейблы (кроме 0) содержат информацию о количестве лотов и среднюю цену канала для выставления отложенных ордеров ТОЛЬКО на продажу. Докупаем всегда вручную.
Стратегия не является индивидуальной рекомендацией.
Refracted EMARefracted EMA is a price based indicator with bands that is built on moving average.
The price range between the bands directly depends on relationship of Average True Range to Moving Average. This gives us very valuable variable constant that changes with the market moves.
So the bands expand and contract due to changes in volatility of the market, which makes this tool very flexible exposing psychological levels.
TF Segmented Polynomial Regression [LuxAlgo]This indicator displays polynomial regression channels fitted using data within a user selected time interval.
The model is fitted using the same method described in our previous script:
Settings
Degree: Degree of the fitted polynomial
Width: Multiplicative factor of the model RMSE. Controls the width of the polynomial regression's channels
Timeframe: Fits the polynomial regression using data within the selected timeframe interval
Show fit for new bars: If selected, will fit the regression model for newly generated bars, else the previous fitted value is displayed.
Src: Input source
Usage
Segmented (or piecewise) models yield multiple fits by first partitioning the data into multiple intervals from specific partitioning conditions. In this script this partitioning condition is for a user selected timeframe to change.
Segmented models can be particularly pertinent for market prices, which often describes a series of local trends.
Segmented polynomial regressions can describe the nature of underlying trends in the price from their fit, such as if an underlying trend is more linear (trending) or constant (ranging), and if a trend is monotonic.
The above chart shows a monthly partitioning on SPX 15m, using a polynomial regression of degree 3. Channel extremities allows highlighting local tops/bottoms.
For real time applications users can choose to fit a current model to incoming price data using the Show fit for new bars settings.
Details
The script does not make use of line.new to display the segmented linear regressions, which allows showing a higher number of historical fits. Each channel extremity as well as the model fit is displayed from the plot function, as such user can more easily set alerts on them.
It is important to note that achieving this requires accessing future price data, as such this script is subject to lookahead bias, historical results differ from the results one could have obtained in real-time.
Adaptive-LB, Jurik-Filtered, Triangular MA w/ Price Zones [Loxx]Adaptive-LB, Jurik-Filtered, Triangular MA w/ Price Zones is a moving average indicator that takes as its input an adaptive lookback period. This is an experimental indicator and I wouldn't use this for trading. It's more to explore different adaptive calculation methods and their applications to moving averages and channels. Unlike the traditional Triangular Moving Average, this one uses Jurik smoothing.
What is the Triangular Moving Average
The Triangular Moving Average is basically a double-smoothed Simple Moving Average that gives more weight to the middle section of the data interval. The TMA has a significant lag to current prices and is not well-suited to fast moving markets. TMA = SUM (SMA values)/ N Where N = the number of periods.
What is Jurik Volty used in the Juirk Filter?
One of the lesser known qualities of Juirk smoothing is that the Jurik smoothing process is adaptive. "Jurik Volty" (a sort of market volatility ) is what makes Jurik smoothing adaptive. The Jurik Volty calculation can be used as both a standalone indicator and to smooth other indicators that you wish to make adaptive.
What is the Jurik Moving Average?
Have you noticed how moving averages add some lag (delay) to your signals? ... especially when price gaps up or down in a big move, and you are waiting for your moving average to catch up? Wait no more! JMA eliminates this problem forever and gives you the best of both worlds: low lag and smooth lines.
Included:
Bar coloring
Signals
Alerts
HDT CloudsHDT Clouds combines custom clouds such as the 200EMA/MA cloud indicator to create high confluence bounce zones when combined with VWAP. The HDT indicator combines various clouds with the Volume Weighted Average Price indicator and Standard Deviations which allow users to identify areas on the chart where the stock may reverse.
On smaller time frames, like the 5/15/30minute, the 200ema/ma cloud and VWAP (when sitting in the same relative area) creates pockets of supply or demand.
In addition, the various moving average clouds, such as the 8/9ema cloud and the 34/50ema cloud, create areas of supply and demand depending on the overall trend. If the stock is trending very strongly to the upside, the 8/9ema can be used as a potential bounce area. Whereas, if the stock is trending, but not quite as strong, the stock may have demand at the 34-50ema where the stock could see a potential bounce to the upside. What sets this indicator apart from other moving average clouds is the incorporation of VWAP/Standard Deviation and the combining of a 200EMA/MA indicator which creates a strong pocket of demand even on lower time frames such as the 5 or 15 minute time frame.
SMA VWAP BANDS [qrsq]Description
This indicator is used to find support and resistance utilizing both SMA and VWAP. It can be used on lower and higher time frames to understand where price is likely to reject or bounce.
How it works
Rather than using the usual calculation for the VWAP, instead this script smooths the volume first with the SMA and then respectively calculates the smoothed multiplication of high, low and close price with the volume individually. These values are then divided by the smoothed volume to find individual VWAP's for each of the sources. The standard deviations of these are calculated, resulting in an upper, lower and middle band. It is essentially VWAP bands with some smoothed calculations in the middle.
How to use it
I like to use the bands for LTF scalping as well as HTF swings.
For scalping:
I tend to use either the 5m or 15m TF
I then set the indicator's TF to 1m
I will take a scalp based on the bands confluence with other PA methods, if price is being either supported or rejected.
For swings:
I tend to use a variety of TFs, including: 30m, 1H, 4H, D
I then set the indicator's TF to "Chart"
I will take a swing based on the bands confluence with other PA methods, if price is being either supported or rejected.
I also tend to use them on perpetual contracts as the volume seems to be more consistent and hence results in more accurate support and resistance.
Gate Signal by Market yogiThis indicator is made by Nischay Rana (Market Yogi)
How to use this Indicator
This is simple group of 8 moving averages, which can be configured in various ways according to your trading requirement.
1. moving average ribbon
2.moving average channel
3.moving average gate signal
4.This indicator has bonus indicator of bollinger bands inbuilt.
Logic:
As price has tendency to get closer to their moving averages. The logic behind this indicator is to use the contraction and expansion concepts of moving averages to find best entry exit points.
This nature of Price action is use to capture the big move after the convergence of all moving averages.
CAUTION : Do not blindly trade the gates as gate has tendency to break out on either side. So use this indicator in confluence with price action and other technical analysis to capture bigger moves.
Higher the gate width more gates are found. Similarly lesser the gate width less gate are found. i.e. Tight squeeze of all the moving averages.
"ENJOY HAPPY TRADING.."
Truly Yours Market Yogi
Relative Andean ScalpingThis is an experimental signal providing script for scalper that uses 2 of open source indicators.
First one provides the signals for us called Andean Oscillator by @alexgrover . We use it to create long signals when bull line crosses over signal line while being above the bear line. And reverse is true for shorts where bear line crosses over signal line while being above bull line.
Second one is used for filtering out low volatility areas thanks to great idea by @HeWhoMustNotBeNamed called Relative Bandwidth Filter . We use it to filter out signals and create signals only when the Relative Bandwith Line below middle line.
The default values for both indicators changed a bit, especially used linreg values to create relatively better signals. These can be changed in settings. Please be aware that i did not do extensive testing with this indicator in different market conditions so it should be used with caution.
Relative Bandwidth FilterThis is a very simple script which can be used as measure to define your trading zones based on volatility.
Concept
This script tries to identify the area of low and high volatility based on comparison between Bandwidth of higher length and ATR of lower length.
Relative Bandwidth = Bandwidth / ATR
Bandwidth can be based on either Bollinger Band, Keltner Channel or Donchian Channel. Length of the bandwidth need to be ideally higher.
ATR is calculated using built in ATR method and ATR length need to be ideally lower than that used for calculating Bandwidth.
Once we got Relative Bandwidth, the next step is to apply Bollinger Band on this to measure how relatively high/low this value is.
Overall - If relative bandwidth is higher, then volatility is comparatively low. If relative bandwidth is lower, then volatility is comparatively high.
Usage
This can be used with your own strategy to filter out your non-trading zones based on volatility. Script plots a variable called "Signal" - which is not shown on chart pane. But, it is available in the data window. This can be used in another script as external input and apply logic.
Signal values can be
1 : Allow only Long
-1 : Allow only short
0 : Do not allow any trades
2 : Allow both Long and Short
R-squared Adaptive T3 w/ DSL [Loxx]R-squared Adaptive T3 w/ DSL is the following T3 indicator but with Discontinued Signal Lines added to reduce noise and thereby increase signal accuracy. This adaptation makes this indicator lower TF scalp friendly.
What is R-squared Adaptive?
One tool available in forecasting the trendiness of the breakout is the coefficient of determination ( R-squared ), a statistical measurement.
The R-squared indicates linear strength between the security's price (the Y - axis) and time (the X - axis). The R-squared is the percentage of squared error that the linear regression can eliminate if it were used as the predictor instead of the mean value. If the R-squared were 0.99, then the linear regression would eliminate 99% of the error for prediction versus predicting closing prices using a simple moving average .
R-squared is used here to derive a T3 factor used to modify price before passing price through a six-pole non-linear Kalman filter.
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
EMA and FEMA Signla/DSL smoothing
Loxx's Expanded Source Types