Zero Lag Trend Signals (MTF) [AlgoAlpha]Zero Lag Trend Signals 🚀📈
Ready to take your trend-following strategy to the next level? Say hello to Zero Lag Trend Signals , a precision-engineered Pine Script™ indicator designed to eliminate lag and provide rapid trend insights across multiple timeframes. 💡 This tool blends zero-lag EMA (ZLEMA) logic with volatility bands, trend-shift markers, and dynamic alerts. The result? Timely signals with minimal noise for clearer decision-making, whether you're trading intraday or on longer horizons. 🔄
🟢 Zero-Lag Trend Detection : Uses a zero-lag EMA (ZLEMA) to smooth price data while minimizing delay.
⚡ Multi-Timeframe Signals : Displays trends across up to 5 timeframes (from 5 minutes to daily) on a sleek table.
📊 Volatility-Based Bands : Adaptive upper and lower bands, helping you identify trend reversals with reduced false signals.
🔔 Custom Alerts : Get notified of key trend changes instantly with built-in alert conditions.
🎨 Color-Coded Visualization : Bullish and bearish signals pop with clear color coding, ensuring easy chart reading.
⚙️ Fully Configurable : Modify EMA length, band multiplier, colors, and timeframe settings to suit your strategy.
How to Use 📚
⭐ Add the Indicator : Add the indicator to favorites by pressing the star icon. Set your preferred EMA length and band multiplier. Choose your desired timeframes for multi-frame trend monitoring.
💻 Watch the Table & Chart : The top-right table dynamically updates with bullish or bearish signals across multiple timeframes. Colored arrows on the chart indicate potential entry points when the price crosses the ZLEMA with confirmation from volatility bands.
🔔 Enable Alerts : Configure alerts for real-time notifications when trends shift—no need to monitor charts constantly.
How It Works 🧠
The script calculates the zero-lag EMA (ZLEMA) by compensating for data lag, giving traders more responsive moving averages. It checks for volatility shifts using the Average True Range (ATR), multiplied to create upper and lower deviation bands. If the price crosses above or below these bands, it marks the start of new trends. Additionally, the indicator aggregates trend data from up to five configurable timeframes and displays them in a neat summary table. This helps you confirm trends across different intervals—ideal for multi-timeframe analysis. The visual signals include upward and downward arrows on the chart, denoting potential entries or exits when trends align across timeframes. Traders can use these cues to make well-timed trades and avoid lag-related pitfalls.
Zerolag
Nasan Moving AverageNasan Moving Average belong to the group of moving average which provides a high degree of smoothness with very low lag.
The calculation process involves several steps to analyze the typical price of a financial asset over specific periods. It starts by computing a simple moving average and standard deviation of the typical price. Then, it standardizes (differencing TP - Average Typical price over previous n periods) the price and applies an inverse hyperbolic sine transformation to the standardized value. The transformed values are summed cumulatively, and various weighted moving averages are calculated to adjust and smooth the data. The final output is a smoothed signal with reduced lag.
Input Parameters:
len: Differencing length (default 21, Use a minimum of 5 and for lower time frames less than 15 min use values between 300 -3000)
len1: Correction Factor Length 1 (default 21, this determines the length of the MA you want , eg. 10 MA, 50 MA, 100 MA, )
len2: Correction Factor Length 2 (default 9, this works best if it is ~ </=1/2 of len1 )
len3: Smoothing Length (default 5, I would not change this and only use if I want to introduce lag where you want to use it for cross over strategies).
Differencing and Standardization:
The code calculates the standardized price a by differencing the typical price and normalizing it using the mean and standard deviation. This step standardizes the price changes.
Transformation:
The transformation using logarithms and square roots (b) aim to stabilize the variance and make the distribution more normal-like, improving the robustness of the cumulative sum c.
Cumulative Sum:
The cumulative sum c of the transformed series helps in integrating the series over time, capturing the overall trend and movement.
Correction Factors:
Correction factors c1 and c4 adjust the cumulative sum based on weighted averages, to correct any biases or to align it with the typical price.
Smoothing:
The final result c6 is smoothed using a weighted moving average, reducing noise and making it easier to interpret trends.
GKD-C Zero-lag TEMA Crosses [Loxx]The Giga Kaleidoscope GKD-C Zero-lag TEMA Crosses is a confirmation module included in Loxx's "Giga Kaleidoscope Modularized Trading System."
█ GKD-C Zero-lag TEMA Crosses
Zero-lag TEMA Crosses is a spinoff of a the Zero-lag MA as described by David Stendahl in the April 2000 issue of the journal "Technical Analysis of Stocks and Commodities". This indicator uses TEMA calculation mode in order to make the lag lesser compared to the original Zero-lag MA, and that makes this version even faster than the Zero-lag DEMA too. This indicator is the difference between a Fast and Slow Zero-lag TEMA. This indicator is very useful for lower timeframe scalping.
What is the Zero-lag MA?
The Zero-lag MA (Zero-Lag Moving Average) is a technical indicator that was introduced in the April 2000 issue of the journal "Technical Analysis of Stocks and Commodities" by David Stendahl.
The Zero-lag MA is a type of moving average (MA) that is designed to reduce or eliminate the lag that is typically associated with traditional moving averages. Moving averages are a widely used technical analysis tool that helps traders to identify trends and potential trading opportunities. They work by calculating the average price of a security over a given period of time, and then plotting that average on a chart. The most commonly used moving averages are simple moving averages (SMAs) and exponential moving averages (EMAs).
The problem with traditional moving averages is that they can be slow to respond to changes in market conditions. This lag can cause traders to miss out on potential trading opportunities, or to enter or exit trades at the wrong time. The Zero-lag MA was developed as a solution to this problem.
The Zero-lag MA is calculated using a combination of two EMAs and a subtraction formula. The first step in calculating the Zero-lag MA is to calculate two exponential moving averages: a fast EMA and a slow EMA. The fast EMA is calculated over a shorter period of time than the slow EMA. The exact period lengths will depend on the trader's preferences and the security being analyzed.
Once the two EMAs have been calculated, the next step is to take the difference between them. This difference represents the current market trend, with a positive value indicating an uptrend and a negative value indicating a downtrend. However, this difference alone is not enough to create a useful indicator, as it can still suffer from lag.
To further reduce lag, the difference between the two EMAs is multiplied by a factor derived from a third, slower EMA. This slower EMA acts as a smoothing factor, helping to reduce noise and make the indicator more accurate. The exact period length of the slower EMA will depend on the trader's preferences and the security being analyzed.
The final step in calculating the Zero-lag MA is to add the result of the multiplication to the fast EMA. This produces a final value that represents the current market trend with reduced lag. The Zero-lag MA can be plotted on a chart like any other moving average, and can be used to identify trends, potential trading opportunities, and support and resistance levels.
Overall, the Zero-lag MA is designed to provide traders with a more accurate representation of current market conditions by reducing the lag time between price changes and the moving average. By doing so, it can help traders to make more informed trading decisions and improve their overall profitability.
What is the TEMA?
The triple exponential moving average (TEMA) is a technical analysis indicator that was developed to reduce the lag of traditional moving averages, such as the simple moving average (SMA) or the exponential moving average (EMA). The TEMA was first introduced by Patrick Mulloy in the January 1994 issue of the "Technical Analysis of Stocks and Commodities" magazine.
The TEMA is a type of moving average that is calculated by applying multiple exponential smoothing techniques to price data. Unlike traditional moving averages, which apply a single smoothing factor to price data, the TEMA applies three smoothing factors to produce a more responsive and accurate indicator.
To calculate the TEMA, the following steps are taken:
Calculate the single exponential moving average (SMA) of the price data over a given period.
Calculate the double exponential moving average (DEMA) of the SMA over the same period.
Calculate the triple exponential moving average (TEMA) of the DEMA over the same period.
The formula for calculating the TEMA is:
TEMA = 3 * EMA(SMA) - 3 * EMA(EMA(SMA)) + EMA(EMA(EMA(SMA)))
where EMA is the exponential moving average and SMA is the simple moving average.
The TEMA is designed to reduce the lag associated with traditional moving averages by applying multiple smoothing factors to the price data. This helps to filter out short-term price fluctuations and provide a smoother indicator of the underlying trend. The TEMA is also less susceptible to whipsaws, which occur when a security's price moves in one direction and then quickly reverses, causing false trading signals.
The TEMA can be used in a variety of ways in technical analysis. It can be used to identify trends, determine support and resistance levels, and generate trading signals. When the TEMA is rising, it is generally interpreted as a bullish signal, indicating that the price is trending higher. When the TEMA is falling, it is generally interpreted as a bearish signal, indicating that the price is trending lower.
In summary, the TEMA is a more responsive and accurate indicator than traditional moving averages, designed to reduce lag and provide a smoother representation of the underlying trend. It is a useful tool for technical analysts and traders looking to identify trends, support and resistance levels, and potential trading opportunities.
█ Giga Kaleidoscope Modularized Trading System
Core components of an NNFX algorithmic trading strategy
The NNFX algorithm is built on the principles of trend, momentum, and volatility. There are six core components in the NNFX trading algorithm:
1. Volatility - price volatility; e.g., Average True Range, True Range Double, Close-to-Close, etc.
2. Baseline - a moving average to identify price trend
3. Confirmation 1 - a technical indicator used to identify trends
4. Confirmation 2 - a technical indicator used to identify trends
5. Continuation - a technical indicator used to identify trends
6. Volatility/Volume - a technical indicator used to identify volatility/volume breakouts/breakdown
7. Exit - a technical indicator used to determine when a trend is exhausted
8. Metamorphosis - a technical indicator that produces a compound signal from the combination of other GKD indicators*
*(not part of the NNFX algorithm)
What is Volatility in the NNFX trading system?
In the NNFX (No Nonsense Forex) trading system, ATR (Average True Range) is typically used to measure the volatility of an asset. It is used as a part of the system to help determine the appropriate stop loss and take profit levels for a trade. ATR is calculated by taking the average of the true range values over a specified period.
True range is calculated as the maximum of the following values:
-Current high minus the current low
-Absolute value of the current high minus the previous close
-Absolute value of the current low minus the previous close
ATR is a dynamic indicator that changes with changes in volatility. As volatility increases, the value of ATR increases, and as volatility decreases, the value of ATR decreases. By using ATR in NNFX system, traders can adjust their stop loss and take profit levels according to the volatility of the asset being traded. This helps to ensure that the trade is given enough room to move, while also minimizing potential losses.
Other types of volatility include True Range Double (TRD), Close-to-Close, and Garman-Klass
What is a Baseline indicator?
The baseline is essentially a moving average, and is used to determine the overall direction of the market.
The baseline in the NNFX system is used to filter out trades that are not in line with the long-term trend of the market. The baseline is plotted on the chart along with other indicators, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR).
Trades are only taken when the price is in the same direction as the baseline. For example, if the baseline is sloping upwards, only long trades are taken, and if the baseline is sloping downwards, only short trades are taken. This approach helps to ensure that trades are in line with the overall trend of the market, and reduces the risk of entering trades that are likely to fail.
By using a baseline in the NNFX system, traders can have a clear reference point for determining the overall trend of the market, and can make more informed trading decisions. The baseline helps to filter out noise and false signals, and ensures that trades are taken in the direction of the long-term trend.
What is a Confirmation indicator?
Confirmation indicators are technical indicators that are used to confirm the signals generated by primary indicators. Primary indicators are the core indicators used in the NNFX system, such as the Average True Range (ATR), the Moving Average (MA), and the Relative Strength Index (RSI).
The purpose of the confirmation indicators is to reduce false signals and improve the accuracy of the trading system. They are designed to confirm the signals generated by the primary indicators by providing additional information about the strength and direction of the trend.
Some examples of confirmation indicators that may be used in the NNFX system include the Bollinger Bands, the MACD (Moving Average Convergence Divergence), and the MACD Oscillator. These indicators can provide information about the volatility, momentum, and trend strength of the market, and can be used to confirm the signals generated by the primary indicators.
In the NNFX system, confirmation indicators are used in combination with primary indicators and other filters to create a trading system that is robust and reliable. By using multiple indicators to confirm trading signals, the system aims to reduce the risk of false signals and improve the overall profitability of the trades.
What is a Continuation indicator?
In the NNFX (No Nonsense Forex) trading system, a continuation indicator is a technical indicator that is used to confirm a current trend and predict that the trend is likely to continue in the same direction. A continuation indicator is typically used in conjunction with other indicators in the system, such as a baseline indicator, to provide a comprehensive trading strategy.
What is a Volatility/Volume indicator?
Volume indicators, such as the On Balance Volume (OBV), the Chaikin Money Flow (CMF), or the Volume Price Trend (VPT), are used to measure the amount of buying and selling activity in a market. They are based on the trading volume of the market, and can provide information about the strength of the trend. In the NNFX system, volume indicators are used to confirm trading signals generated by the Moving Average and the Relative Strength Index. Volatility indicators include Average Direction Index, Waddah Attar, and Volatility Ratio. In the NNFX trading system, volatility is a proxy for volume and vice versa.
By using volume indicators as confirmation tools, the NNFX trading system aims to reduce the risk of false signals and improve the overall profitability of trades. These indicators can provide additional information about the market that is not captured by the primary indicators, and can help traders to make more informed trading decisions. In addition, volume indicators can be used to identify potential changes in market trends and to confirm the strength of price movements.
What is an Exit indicator?
The exit indicator is used in conjunction with other indicators in the system, such as the Moving Average (MA), the Relative Strength Index (RSI), and the Average True Range (ATR), to provide a comprehensive trading strategy.
The exit indicator in the NNFX system can be any technical indicator that is deemed effective at identifying optimal exit points. Examples of exit indicators that are commonly used include the Parabolic SAR, the Average Directional Index (ADX), and the Chandelier Exit.
The purpose of the exit indicator is to identify when a trend is likely to reverse or when the market conditions have changed, signaling the need to exit a trade. By using an exit indicator, traders can manage their risk and prevent significant losses.
In the NNFX system, the exit indicator is used in conjunction with a stop loss and a take profit order to maximize profits and minimize losses. The stop loss order is used to limit the amount of loss that can be incurred if the trade goes against the trader, while the take profit order is used to lock in profits when the trade is moving in the trader's favor.
Overall, the use of an exit indicator in the NNFX trading system is an important component of a comprehensive trading strategy. It allows traders to manage their risk effectively and improve the profitability of their trades by exiting at the right time.
What is an Metamorphosis indicator?
The concept of a metamorphosis indicator involves the integration of two or more GKD indicators to generate a compound signal. This is achieved by evaluating the accuracy of each indicator and selecting the signal from the indicator with the highest accuracy. As an illustration, let's consider a scenario where we calculate the accuracy of 10 indicators and choose the signal from the indicator that demonstrates the highest accuracy.
The resulting output from the metamorphosis indicator can then be utilized in a GKD-BT backtest by occupying a slot that aligns with the purpose of the metamorphosis indicator. The slot can be a GKD-B, GKD-C, or GKD-E slot, depending on the specific requirements and objectives of the indicator. This allows for seamless integration and utilization of the compound signal within the GKD-BT framework.
How does Loxx's GKD (Giga Kaleidoscope Modularized Trading System) implement the NNFX algorithm outlined above?
Loxx's GKD v2.0 system has five types of modules (indicators/strategies). These modules are:
1. GKD-BT - Backtesting module (Volatility, Number 1 in the NNFX algorithm)
2. GKD-B - Baseline module (Baseline and Volatility/Volume, Numbers 1 and 2 in the NNFX algorithm)
3. GKD-C - Confirmation 1/2 and Continuation module (Confirmation 1/2 and Continuation, Numbers 3, 4, and 5 in the NNFX algorithm)
4. GKD-V - Volatility/Volume module (Confirmation 1/2, Number 6 in the NNFX algorithm)
5. GKD-E - Exit module (Exit, Number 7 in the NNFX algorithm)
6. GKD-M - Metamorphosis module (Metamorphosis, Number 8 in the NNFX algorithm, but not part of the NNFX algorithm)
(additional module types will added in future releases)
Each module interacts with every module by passing data to A backtest module wherein the various components of the GKD system are combined to create a trading signal.
That is, the Baseline indicator passes its data to Volatility/Volume. The Volatility/Volume indicator passes its values to the Confirmation 1 indicator. The Confirmation 1 indicator passes its values to the Confirmation 2 indicator. The Confirmation 2 indicator passes its values to the Continuation indicator. The Continuation indicator passes its values to the Exit indicator, and finally, the Exit indicator passes its values to the Backtest strategy.
This chaining of indicators requires that each module conform to Loxx's GKD protocol, therefore allowing for the testing of every possible combination of technical indicators that make up the six components of the NNFX algorithm.
What does the application of the GKD trading system look like?
Example trading system:
Backtest: Multi-Ticker CC Backtest
Baseline: Hull Moving Average
Volatility/Volume: Hurst Exponent
Confirmation 1: Zero-lag TEMA Crosses as shown on the chart above
Confirmation 2: uf2018
Continuation: Coppock Curve
Exit: Rex Oscillator
Metamorphosis: Baseline Optimizer
Each GKD indicator is denoted with a module identifier of either: GKD-BT, GKD-B, GKD-C, GKD-V, GKD-M, or GKD-E. This allows traders to understand to which module each indicator belongs and where each indicator fits into the GKD system.
█ Giga Kaleidoscope Modularized Trading System Signals
Standard Entry
1. GKD-C Confirmation gives signal
2. Baseline agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
1-Candle Standard Entry
1a. GKD-C Confirmation gives signal
2a. Baseline agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Baseline Entry
1. GKD-B Baseline gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Volatility/Volume agrees
7. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
1-Candle Baseline Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSBC Bars Back' prior
Next Candle
1b. Price retraced
2b. Baseline agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Volatility/Volume Entry
1. GKD-V Volatility/Volume gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Confirmation 2 agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Volatility/Volume Entry
1a. GKD-V Volatility/Volume gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSVVC Bars Back' prior
Next Candle
1b. Price retraced
2b. Volatility/Volume agrees
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Baseline agrees
Confirmation 2 Entry
1. GKD-C Confirmation 2 gives signal
2. Confirmation 1 agrees
3. Price inside Goldie Locks Zone Minimum
4. Price inside Goldie Locks Zone Maximum
5. Volatility/Volume agrees
6. Baseline agrees
7. Confirmation 1 signal was less than 7 candles prior
1-Candle Confirmation 2 Entry
1a. GKD-C Confirmation 2 gives signal
2a. Confirmation 1 agrees
3a. Price inside Goldie Locks Zone Minimum
4a. Price inside Goldie Locks Zone Maximum
5a. Confirmation 1 signal was less than 'Maximum Allowable PSC2C Bars Back' prior
Next Candle
1b. Price retraced
2b. Confirmation 2 agrees
3b. Confirmation 1 agrees
4b. Volatility/Volume agrees
5b. Baseline agrees
PullBack Entry
1a. GKD-B Baseline gives signal
2a. Confirmation 1 agrees
3a. Price is beyond 1.0x Volatility of Baseline
Next Candle
1b. Price inside Goldie Locks Zone Minimum
2b. Price inside Goldie Locks Zone Maximum
3b. Confirmation 1 agrees
4b. Confirmation 2 agrees
5b. Volatility/Volume agrees
Continuation Entry
1. Standard Entry, 1-Candle Standard Entry, Baseline Entry, 1-Candle Baseline Entry, Volatility/Volume Entry, 1-Candle Volatility/Volume Entry, Confirmation 2 Entry, 1-Candle Confirmation 2 Entry, or Pullback entry triggered previously
2. Baseline hasn't crossed since entry signal trigger
4. Confirmation 1 agrees
5. Baseline agrees
6. Confirmation 2 agrees
Nonlinear Regression, Zero-lag Moving Average [Loxx]Nonlinear Regression and Zero-lag Moving Average
Technical indicators are widely used in financial markets to analyze price data and make informed trading decisions. This indicator presents an implementation of two popular indicators: Nonlinear Regression and Zero-lag Moving Average (ZLMA). Let's explore the functioning of these indicators and discuss their significance in technical analysis.
Nonlinear Regression
The Nonlinear Regression indicator aims to fit a nonlinear curve to a given set of data points. It calculates the best-fit curve by minimizing the sum of squared errors between the actual data points and the predicted values on the curve. The curve is determined by solving a system of equations derived from the data points.
We define a function "nonLinearRegression" that takes two parameters: "src" (the input data series) and "per" (the period over which the regression is calculated). It calculates the coefficients of the nonlinear curve using the least squares method and returns the predicted value for the current period. The nonlinear regression curve provides insights into the overall trend and potential reversals in the price data.
Zero-lag Moving Average (ZLMA)
Moving averages are widely used to smoothen price data and identify trend directions. However, traditional moving averages introduce a lag due to the inclusion of past data. The Zero-lag Moving Average (ZLMA) overcomes this lag by dynamically adjusting the weights of past values, resulting in a more responsive moving average.
We create a function named "zlma" that calculates the ZLMA. It takes two parameters: "src" (the input data series) and "per" (the period over which the ZLMA is calculated). The ZLMA is computed by first calculating a weighted moving average (LWMA) using a linearly decreasing weight scheme. The LWMA is then used to calculate the ZLMA by applying the same weight scheme again. The ZLMA provides a smoother representation of the price data while reducing lag.
Combining Nonlinear Regression and ZLMA
The ZLMA is applied to the input data series using the function "zlma(src, zlmaper)". The ZLMA values are then passed as input to the "nonLinearRegression" function, along with the specified period for nonlinear regression. The output of the nonlinear regression is stored in the variable "out".
To enhance the visual representation of the indicator, colors are assigned based on the relationship between the nonlinear regression value and a signal value (sig) calculated from the previous period's nonlinear regression value. If the current "out" value is greater than the previous "sig" value, the color is set to green; otherwise, it is set to red.
The indicator also includes optional features such as coloring the bars based on the indicator's values and displaying signals for potential long and short positions. The signals are generated based on the crossover and crossunder of the "out" and "sig" values.
Wrapping Up
This indicator combines two important concepts: Nonlinear Regression and Zero-lag Moving Average indicators, which are valuable tools for technical analysis in financial markets. These indicators help traders identify trends, potential reversals, and generate trading signals. By combining the nonlinear regression curve with the zero-lag moving average, this indicator provides a comprehensive view of the price dynamics. Traders can customize the indicator's settings and use it in conjunction with other analysis techniques to make well-informed trading decisions.
RedK DIY ZLMA: Customizable Zero-Lag MA (Educational / Utility)This script is more of an educational / utility piece rather than a fully-fledged indicator - It provides an easy way to customize and produce a zero-lag Moving average that can then be used in various scenarios
What is DIY_ZLMA?
------------------------
The DIY ZLMA is for fans and enthusiasts of researching Moving Averages (like me) - the script enables the user to play around with one of the common approaches used to reduce lag in moving averages - which was explained in this old post below
Suggested uses of the DIY_ZLMA
---------------------------------------
* The Zero-lag approach here applies 3 moving average passes to a source data series - I'll refer to these 3 passes as Base MA Pass , De-lagging Pass, and Smoothing Pass - these "passes" can be customized from the indicator settings in terms of MA Length and type. The first pass allows the choice of a "source", and the second pass allows additional fine tuning by playing around with the magnification factor. The 3rd pass (smoothing) is optional and can be skipped altogether when needed. (as noted in the script, HMA and TEMA, which are very common low-lag MA's use slightly different approach in the calculation than the one used here .. so we can't get an equivalent of either of these MA's with the customization of DIY_ZLMA parameters)
* After the user experiments with the various settings for the 3 passes, and finds a "preferred combination", the script not only plots the resulting My_ZLMA - it also produces the "1-line Pine script formula" that the user can then use in any other script, maybe to smoothen some data series, or to combine with other types of moving averages to create multi-MA cross-over trading signals... and so on.
* The DIY_ZLMA can also be added to another indicator as a signal line using the Indicator-on-Indicator feature of TradingView (review this post for step-by-step -->
)
* the script also showcases couple of recent (and very neat) Pine features: the use of User-defined Types (UDT) and User-defined Methods - which are awesome and a lot of fun to work with :)
Since this is more of a utility piece, I added as many comments as possible to the script to explain the way it works - so it's more valuable if someone finds it by searching the "Add Indicator" feature in TradingView charts
Please feel free to play around with this new toy :) and share comments and feedback below if you find this useful. I truly hope you do.
Zero-lag, 3-Pole Super Smoother [Loxx]Zero-lag, 3-Pole Super Smoother is an Ehlers 3-pole smoother with lag reduction
What is 3-pole Super Smoother?
A SuperSmoother filter is used anytime a moving average of any type would otherwise be used, with the result that the SuperSmoother filter output would have substantially less lag for an equivalent amount of smoothing produced by the moving average. For example, a five-bar SMA has a cutoff period of approximately 10 bars and has two bars of lag. A SuperSmoother filter with a cutoff period of 10 bars has a lag a half bar larger than the two-pole modified Butterworth filter. Therefore, such a SuperSmoother filter has a maximum lag of approximately 1.5 bars and even less lag into the attenuation band of the filter. The differential in lag between moving average and SuperSmoother filter outputs becomes even larger when the cutoff periods are larger.
Included:
-Color bars
-Loxx's Expanded Source Types
Zero Lag Detrended Price Oscillator (ZL DPO)This indicator attempts to create a zero lag Detrended price oscillator using 2 different scripts. I actually really like the results so far. I hope you all find it useful too.
Green>Red = long
Red>Green = short
The lines on the example chart are some of the signals that the indicator gave on default settings.
The greens are wins, reds are outright losses, and blues are "scratch" trades(signal for other side before hitting stop loss).
All of the signals tested were using NNFX money management to see if they are wins or losses(1.5x atr for SL and 1 Atr for TP).
Hybrid, Zero lag, Adaptive cycle MACD [Loxx]TASC's March 2008 edition Traders' Tips includes an article by John Ehlers titled "Measuring Cycle Periods," and describes the use of bandpass filters to estimate the length, in bars, of the currently dominant price cycle.
What are Dominant Cycles and Why should we use them?
Even the most casual chart reader will be able to spot times when the market is cycling and other times when longer-term trends are in play. Cycling markets are ideal for swing trading however attempting to “trade the swing” in a trending market can be a recipe for disaster. Similarly, applying trend trading techniques during a cycling market can equally wreak havoc in your account. Cycle or trend modes can readily be identified in hindsight. But it would be useful to have an objective scientific approach to guide you as to the current market mode.
There are a number of tools already available to differentiate between cycle and trend modes. For example, measuring the trend slope over the cycle period to the amplitude of the cyclic swing is one possibility.
We begin by thinking of cycle mode in terms of frequency or its inverse, periodicity. Since the markets are fractal; daily, weekly, and intraday charts are pretty much indistinguishable when time scales are removed. Thus it is useful to think of the cycle period in terms of its bar count. For example, a 20 bar cycle using daily data corresponds to a cycle period of approximately one month.
When viewed as a waveform, slow-varying price trends constitute the waveform's low frequency components and day-to-day fluctuations (noise) constitute the high frequency components. The objective in cycle mode is to filter out the unwanted components--both low frequency trends and the high frequency noise--and retain only the range of frequencies over the desired swing period. A filter for doing this is called a bandpass filter and the range of frequencies passed is the filter's bandwidth .
Indicator Features
-Zero lag or Regular MACD/signal calculation
- Fixed or Band-pass Dominant Cycle for MACD and Signal MA period inputs
-10 different moving average options for both MACD and Signal MA calculations
-Separate Band-pass Dominant Cycle calculations for both MACD and Signal MA calculations
- Slow-to-Fast Band-pass Dominant Cycle input to tweak the ratio of MACD MA input periods as they relate to each other
Supertrend Ext1st it exactly looks like the original Supertrend indicator. But if you see the options, you can see it is totally different:
It uses my other indicator inside: Zero Lag Keltner Channels, so you can use smoothed ATR bands for calculation instead of the raw ATR. By default it's length is 1 so it works like the original Supertrend.
You can choose different sources and moving averages for Keltner Channel calculation
It can filter outliers in ATR calculation
The indicator code is in my TAExt library, so it can easily be used in custom strategies.
Zero-Lag MTF PSAR MACD with Bollinger Bands v1.0 [loxx]Zero-Lag MTF PSAR MACD with Bollinger Bands v1.0
This is an experimental indicator that captures PSAR movements on seven different timeframes in order to improve trend detection on the daily timeframe. The seven PSARs are averaged and then fed into a zero-lag MACD function where the average of the PSARs is the source for the slow moving average and the daily timeframe close is the sourse of the fast moving average.
Things to know:
- Dark Green Background: All seven PSAR waves are above the closes of the PSARs respective timeframes; i.e., macro trend up
- Dark Red Background: All seven PSAR waves are below the closes of the PSARs respective timeframes; i.e., macro trend down
- Histogram and bar coloration is based on the difference between close and the average of all seven PSARs
- Various color schemes included
- Indicator has neither been backtested nor tuned with a strategy backtest
How to use:
Reversal Longs and Shorts
- Bollinger Bands show movement outside of normal deviation around the zero line. Wait for MACD to reach the either side top or bottom of Bollinger Bands for reversal long and reversal short respectively
- Check that MACD has crossed over or under the Signal line; i.e., denoted with a green dot for cross up and red dot for cross down
- Check dark background colors to see where the PSAR waves are currently situated and whether PSAR wave direction has aligned on all time frames
Longs and Shorts
- Longs: Check when MACD is above the zero line and the Signal line crosses over the zero line
- Shorts: Check when MACD is below the zero line and the Signal line crosses below the zero line
Strong Confluence:
- Longs/Shorts: Whenever the MACD crosses up or crosses down over/under the Signal/Zero line while inside a candle with background highlighting
- Reversals: Whenever the MACD crosses up or crosses down over/under the Signal/Zero line while inside a candle with background highlighting and at the very top/bottom or outside the top/bottom of the Bollinger Bands
Comment below or send a PM with questions, comments, observations, or concerns.
Ehlers Average Error Filter [CC]The Average Error Filter was created by John Ehlers and this is a variation of a Zero Lag Exponential Moving Average that uses a Super Smoother to filter out the noise and then uses a second Super Smoother of the difference between the current price and the filtered data. This works well as a trendline and does give out a few false signals like all indicators inevitably do but most signals do a good job of keeping up with the trend and providing clear entries and exits when the trend changes. I have included strong buy and sell signals in addition to normal ones so like always darker colors are strong signals and lighter colors are normal ones. Buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts you would like to see me publish!
Trendsurfer - A new type of moving average algorithmUsing a new type of lag reducing moving average algorithm, this indicator adapts it's sensitivity based on the strength of the trend and the volatility of the asset.
In doing so, signals can be given extremely fast during favorable market conditions. False signals can still appear, so visual confirmation/judgement is required before taking a trade.
The indicator:
Trend Bias Moving average . Thick green and orange line shows us trend bias.
- If the moving average is green, then the average price level is above the moving average = overall bullish conditions.
- As the moving average draws closer to price, or is straight, conditions are changing
- If the moving average is orange, then the average price level is below the moving average = overall bearish conditions.
Dual lag reduced instantaneous moving average.
This moving average is adaptive and fast, and will give buy and sell signals on crossover with price (EMA 6).
Buy and sell signals are shown visually using up and down arrow.
IMPORTANT: To filter out false signals, check other MA's like the 50 period hull moving average (dotted plot) for visual confirmation.
Furthermore, Significant support and resistance levels can be found on the right, shown as dotted horizontal lines. The importance of these levels is calculated based on the strength of the support/rejection, the volume, and the amount of times resistance and support was tested.
The location of the nearest moving averages below and above is also included as further potential support and resistance.
What to watch out for a good entry
- Watch for price to break out of the gray zone, and/or successfully retest it for a great entry.
Make your own decisions and never solely rely on a tool that should only be giving you an "indication".
Happy Trading,
MM
RedK Dual-Color Zero-Lag Moving Average (RedK ZLMA v1)Here's my Dual-color Zero-Lag Moving Average indicator - with alerts - as a separate study
This is published in response to couple of requests i received. Please refer to previous posts on TA Basics on creating zero-lag MAs for more background.
This version adds couple of extras
---------------------------------------------
- the ability to choose the price being used (close vs hl2, hlc3..etc)
- ability to change resolution
the example chart below on the right uses a weekly resolution for the ZLMA on top of a daily chart - the left chart shows the same view but with the ZLMA resolution set to "same as chart"
- Alerts-enabled for when trend change is detected
- optional smoothing - keep the smoothing low (3 or 4) else it introduces lagging again
i hope some will find this useful
- the code is light and can easily be integrated into other indicators of your own - or you can add this ZLMA to your charts in combination with other MA's you use to easily identify trends and swings.
let me know your feedback.
Good luck!
Enhanced Sigma by Cryptorhythms [CR]Enhanced Sigma by Cryptorhythms
Sigma is basically the deviation of returns compared to past returns. The higher / lower the value, shows you how deviated from the average this current bars returns are.
While perhaps not usable as a complete strategy for entering and exiting, its still quite useful and informative. It can give interesting signals as to potential turning points in price action. This behavior extends to all timeframes both long term and short term.
There are 2 overbought and oversold zones here inthe indicator. One is adaptive and will change to suit the shorter term giving your extra potential signals. The fixed line shows a general level for highly deviated values.
Expect a number of further totally unique and exclusive sigma based indicators from CR in the near future. We are nowhere near done extracting the alpha from this concept!
How to get access
This indicator is available for standalone purchase or as part of our subscription options. Please see my signature or profile for more information or contact me directly.
[FTA] Double Responsive Price FilterThis is a very special indicator which uses a series of double filtering methods to filter out bad price data.
Each filter uses a very complex mathematical formula to obtain the data, based on the Wave Function, then applies initial signal filtering on the output.
The output of each filter is then compared to each other, and the output of this stage goes through another signal filtering process which is used in aviation industry (NASA) to track objects and keep them under radar!
The final output is then squeezed through a truncated bandpass filter and plotted as two colors.
This is to ensure a very quick and responsive entry and exit signal without any lagging, and also to ensure that the trader stays in the trade as long as profitable!
Buy when color is aqua.
Sell when color is fuchsia.
[blackcat] L2 Ehlers Zero-lag EMACircumstance Remarks: Because of my carelessness, the script of the same name that I posted before was banned and hidden because the description contained content that violated the TradingView House Rule. After communicating with the MOD, I corrected the description and obtained permission to publish it again. I hereby declare. Sorry for the inconvenience!
Level: 2
Background
John F. Ehlers introuced Zero-lag EMA Indicator in Nov, 2010.
Function
In “Zero Lag (Well, Almost)” article, authors John Ehlers and Ric Way presented their zero-lag exponential moving average indicator and strategy. They have adapted their zero-lag EMA by extending the functionality in an additional chart indicator named “Zero-Lag EMA”. Labels were added so that the user can be alerted when a crossing of the averages occurs.
The authors created an error-correcting filter for an exponential moving average ( EMA ) that seeks to minimize the lag effect of increasing periods. Increasing the gain parameter from zero changes the filter from an EMA with lag to effectively zero lag (albeit with zero smoothing also). The crossover of these lines can be used to form a trading strategy, with the addition of some threshold value for the difference between the Price and error-correcting line.
Key Signal
ZLEMA ---> Zero-lag EMA fast line
Trigger ---> Zero-lag EMA slow line
Pros and Cons
100% John F. Ehlers definition translation, even variable names are the same. This help readers who would like to use pine to read his book.
Remarks
The 76th script for Blackcat1402 John F. Ehlers Week publication.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
[blackcat] L2 Ehlers Zero-lag SmootherLevel: 2
Background
John F. Ehlers introuced Zero-Lag Data Smoothers in Jul, 2002.
Function
John Ehlers introduced "Zero-Lag Data Smoothers", the infinite impulse response (IIR) filter and finite impulse response (FIR) filter.
In his article this issue on zero-lag smoothing, John Ehlers notes that his favorite filter is the symmetrically weighted six-bar finite impulse response (FIR) filter. This is also known as a triangular moving average, and can be conveniently implemented as a double-smoothed simple moving average. Per Ehlers, since this filter has six elements, its lag is 2.5 bars. Via further processing, this lag can be reduced to zero, but this produces too much overshoot. As a compromise, Ehlers suggests reducing the lag to one bar. To enable a user to adjust the lag easily, I provide the pine v4 code for an Adjustable Lag Filter indicator below. The first input, Price, should typically be set to OHLC, hl2, hl3, ohlc4 etc. The second input, LagReduction, should be set to a value in the zero-to-2.5 range. Setting it to zero will result in no adjustment, and the output will match that of the raw triangular average. Setting it to 2.5 will reduce the lag to zero. Setting it to 1.5 will reduce the lag to one bar.
Key Signal
Filter--> Zero-Lag Data Smoother fast line
Trigger--> Zero-Lag Data Smoother slow line
Pros and Cons
100% John F. Ehlers definition translation, even variable names are the same. This help readers who would like to use pine to read his book.
Remarks
The 67th script for Blackcat1402 John F. Ehlers Week publication.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
[blackcat] L3 Ehlers ZeroLag Intraday Trading SystemLevel: 3
Background
John F. Ehlers introuced ZeroLag Intraday Trading System in his "Rocket Science for Traders" chapter 16.
Function
blackcat L3 EhlersZeroLag Intraday Trading System is used to find proper long and short entries. Dr. Ehlers developed a completely automatic ZeroLag Intraday Trading System. The concepts of the Instantaneous Trendline and the ZeroLag EMA are very powerful. To demonstrate just how profound these concepts are, Dr. Ehlers designed an intraday trading system. An intraday trade is defined as any active trade that is traded and then closed at the end of the day.
Key Signal
Smooth --> 4 bar WMA w/ 1 bar lag
Detrender --> The amplitude response of a minimum-length HT can be improved by adjusting the filter coefficients by
trial and error. HT does not allow DC component at zero frequency for transformation. So, Detrender is used to remove DC component/ trend component.
Q1 --> Quadrature phase signal
I1 --> In-phase signal
Period --> Dominant Cycle in bars
SmoothPeriod --> Period with complex averaging
DCPeriod ---> Dominant Cycle Period
Trendline ---> IT fast line
ZeroLag ---> Zero Lag Filter
long ---> long entry signal
short ---> short entry signal
Pros and Cons
100% John F. Ehlers definition translation of original work, even variable names are the same. This help readers who would like to use pine to read his book. If you had read his works, then you will be quite familiar with my code style.
NOTE: This version of Trading System has better preformance than "Automatic SineTrend Trading System".
Remarks
The 12th script for Blackcat1402 John F. Ehlers Week publication.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Zalligator - Zero-Lag Alligator IndicatorI applied the zero-lag moving average theory to the Alligator Indicator. It seems like some different rules would would be required versus the traditional Alligator. Let me know what you think!
Vervoort SmoothingThis script has both the Triple Exponential Moving Average (TEMA) and zero lag sma written as functions. Both from Capturing Profit with Technical Analysis (24-25) by Sylvain Vervoort.
Best regards,
capam
TradeChartist Spotter ™TradeChartist Spotter is a extremely well designed Trader's toolkit that packs a range of trading indicators like MACD, RSI, MA/MA-Crosses and Price-Volume Trend Oscillator, along with visual trade spotting tools like Symbol Tracker, MACD Trend Shadow plot and Coloured Bars, including a handy information Dashboard.
===================================================================================================================
™TradeChartist Spotter Features:
1. MACD
MACD is an essential indicator for any trader to track trend strength and momentum of asset prices. Spotter offers 3 MACD options - SMA, EMA and Zero-Lag EMA . Since MACD is based on moving averages, it is inherently a lagging indicator and may not work well when there is no trend strength or when the market is choppy. It is for this reason Spotter offers the option of Overall Trend Shadow and also the option to display Zero-Lag Trend Shadow on normal MACD based on SMA or EMA. This is based on the average of MACD and Signal plots.
Spotter's default MACD settings are 13/34/13, but this can be changed to the classic settings of 12/26/9 and the user can enable or disable the various elements of the MACD based on their preference.
The Dashboard on the MACD Spotter offers information on the symbol tracked, settings used and also the close price of the asset. This is really useful especially when tracking a different symbol than the current price chart symbol. Note that the actual MACD plot also will be of the symbol tracked if it is not the same as price chart symbol.
Using Zero-Lag Trend Shadow on normal SMA/EMA MACD histogram helps spot trend changes early. It is recommended to test different MACD settings on asset traded to suit trading style and frequency.
If MACD Histogram is disabled to see the Overall Trend better, make sure to switch back on as it should not be confused with the main MACD histogram which tracks the distance between the MACD and Signal plots.
2. RSI
RSI is the classic technical indicator that helps track the price magnitude and velocity of the asset's price movement. It helps spot Oversold and Overbought areas easily as it oscillates between 0 and 100, even though values below 10 and values above 90 are almost never seen. By using a upper band and a lower band plot, it is possible to track the strength of the up or down move.
Spotter's default RSI settings are ohlc4/14/5. EMA smoothing of 5 is used to eliminate the noise, but these can be changed to suit user's preference. The default Upper Band is 60 and Lower Band is 40 in the settings, as price moves above 60 RSI tend to be bullish and price moves below 40 tend to be bearish. This can be changed to 70/30 or 80/20 etc. based on how RSI is being used by the user.
RSI strength can also be visualised on the price bars using Spotter's Coloured Bars. The bar colours can be inverted to help traders see the price action differently.
RSI Dashboard also helps track another symbol, it's RSI value and close price to help the user track another symbol on the same chart. Note that the actual RSI plot also will be of the symbol tracked if it is not the same as price chart symbol.
3. MA/MA-Crosses
Two Moving averages (SMA, EMA or Zero-Lag EMA) can be plotted with MA Crosses using the MA/MA-Crosses Spotter.
The MACD input of Fast MA Length and Slow MA Length is used to plot the MA's. To plot just one MA, same value can be entered in both MA length boxes in the settings.
The plots can be merged with the main price chart by using Move Pane Above and by merging the scales into one.
The Dashboard also helps track another symbol, it's MA plots and close price to help the user track another symbol on the same chart. Note that the actual MA plots also will be of the symbol tracked if it is not the same as price chart symbol.
4. Price-Volume Trend Oscillator
Spotter converts the Price Volume Trend (PVT) into an Oscillator, as it helps spot divergences and makes it easy to plot PVT strength as coloured bars on main price chart.
No user input required for this Oscillator plot. Note: Some Symbols don't have volume information and hence PVT Oscillator will not work on them.
PVT Oscillator Dashboard displays current bar volume (if available) along with the close price. Similar to other plots in the Spotter, the Oscillator is of the symbol tracked if its not the same as price chart symbol.
5. Useful Extras
Coloured Bars - Paints price bars with strength and intensity based on indicator used. Bar Colours can be inverted by enabling Invert Bar Colors option from Spotter settings.
Five Colour Themes - Classic, Acute Classic, Effulgence, Firefly and Hallucination
Background colour - Same as bar colour strength, but painted subtly in the indicator background.
===================================================================================================================
Note:
Alerts can be created using the name of the plot under Alert Condition for Spotter - ™TradeChartist crossing above/below etc based on the type of alert the user wants to get.
The indicator does not repaint. Alerts may display potential repaint warning, but this is because the code uses bar index for the Dashboard. For confidence in the indicator, it can be tested using bar replay to make sure the real-time and bar replay trade entries and plots stay on the same bar/timestamp.
™TradeChartist Spotter can be connected to ™TradeChartist Plug and Trade (Premium Script - not free) to generate Trade Entries, Targets, Sop Loss plots etc and to create all types of alerts. Example chart below using LINK-USDT.
===================================================================================================================
Example Charts
1. BTC-USDT 1 hr chart showing MACD with classic settings 12/26/9 on top pane with normal Overall Trend Shadow and the bottom pane with exact same settings with Zero-Lag Overall Trend Shadow.
2. XAU-USD 4 hr chart showing MACD (13/55/34) using Zero-Lag EMA.
3.ADA-USDT 1 hr chart with Price-Volume Trend Oscillator - Useful for confirming divergences and trade decisions based on volume.
4. SPX 15m chart with RSI (ohlc4,14,5) in bottom pane and 5/34 MA cross Spotter on Price Chart with Dashboard.
5. GBP-USD 1 hr chart with Spotter tracking MACD (13/89/34) of DXY (Different Symbol from GBP-USD on chart)
===================================================================================================================
Best Practice: Test with different settings first using Paper Trades before trading with real money
This is a free to use indicator.
===================================================================================================================
Patreon Moving AverageThe Patreon moving average (PMA) is an adaptive moving average specifically designed to provide an optimal fit with the price while having a minimum amount of lag. The PMA can act as a fast-moving average for moving averages crossover system, detect trends, and filter out noisy variations from the price. The PMA is simple to use and interpret, and can be a really nice addition to your strategies, especially if they are based on moving averages.
The PMA integrates alerts based on the trend direction detected by the PMA.
Settings
Length: Determine the degree of filtering of the PMA.
Factor: Determine the sensitivity of the PMA to price variations, with higher values making the PMA less sensitive to price variations.
Decay: When higher than 0, introduce progressive smoothing, values closer to 0 return a faster progressive smoothing.
Src: Source input of the indicator.
Detect Trends With The PMA
The color of the PMA is related to the detected trend, with a blue color associated with an up-trend and a red color associated with a down-trend.
Higher values of Factor allows us to spot longer-term trends as well as filtering retracement in a trend.
Lower values of Length can also be used with higher values of Factor , this combination allows the PMA to actually be way less sensitive to price variations, thus returning less false signals while keeping a good fit with the price.
PMA As A Fast Moving Average
The PMA tries to provide crosses with a slow-moving average at the exact moment price cross the slow MA while minimizing the number of false signals.
PMA (In blue), EMA (in green), and SMA as a slow-moving average (in red), the PMA provide faster crosses while returning less false signals.
Progressive Smoothing
Progressive smoothing is obtained by using the Decay setting and allows the PMA to fit the price during extremely volatile markets and allows to preserve the structure of higher high's and lower low's.
Progressive smoothing can also minimize false signals.
In green/orange the PMA without progressive smoothing, in blue/red the PMA with progressive smoothing.
Finally progressive smoothing can give predictive and accurate estimates of the price central tendency
In green the mean of the price with a window size equal to the period the PMA is red, we can see that the PMA converges toward it extremely fast.
How To Access
The indicator is one of the "Patreon trend following indicators", and can only be used by my Patreons, you can become a Patreon by using the link on my signature.
Forward Backward EMA [Repaint]Perform forward-backward filtering using exponential averaging, thus providing a zero-phase exponential moving average. The output repaint and cannot be used as input for other indicators.
Settings
Length : moving average period
Src : data input of the moving average
Plot Color : the color of the displayed plot
Line Width : width of the plotted line
Usages
The main usage of moving averages is to provide an estimate of the underlying trend in the price by removing higher term variations from it. Non-causal (repainting) indicators are limited to offline applications, as such, they are most useful for summary analyses, note that it is still possible to infer from the output of repainting indicators, however since past outputs are subject to changes, it is extremely difficult to track the effectiveness of such indicators, and in online applications they only track the price, making them equally useful for predictive applications than following the direction of an individual candle.
Non-causal filters can be useful in order to have a better view of symbols with a relatively uninformative evolution.
Details
Causal filters have lag, this is the cost of using past observations as inputs, the more past observations you use, the more lag you will obtain (assuming these past observations have non-zero weights). There are various solutions to reduce the lag of a moving average, the most simple one relying on giving higher weights to more recent observations, another one relies on introducing gain in the filter passband, that is amplifying certain variations in the input signal while attenuating/removing higher term ones, finally, we can use adaptive moving averages to avoid excessive lag.
All these previous solutions can be used causally, but they are far from being perfect, as the lag reduction is often done at the cost of smoothness, if we were to keep the original smoothness of the filter while having no lag we would need to use non-causal solutions. The most common solution is to directly use future values as inputs, such moving averages are called "two-sided" moving averages since they use past values as input (left side) as well as future input values (right side), this is equivalent to shifting the results of a moving average backward.
The advantages of two-sided moving averages is that they conserve the original amplitude response of the moving average, however, it won't be possible to compute the most recent values of the moving average (since we won't have access to future values at a certain point), an alternative method heavily used in digital signal processing is forward-backward filtering.
The method consists of applying a filter forward in time, then we apply it once again backward. In order for you to have an easier understanding of this process think about applying a moving average normally starting at time t = 0 , then apply that moving average once again using the previous results as input but start from t = N-1 , that is from the most recent point, and proceed backward, plotting the result from left to right until you get back to t = 0 .
From this, it follows that forward-backward filtering applies a filter twice, the resulting filter is thus a two-passes filter, this results in an even smoother output (more precisely the filter amplitude response is squared).
Forward-backward filtering can be done in Pinescript by using the function "line.new" inside a loop, an exponential moving average is applied forward first, then once again backward inside the loop, "line.new" is used to plot the results backward.
Notes
It is important to note that forward-backward filtering is a repainting process, all the results of the indicator you see on the chart are subject to change over time. Since the method make use of line.new you will have around only 54 visible observations, with the impossibility of using them as input for other indicators. If you see indicators in the future with the same characteristics be aware that they will repaint.
Never purchase/rent filters that appear as having no lag, they are either repainting or the results are coming from a lucky shot or from an overfitted model, it is impossible to make both zero-lag and causal moving averages with pinescript, if you have doubt don't test your luck, better safe than sorry.