Leading T3Hello Fellas,
Here, I applied a special technique of John F. Ehlers to make lagging indicators leading. The T3 itself is usually not realling the classic lagging indicator, so it is not really needed, but I still publish this indicator to demonstrate this technique of Ehlers applied on a simple indicator.
The indicator does not repaint.
In the following picture you can see a comparison of normal T3 (purple) compared to a 2-bar "leading" T3 (gradient):
The range of the gradient is:
Bottom Value: the lowest slope of the last 100 bars -> green
Top Value: the highest slope of the last 100 bars -> purple
Ehlers Special Technique
John Ehlers did develop methods to make lagging indicators leading or predictive. One of these methods is the Predictive Moving Average, which he introduced in his book “Rocket Science for Traders”. The concept is to take a difference of a lagging line from the original function to produce a leading function.
The idea is to extend this concept to moving averages. If you take a 7-bar Weighted Moving Average (WMA) of prices, that average lags the prices by 2 bars. If you take a 7-bar WMA of the first average, this second average is delayed another 2 bars. If you take the difference between the two averages and add that difference to the first average, the result should be a smoothed line of the original price function with no lag.
T3
To compute the T3 moving average, it involves a triple smoothing process using exponential moving averages. Here's how it works:
Calculate the first exponential moving average (EMA1) of the price data over a specific period 'n.'
Calculate the second exponential moving average (EMA2) of EMA1 using the same period 'n.'
Calculate the third exponential moving average (EMA3) of EMA2 using the same period 'n.'
The formula for the T3 moving average is as follows:
T3 = 3 * (EMA1) - 3 * (EMA2) + (EMA3)
By applying this triple smoothing process, the T3 moving average is intended to offer reduced noise and improved responsiveness to price trends. It achieves this by incorporating multiple time frames of the exponential moving averages, resulting in a more accurate representation of the underlying price action.
Thanks for checking this out and give a boost, if you enjoyed the content.
Best regards,
simwai
---
Credits to @loxx
Leadingindicators
MacroTrend VisionThe "MacroTrend Vision" indicator is crafted with a singular goal – to provide traders with a quick and insightful snapshot of a country's global index. Seamlessly combining macroeconomic and technical perspectives, this tool is designed for those seeking a straightforward yet comprehensive overview. Let's explore the key features that make the "MacroTrend Vision" a valuable asset for traders looking to grasp both the big-picture economic context and technical nuances.
1. Long-Term Vision with Weekly Periods:
Gain a genuine long-term perspective with the ability to process 2500 weekly periods. This feature ensures a holistic understanding of global indices from both macroeconomic and technical viewpoints.
2. Composite Leading Indicator (CLI) Conditions:
Integrate both macroeconomic trends and technical signals through Composite Leading Indicator (CLI) conditions derived from the Relative Strength Index (RSI), offering a comprehensive outlook for informed decision-making.
3. Deviation Bands for Volatility Analysis:
Refine market analysis with strategically integrated deviation bands (0.2 and 0.4) based on smoothed linear regression. Anticipate volatility and potential trend shifts, aligning macro and technical insights.
4. Logarithmic Scale Transformation:
Enhance precision in understanding price movements with a logarithmic scale transformation, especially beneficial for assets with exponential growth patterns.
5. Separated Window for Easy Navigation:
Streamline your analysis with a user-friendly design – a separated window allowing easy navigation through different symbols without altering indicator settings.
6. Alert System for CLI Conditions:
Stay informed about critical shifts with an alert system for both long and close conditions based on the RSI of the CLI. Even during periods of limited chart monitoring, this feature keeps you connected to macroeconomic and technical changes.
In essence, the "MacroTrend Vision" is your go-to tool for a balanced view, simplifying the complexities of global indices with a blend of macroeconomic insights and technical clarity.
Leading Economic Indicator (LEI)The Leading Economic Indicator (LEI) is a groundbreaking technical indicator designed to serve as a comprehensive measure of the prevailing direction of economic trends in the United States. This unique index combines two key economic indicators: the Composite Leading Indicator (CLI) from the Organization for Economic Co-operation and Development (OECD) and the Purchasing Managers' Index (PMI) from the Institute for Supply Management (ISM).
The OECD Composite Leading Indicator (CLI) is a globally recognized indicator that assesses the future direction of economic trends by analyzing various leading economic factors. The ISM PMI, on the other hand, provides insights into the business activities of both the manufacturing and services sectors. LEI merges these critical indicators into a single, holistic indicator that empowers traders and investors to grasp the broader economic outlook and the performance of essential economic sectors simultaneously.
By taking into account the CLI and PMI, LEI offers a distinctive perspective, enabling a more accurate assessment of the potential direction of US financial markets.
Usage:
To utilize LEI effectively, it is recommended to apply it on a monthly timeframe (TF Monthly). This extended timeframe is particularly beneficial for investors with a medium to long-term horizon. By focusing on longer-term trends and market stability, LEI becomes an invaluable tool in your investment strategy.
One of the primary applications of LEI is to gauge the risk of market corrections in US financial markets, including the S&P 500, Nasdaq, and Dow Jones indices. Analysts often observe the crossing of the 5-period Simple Moving Average (SMA) with the 10-period SMA. When the 5-period SMA falls below the 10-period SMA, it serves as a potential warning signal for an impending market correction. This feature provides traders with an opportunity to exercise caution and make well-informed investment decisions.
LEI, with its unique blend of the OECD CLI and ISM PMI, provides a reliable tool for assessing the US economic climate, identifying trends, and making informed decisions in the financial markets. It stands as a reference indicator, capturing the essence of economic trends and providing valuable insights to traders and investors.
Sources:
- OECD Composite Leading Indicator (CLI): www.data.oecd.org
- Purchasing Managers' Index: ISM Report on Business (PMI) www.ismworld.org
Purchasing Managers Index (PMI)The Purchasing Managers Index (PMI) is a widely recognized economic indicator that provides crucial insights into the health and performance of an economy's manufacturing and services sectors. This index is a vital tool for anticipating economic developments and trends, offering an early warning system for changes in these sectors.
The PMI is calculated based on surveys conducted among purchasing managers in various businesses and organizations. These managers are asked about their perceptions of current business conditions and their expectations for future economic activity within their sectors. The responses are then compiled and used to calculate the PMI value.
A PMI value above 50 typically indicates that the manufacturing or services sector is expanding, suggesting a positive economic outlook. Conversely, a PMI value below 50 suggests contraction, which may be an early indication of economic challenges or a potential recession.
In summary, the Purchasing Managers Index (PMI) is an essential economic indicator that assesses the health of manufacturing and services sectors by surveying purchasing managers' opinions. It serves as an early warning system for changes in economic activity and is a valuable tool for forecasting economic trends and potential crises.
This code combines the Purchasing Managers Index (PMI) data with two Simple Moving Averages (SMA) and some visual elements.
Let's break down how this indicator works:
1. Loading PMI Data:
The indicator loads data for the "USBCOI" symbol, which represents the PMI data. It fetches the monthly closing prices of this symbol.
2. Calculating Moving Averages:
Two Simple Moving Averages (SMAs) are calculated based on the PMI data. The first SMA, sma_usbcoi, has a length defined by the input parameter (default: 2). The second SMA, sma2_usbcoi, has a different length defined by the second input parameter (default: 14).
3. Color Coding and Thresholds:
The line color of the PMI plot is determined based on the value of the PMI. If the PMI is above 52, the color is teal; if it's below 48, the color is red; otherwise, it's gray. These threshold values are often used to identify specific conditions in the PMI data.
4. Crossing Indicator:
A key feature of this indicator is to determine if the PMI crosses the first SMA (sma_usbcoi) from top to bottom while also being above the value of 52. This is indicated by the crossedUp variable. This condition suggests a specific situation where the PMI crosses a short-term moving average while indicating strength (above 52).
5. Visual Elements:
A "💀" skull emoji is defined as skullEmoji.
The PMI is plotted on the chart with color coding based on its value, as described earlier.
The two SMAs are also plotted on the chart.
When the crossedUp condition is met (PMI crosses the first SMA from top to bottom while above 52), a skull emoji (indicating potential danger) is plotted at the top of the indicator window.
US Composite Leading Indicator (CLI)The US Composite Leading Indicator (CLI), normalized for the United States, closely mirrors the Conference Board "Leading Economic Index" (LEI). It offers unique insights into economic and financial dynamics.
The Composite Leading Indicator (CLI) is an economic tool designed to anticipate economic developments. It is created by aggregating and normalizing a wide range of economic and financial data from various sources.
The normalized data is then aggregated, and a composite indicator is calculated by taking a weighted average of individual indicators.
The CLI is used to provide early insights into the state of the economy and to anticipate future economic trends. It is particularly valuable for predicting economic downturns, including recessions.
The CLI is an essential tool for economists, governments, businesses, and investors seeking to understand economic trends and make informed decisions.
Key Features:
1. Early Warning: Just like its counterpart, the CLI indicator excels at offering early warnings about significant economic events, particularly economic crises. This makes it an indispensable asset for analysts and investors.
2. Recession Indicators: The moving average serves as an early warning system for potential economic recessions. When it crosses the indicator line from the bottom to the top while surpassing a predefined threshold (e.g., 101), it signals a potential crisis.
3. Market Impact: The CLI indicator provides valuable insights into the performance of financial markets, offering cues about indices such as the S&P 500, Nasdaq, Dow Jones, and more.
Why It Matters:
Understanding the US Composite Leading Indicator (CLI) indicator, normalized for the United States, is crucial for anticipating economic shifts and preparing for changes in financial markets. By analyzing a diverse array of economic factors, it provides a holistic view of economic well-being. Whether you're an investor or economist, this indicator can be an invaluable resource for staying informed about market trends and major economic developments.
Source:
www.data.oecd.org
Munich GuppyWELCOME to the Munich Guppy!
This is a simple moving average indicator that will help you determine the trend of your chart using historical moving averages.
The indicator consists of 3 EMA's and one ALMA moving average. Using these 4 moving averages I have programmed the relationship between the moving averages to color the background of your chart.
If your background is red, this means that the alma moving average has fallen below the EMA's (EMA1 and EMA 2) as well as (EMA 1 and EMA 2) are postured in a down trending/up trending fashion
For example, the 21EMA is greater than the 55EMA, this signals that the chart has been outperforming its intermediate averages. Now if the ALMA is below both the 21ema and 55ema, in this instance, your chart background will become green.
The ALMA has color options '+CoC' and '-Coc', this simply means if the candle closes below the alma, it will turn red, if closure above it will turn green.
EMA 3 which is default set to 200, has no affect on the color of the background.
Now I hope I have thoroughly explained the simplicity of this indicator, if you have any questions leave them below or private message me for any other requests,
Good Trading!
-CheatCode1
On Balance Volume DeviationThe objective of this indicator is to be a leading indicator that can detect a large price change before it happens. It is based on the On Balance Volume (OBV) indicator, which is a leading indicator based on the premise that a large change in volume often precedes a large price change. This indicator charts the N-Period deviation of the OBV data and displays it as a histogram. This is overlayed on an area chart of the M-Period SMA of the histogram data. This combination helps to visually enhance the pattern that signifies that a jump in price is about to happen.
Useage:
When the histogram bars are above the area plot, then a jump in price is about to happen
As with all leading indicators, there are a lot of false signals. Confirm with price action or another indicator
The further the histogram bars are above the area plot, the larger the predicted jump in price
It seems to work better on shorter intraday timeframes than on the longer timeframes
At the close of a market session, it is a good indicator of how much the price will jump on the opening of the next market session.
Detrended Ehlers Leading Indicator [CC]The Detrended Ehlers Leading Indicator was created by Bill Mars based off of Ehlers work and this is his attempt to create a leading indicator based on the previous Detrended Synthetic Price . I will be honest that this is a bit of a strange script because it is an indicator based off of the detrended synthetic price which is based off of Ehlers work so I haven't found clear buy and sell signals so I'm open to suggestions. His suggestion for buy and sell signals is to only buy and sell at the indicator crossings but haven't found buy and sell logic that I'm sure about. I have included strong buy and sell signals in addition to normal ones so strong signals are darker in color and normal signals are lighter in color. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators or scripts you would like to see me publish!
Who's Leading?Indicator plots percent change of close price for current symbol and a comparative symbol.
You can also plot SMA instead of closing price to add smoothness to the trend.
Objective: Analyze if the stock leads the index or is lead by the index.
Hope this is helpful
Best,
Swan
AM_ZLWMA Crossover_xDear All,
Please find updated version of Zero lag WMA crossover. In addition to this added 20/50 EMA to get better results.
Settings:
ZLWMA = 8 identified by Blue line
Fast WMA = 21 identified by Red line
EMA Period 20/50
How to Trade:
Buy: Wait for positive crossover (Blue cross above Red) to happen trade can be taken there but to get better results post crossover once price move above EMA 20 then buy can be initiated.
Sell: Wait for negative crossover (Blue cross below Red) to happen trade can be taken there but to get better results post crossover once price move below EMA 20 then sell can be initiated.
Reason to wait for confirmation of price action above / Below moving average is most of the time it happens that even after crossover happens sometimes it was just a pull back and from there it could be a possibility for reversal. Once price action confirms moving above / below EMA20 then trade will be initiated.
Please comment and ask for any doubt
[blackcat] L2 Ehlers Leading IndicatorLevel: 2
Background
John F. Ehlers introuced Leading Indicator in his "Cybernetic Analysis for Stocks and Futures" chapter 16 on 2004.
Function
The leading characteristic is present in the net filte.As predicted, the lead is one bar at very low frequencies. That is, the trend indication will lead by one bar. However, the net filter has a lag of approximately 2.5 bars for cycle components near 20-bar cycles. Also, higher-frequency lag settles down to be about half a bar. The interpretation of the lag response is that the filter predicts a continuation of a trend by 1 bar, lags abrupt changes by about 0.5 bars, and lags smooth changes that can be fitted by segments of a 20-bar sinewave by as much as 2.5 bars. That’s the law of physics—you cannot get something for nothing. Causal filters can have a predictive capability over some portion of the frequency response, but not at all frequencies. There is no magic predictor.
Key Signal
NetLead ---> Leading Indicator fast line
EMA ---> Leading Indicator slow line
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.
Remarks
The 35th 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.
MACD-ASHello All,
This the script for Moving Average Convergence Divergence – MACD of Thomas Aspray, and called as MACD-AS and you may get earlier signals than MACD.
As MACD and MACD-AS are trend following indicators, they do not function well in sideway markets.
An example how it gets earlier signals than MACD
Good luck!
Ehlers Predictive Moving Average [CC]The Predictive Moving Average was created by John Ehlers (Rocket Science For Traders pg 212) and this is one of his first leading indicators. I have been asked by many people for more leading indicators so this one is for you all! Buy when the indicator line is green and sell when it is red.
Let me know if there are other indicators you would like to see me publish or if you want something custom done!
Ehlers Leading Indicator [CC]The Leading Indicator was created by John Ehlers (Cybernetic Analysis For Stocks And Futures pg 235) and as the name implies, this is a leading indicator that provides super early signals. Feel free to change the alpha values to adjust to your needs. Buy when the indicator line is green and sell when it is red.
Let me know if there are other scripts you would like to see me publish or if you want something custom done!
Ehlers Hilbert Oscillator [CC]The Hilbert Oscillator was created by John Ehlers (Rocket Science For Traders pgs 90-91) and just like the sinewave indicator that I published yesterday, this is also a leading indicator. The big difference between this indicator and the sinewave is that this indicator works very well for determining major turning points in the stock before they happen. You will notice that when the blue line crosses over the red line that a few bars from that point, the stock will start an uptrend and the reverse is true. I have also included immediate buy and sell signals over the 0 line so buy when the line is green and sell when it is red
Let me know if you would like to see any other scripts from me or if you want something custom done!
Ehlers Sinewave Indicator [CC]The Sinewave Indicator was created by John Ehlers (Rocket Science For Traders pgs 97-99) and this is a few indicators in one. Simply put it is a leading indicator which you don't see too many of those these days. If the blue line crosses over the red line then within the next few bars the price will start an uptrend and if the blue line crosses below the red line then in the next few bars it will start a downtrend. I have also included an immediate buy and sell signal on the 0 line which is green when you should buy and red when you should sell.
Let me know if you would like to see any other scripts or if you want something custom done!
Kairi Relative Index Leading IndicatorHere is a leading indicator based on the relatively obscure Kairi Relative Index. The Kairi comes from Japan and is similar to the popular RSI, although it is believed that it predates the RSI significantly.
The Kairi measures the difference between the current price and its SMA as a percentage of the moving average.
We made a few modifications to the Kairi to improve its timing and balance its sensitivity. First, we calculated a 'fast' and 'slow' Kairi Relative Index. To do this, it calculates the difference between the current price and a SMA with a length of 7 periods for the fast Kairi. Then, the difference between the current price and an SMA of length 24 is calculated for the slow Kairi.
The big modification is using a 25 period SMA of slow Kairi Relative Index values as the threshold for buy and sell signals. When the fast Kairi line crosses above the white line(the threshold) it is considered a bullish signal, while a bearish signal comes when it crosses back below the same white line. This solved the issue with the Kairi having slower reaction time than the RSI. As the chart shows, this setup allowed it to catch not only major trends but also predict unexpected price spikes.
Users can adjust all 3 lengths, as well as adjust the option to have the slow Kairi displayed on the chart(shown in second pane).
OBV Z-ScoresThis study calculates the On-Balance Volume (OBV) and displays it in terms of its Z-Score.
OBV is a great momentum indicator . As the name suggests, OBV predicts changes in price based on the security's volume flow.
Formula:
if (Current Price > Previous Price)
then Current OBV = Previous OBV + Current Volume
if (Current Price < Previous Price)
then Current OBV = Previous OBV - Current Volume
if (Current Price == Previous Price)
then Current OBV = Previous OBV
As the formula shows, the OBV goes a step beyond just looking at the pure volume of a security. Instead, it factors in relative price action from period to period to reflect investor sentiment. As a result, we often look to the OBV to spot bullish or bearish trends while they are in the early stages of development or simply predict impending uptrends or downtrends.
To make the OBV easier to visualize, we converted the value to a Z-Score. The Z-Score is a simple statistical measurement and represents the current OBV value's distance from the mean OBV value in terms of # of standard deviations.
Users can adjust the values for the 2 upper bounds for Z Scores and 2 lower bounds. Additionally, the n value for z score calculation can be adjusted in the input menu. A higher n value means the z score will be based on a longer lookback period. A lower value will result in more sensitive readings.
Overall, I think this is an interesting way to represent OBV values and will be a valuable leading indicator.
~Happy Trading~
Ehlers Leading IndicatorEhlers Leading Indicator script.
This indicator was originally developed by John F. Ehlers (see his book `Cybernetic Analysis for Stocks and Futures`, Chapter 16: `Leading Indicators`).