William Blau SMI with EMA difference (aka histogram)


New member
I have not been able to find in the forum an indicator of the original William Balu's SMI that includes the EMA difference shown as a histogram. Please see the following images for details and required parameters.

(click on images to enlarge)



I would appreciate if anyone can point me to the equivalent thinkscript. Thanks in advance.
@Tango It would be helpful if you could provide a link to the study you have referenced... We do have SMI study topics here in these forums... Most notably the Ironrod_SMI_Histogram which is a lower indicator...

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Dunno where to find 'the original William Balu's SMI' but TOS has one.

Added a histgram to the original study.

# TD Ameritrade IP Company, Inc. (c) 2008-2020

declare lower;

input over_bought = 40.0;
input over_sold = -40.0;
input percentDLength = 13;
input percentKLength = 25;

def min_low = Lowest(low, percentKLength);
def max_high = Highest(high, percentKLength);
def rel_diff = close - (max_high + min_low) / 2;
def diff = max_high - min_low;

def avgrel = ExpAverage(ExpAverage(rel_diff, percentDLength), percentDLength);
def avgdiff = ExpAverage(ExpAverage(diff, percentDLength), percentDLength);

plot SMI = if avgdiff != 0 then avgrel / (avgdiff / 2) * 100 else 0;

plot AvgSMI = ExpAverage(SMI, percentDLength);

plot overbought = over_bought;

plot oversold = over_sold;

# Add a histogram -- mfsteve 12/10/20
plot ZeroLine = 0;

plot wave = SMI - AvgSMI;
@mfsteve thanks so much.... this is pretty much what was looking for. It has the histogram. The only thing that is missing are the typical additional smoothing averages, but that is not a big deal. Cheers!

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
319 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.