Elder Impulse System
CompletedCurious as to whether anyone with savvy coding skills could help me out with an adapted version of the Elder Impulse System. It's been slightly modified from the original code and is in either Java or JavaScript language already, though it needs to be in the format that the Tradovate CodeExplorer will recognize. I unfortunately don't have any programming skills myself, so I thought I'd post it here. Would be great to see it in action if anyone's willing to get it into code explorer format. Also, please post a completed version of the code for those of us who are less programmatic!-)
Thanks!
//
//
//
//
//
study("Elder Impulse System", shorttitle="EIS")
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)
-
I really enjoyed Alexander Elder's books while learning to trade, and used the Elder Impulse indicator in other platforms to get a quick read on momentum and trend.
Tradovate made some updates that let you color the bars, and so I went ahead and built an impulse indicator based on Elder's formula for the platform.
Look for "Tiki Elder Impulse" in the Code Explorer to enable it.

As far as I can tell the only difference between Elder's traditional one and your code is you used an SMA instead of an EMA? I could potentially provide that as an option if it's important to you.
Please sign in to leave a comment.
Comments
2 comments