LazyBear

Indicator: Elder Impulse System

According to Elder, "The Impulse System encourages you to enter a trade cautiously but exit fast, by identifying inflection points where a trend speeds up or slows down. This is the professional approach to trading, the total opposite of the amateur's style. Beginners jump into trades without thinking too much and take forever to get out, hoping and waiting for the market to turn their way."

The Impulse System is based on two indicators, a 13-day exponential moving average and the MACD-Histogram. The moving average identifies the trend, while the MACD-Histogram measures momentum. As a result, the Impulse System combines trend following and momentum to identify impulses that can be traded.

By default it uses your chart's time frame, but you can set it to any custom time frame via options page. Optionally, price bars can be color coded too.

More info:
http://stockcharts.com/school/doku.php?id=chart_school:chart_analysis:elder_impulse_system

Steps to import / use custom indicators from this chart:
PDF: https://drive.google.com/file/d/0Bx48Du_2aPFncUhIemNrZUY1dTA/edit?usp=sharing
Remove from Favorite Scripts Add to Favorite Scripts
//
// @author LazyBear
//
// If you use this code in its original/modified form, do drop me a note. 
//
study("Elder Impulse System [LazyBear]", shorttitle="EIS_LB")
useCustomResolution=input(false, type=bool)
customResolution=input("D", type=resolution)
source = security(tickerid, useCustomResolution ? customResolution : period, close)
showColorBars=input(false, type=bool)
lengthEMA = input(13)
fastLength = input(12, minval=1), slowLength=input(26,minval=1)
signalLength=input(9,minval=1)

calc_hist(source, fastLength, slowLength) =>
    fastMA = ema(source, fastLength)
    slowMA = ema(source, slowLength)
    macd = fastMA - slowMA
    signal = sma(macd, signalLength)
    macd - signal

get_color(emaSeries, macdHist) =>
    g_f = (emaSeries > emaSeries[1]) and (macdHist > macdHist[1])
    r_f = (emaSeries < emaSeries[1]) and (macdHist < macdHist[1])
    g_f ? green : r_f ? red : blue
    
b_color = get_color(ema(source, lengthEMA), calc_hist(source, fastLength, slowLength))    
bgcolor(b_color, transp=0)
barcolor(showColorBars ? b_color : na)
Awesome as always. Love the indicators you and others in this awesome community provide..
Reply
Thanks.
+1 Reply
Thanks LB :)
Reply
yw :)
+1 Reply
Thank you
Reply
LazyBear PRO cryptomojo
yw
+1 Reply
Absolute fantastic addition- very much appreciate it your work- Thank you
Reply
LazyBear PRO sublimares2
Thank you sir.
+1 Reply
simply greatttttttttttttt
Reply
Thanks Sunil.
+1 Reply
Thank you. This is great
Reply
Awsome. Than you very much.
Reply
I am relatively new to trading and very new to TradingView. I am also a big fan of Dr Elder's books. So I am very pleased to have someone on TradingView take the time to make this relatively simple indicator available to us. Thanks again.
Reply
Elders Pulse has shown some great results.
Reply
LazyBear PRO QuantitativeExhaustion
agree.
Reply
Many, many thanks for programming this indicator. It can be a very powerful tool. Once again, many thanks.
Reply
LazyBear PRO ClearEdgeFX
YW Eno
Reply
LazyBear, do u have a version of this set up with alerts? that would be awesome.
+3 Reply
M92 PRO dougl1965
@dougl1965, Did you manage to set alerts for this indicator using the alertcondition function on pine script?
Reply
Great Indicator....Wondering if you could program to show " via the closing price" what price tomorrow the indicator color would change to blue, red or green? (maybe post the signal price either on the chart or on the colored indicator along with a representing price line on the above chart) It would be great to see at what price the indicator will change at on a closing basis.
Reply
thanks for putting time into bringing this to light.. :)
Reply
Awsome. Than you very much.
Reply
Hi LazyBear, thanks for this indicator. When I try modifying it I get:
Error: Undeclared identifier `emaSeries`;

Do you know what the issue is?
Reply
jeffrocket jeffrocket
@jeffrocket, never mind, I saw what was I doing wrong.
Reply
mgenji
Thank you so much.
Reply
Has anyone been able to use the 'alertcondition' function on pines script to set an alert for when the colour changes to red or green?

I have been trying, but have been unable to do so.
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out