TanHef

Leading Indicator [TH]

TanHef Uppdaterad   
The leading indicator is helpful to identify early entries and exits (especially near support and resistance).

Green = trend up
Red = trend down

How it works:
The leading indicator calculates the difference between price and an exponential moving average.
Adding the difference creates a negative lag relative to the original function.
Negative lag is what makes this a leading indicator.
The amount of lead is exactly equal to the amount of lag of the moving average.
The leading indicator has lagging signals at turning points.
The leading indicator will always have noise gain, which gets eliminated by applying a moving average.

Modifying the alpha values will modify the amount of noise and change the sensitivity of trend change.
Example 1: Changing alpha1 from 0.25 to 0.15 lowers noise, more clearly identifies trend, and adds delay to this indicator.
Example 2: Changing alpha1 from 0.25 to 0.35 increases noise, less clearly identifies trend, BUT more quickly indicates a trend change.

Calculations:

Where:
alpha1 = 0.25
alpha2 = 0.33

Leading = 2 * (arithmetical mean of current High and Low price) + (alpha1 - 2) * (arithmetical mean of previous High and Low price) + (1 - alpha1) * (previous 'Leading' value)
Total Leading = alpha2 * leading + (1 - alpha2) * (previous 'Total Leading' value)
EMA = 0.5 * (arithmetical mean of previous High and Low price) + 0.5 * (previous 'EMA' value)

Uptrend when 'Total Leading' value is greator than the EMA
Downtrend when 'Total Leading' value is lesser than the EMA

Cybernetic Analysis for Stocks and Futures, by John Ehlers (page 231-235)
Versionsinformation:
Added alerts for when trend changes up or down.

How to add alerts:
1. Add the indicator to the chart then, then go into its settings
2. Check off Alerts to enable
3. Create Alert
4. Set condition to "Leading"
5. Select create

www.tanhef.com/

Scripts and content from TanHef are solely for information and education. Past performance does not guarantee of future results.
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?