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
頻帶和通道
Easy Bands Custom IndicatorBased on 21 Week SMA
--- // Buy when the market is oversold - Sell when the Market is overbought // --
If you don't know what that means don't use this indicator. Good luck out there!
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
PPO w/ Discontinued Signal Lines [Loxx]PPO w/ Discontinued Signal Lines is a Percentage Price Oscillator with some upgrades. This indicator has 33 source types and 35+ moving average types as well as Discontinued Signal Lines and divergences. These additions reduce noise and increase hit rate.
What is the Price Percentage Oscillator?
The percentage price oscillator (PPO) is a technical momentum indicator that shows the relationship between two moving averages in percentage terms. The moving averages are a 26-period and 12-period exponential moving average (EMA).
The PPO is used to compare asset performance and volatility, spot divergence that could lead to price reversals, generate trade signals, and help confirm trend direction.
Included:
Bar coloring
3 signal variations w/ alerts
Divergences w/ alerts
Loxx's Expanded Source Types
Loxx's Moving Averages
Buy/Sell Signal Template/Boilerplate Strategy [MyTradingCoder]This script allows the user to connect an external indicator output/plot value to allow for a no-code solution to setup a simple buy/sell signal strategy. For those of you who do not know how to program, do not be intimidated as this is a very easy setup process.
Maybe you want to buy when the 'RSI' value drops below '30' and then sell when the 'RSI' value climbs above '70', but you don't want to code it. You can do that with this indicator along with thousands of others found on the free TradingView indicator library.
Step #1:
Put the strategy on the chart.
Step #2:
Apply a secondary indicator onto the chart, such as an RSI .
Step #3:
Open the strategy settings and change the source to the RSI
Step #4:
Change the 'Signal Settings' to match when you want a buy, or a sell. For example, if you want to get a buy signal when the RSI crosses above 50, and get a sell when it crosses below 50, set the 'buy value' to 50, and the 'buy type' to greater than, then set the 'sell value' to 50 and the 'sell type' to less than. BOOM! It works :)
Buy/Sell Signal Template/Boilerplate [MyTradingCoder]This script allows the user to connect an external indicator output/plot value to allow for a no-code solution to setup a simple buy/sell signal indicator. For those of you who do not know how to program, do not be intimidated as this is a very easy setup process.
Maybe you want to buy when the 'RSI' value drops below '30' and then sell when the 'RSI' value climbs above '70', but you don't want to code it. You can do that with this indicator along with thousands of others found on the free TradingView indicator library.
Step #1:
Put the indicator on the chart.
Step #2:
Apply a secondary indicator onto the chart, such as an RSI.
Step #3:
Open the indicator settings and change the source to the RSI
Step #4:
Change the 'Signal Settings' to match when you want a buy, or a sell. For example, if you want to get a buy signal when the RSI crosses above 50, and get a sell when it crosses below 50, set the 'buy value' to 50, and the 'buy type' to greater than, then set the 'sell value' to 50 and the 'sell type' to less than. BOOM! It works :)
LabTrend SSL [Loxx]LabTrend SSL is based on the popular ASCTrend. This version adds an SSL channel to show the macro trend.
What is Lab Trend?
LabTrend is a complete trading indicator developed by Igorad and is based on the popular ASC Trend. LabTrend is the market "direction" indicator. It shows trend direction by colors, when the market changes to or stays in an up-trend, the bars become or remain GREEN. When the market changes to or stays in a downtrend, the bars become or remain RED. When the market goes sideways or is not strong on either side, the bars become or remain WHITE. This version adds an SSL channel to show the core major trend while bar coloring changes on the micro trend.
Included:
Bar coloring
Signals
Alerts
Hitokiri rsi and bbNG : This indicator is created by combining the standard period RSI indicator with an Oversold limit of 32, an Overbought limit of 70 and a period of 14 (these values can be changed optionally from the entries and still tabs of the indicator settings) and the Bollinger Band . indicator with a standard deviation of 2 and a period of 20. Also, the RSI Oversold is an upward green triangle where the price simultaneously falls below the BB and the lower limit (Low) (i.e. below 32), where the RSI Overbought (i.e. above 70) at the same time the price rises above the BB and the upper limit (Upper) is a downward red triangle. is indicated by a triangle. An alarm condition is established on these conditions. Source codes are posted visually and written in clear language and with explanations for beginners to learn to pine.
TR : Bu gösterge OverSold sınırı 32, OverBought sınırı 70 ve periodu 14 olan (bu değerler tercihe göre indikatör ayarlarının girdiler ve still sekmelerinden değiştirilebilir) standart periodluk RSI göstergesi ile standart sapma değeri 2, periodu 20 olan Bollinger Bandı göstergesinin birleştirilmesiyle oluşturulmuş olup ilaveten RSI'nin OverSold iken (yani 32 altına düştüğü) aynı anda fiyatın BBand alt sınırı (Lower) altına düştüğü yerleri yukarı yönlü yeşil üçgenle, RSI'nin OverBought iken (yani 70 üstüne çıktığı) aynı anda fiyatın BBand üst sınırı (Upper) üstüne çıktığı yerleri aşağı yönlü kırmızı üçgenle belirtmektedir. Bu şartlar üzerine de alarm kondüsyonu oluşturulmuştur. Kaynak kodları görünür olarak yayınlanmış olup, pine öğrenmeye yeni başlayanlar için anlaşılır dilde ve açıklamalar eklenerek yazılmıştır.
Variety-Filtered, Squeeze Moving Averages [Loxx]Variety-Filtered, Squeeze Moving Averages is a chop zone indicator that identifies when price is below a specific volatility threshold calculated as the difference between a fast and slow moving average and filtered using ATR- or Pips-based threshold. This indicator can be use as both an entry and exit indicator. It identifies both chop zones and breakouts/breakdowns
How to use
When the candles turn white and the threshold bands appear on the chart, this is indicative of low volatility
When price exits the threshold bands, price will usually explode up or down giving a long or short signal. This acts as a sort of squeeze momentum.
Included:
Bar coloring
Signals
Alerts, 4 types of alerts: Squeeze started, Squeeze ended, long, and short
Loxx's Expanded Source Types
35+ Loxx's Moving Averages
STD-Filterd, R-squared Adaptive T3 w/ Dynamic Zones [Loxx]STD-Filterd, R-squared Adaptive T3 w/ Dynamic Zones is a standard deviation filtered R-squared Adaptive T3 moving average with dynamic zones.
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.
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 are Dynamic Zones?
As explained in "Stocks & Commodities V15:7 (306-310): Dynamic Zones by Leo Zamansky, Ph .D., and David Stendahl"
Most indicators use a fixed zone for buy and sell signals. Here’ s a concept based on zones that are responsive to past levels of the indicator.
One approach to active investing employs the use of oscillators to exploit tradable market trends. This investing style follows a very simple form of logic: Enter the market only when an oscillator has moved far above or below traditional trading lev- els. However, these oscillator- driven systems lack the ability to evolve with the market because they use fixed buy and sell zones. Traders typically use one set of buy and sell zones for a bull market and substantially different zones for a bear market. And therein lies the problem.
Once traders begin introducing their market opinions into trading equations, by changing the zones, they negate the system’s mechanical nature. The objective is to have a system automatically define its own buy and sell zones and thereby profitably trade in any market — bull or bear. Dynamic zones offer a solution to the problem of fixed buy and sell zones for any oscillator-driven system.
An indicator’s extreme levels can be quantified using statistical methods. These extreme levels are calculated for a certain period and serve as the buy and sell zones for a trading system. The repetition of this statistical process for every value of the indicator creates values that become the dynamic zones. The zones are calculated in such a way that the probability of the indicator value rising above, or falling below, the dynamic zones is equal to a given probability input set by the trader.
To better understand dynamic zones, let's first describe them mathematically and then explain their use. The dynamic zones definition:
Find V such that:
For dynamic zone buy: P{X <= V}=P1
For dynamic zone sell: P{X >= V}=P2
where P1 and P2 are the probabilities set by the trader, X is the value of the indicator for the selected period and V represents the value of the dynamic zone.
The probability input P1 and P2 can be adjusted by the trader to encompass as much or as little data as the trader would like. The smaller the probability, the fewer data values above and below the dynamic zones. This translates into a wider range between the buy and sell zones. If a 10% probability is used for P1 and P2, only those data values that make up the top 10% and bottom 10% for an indicator are used in the construction of the zones. Of the values, 80% will fall between the two extreme levels. Because dynamic zone levels are penetrated so infrequently, when this happens, traders know that the market has truly moved into overbought or oversold territory.
Calculating the Dynamic Zones
The algorithm for the dynamic zones is a series of steps. First, decide the value of the lookback period t. Next, decide the value of the probability Pbuy for buy zone and value of the probability Psell for the sell zone.
For i=1, to the last lookback period, build the distribution f(x) of the price during the lookback period i. Then find the value Vi1 such that the probability of the price less than or equal to Vi1 during the lookback period i is equal to Pbuy. Find the value Vi2 such that the probability of the price greater or equal to Vi2 during the lookback period i is equal to Psell. The sequence of Vi1 for all periods gives the buy zone. The sequence of Vi2 for all periods gives the sell zone.
In the algorithm description, we have: Build the distribution f(x) of the price during the lookback period i. The distribution here is empirical namely, how many times a given value of x appeared during the lookback period. The problem is to find such x that the probability of a price being greater or equal to x will be equal to a probability selected by the user. Probability is the area under the distribution curve. The task is to find such value of x that the area under the distribution curve to the right of x will be equal to the probability selected by the user. That x is the dynamic zone.
Included:
Bar coloring
Signals
Alerts
Loxx's Expanded Source Types