EZ Trend and Momentum Indicator for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
Great oscillator which determines trend and momentum. So accurate it could be used as a stand alone indicator.
Remove the assignPriceColor line in the code if you wish not to have the candles painted.




thinkScript Code

Code:
# EZ Trend & Momentum
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/IzvxaVhB-ROMI2/

declare lower;

def s2 = expAverage(close, 10) - expAverage(close, 24);

plot line = s2;

line.assignValueColor(if s2 <= 0 then color.red else color.green);

assignPriceColor(if s2 <= 0 then color.red else color.green);
 
P

Playstation

Active member
@BenTen is it possible to add arrows/dot below when the lines change color?
 
BenTen

BenTen

Administrative
Staff
VIP
@Playstation I don’t believe so. This is much simpler. You can always compare them.
 
P

Playstation

Active member

Lower study Spy indicator is smoother.
This is /ES chart.
 
V

veerasareddy

New member
@BenTen Do we have any indicators for SPY only in our warehouse?
 
BenTen

BenTen

Administrative
Staff
VIP
@veerasareddy If it works for SPY, it will work for other stocks and vice versa. Unless you find some concept that only applies to SPY, then I can take a look and see if I can convert for you.
 
V

veerasareddy

New member
@veerasareddy If it works for SPY, it will work for other stocks and vice versa. Unless you find some concept that only applies to SPY, then I can take a look and see if I can convert for you.
@BenTen Could you pls consider to compile one indicator with these : 1). $ADD (NYSE) & SPX divergence. 2).$ADD (NYSE) divergence with $TICK.
 
J

JohnsonM

New member
Hi Ben. Is it possible to change current trend and momentum set up from colorbars to a histogram? Keen to know how to do this as well on the slimribbon.
 
BenTen

BenTen

Administrative
Staff
VIP
@JohnsonM Add this snippet to the bottom of your script:

Code:
line.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
 
J

JohnsonM

New member
Thanks so much Ben. Is there a different code if I wanted to do the same to Slim Ribbon too?
 
BenTen

BenTen

Administrative
Staff
VIP
@JohnsonM No idea about the Slim Ribbon indicator since I don't use it. However, I believe those are moving averages. You can post a request in that thread.
 

Top