jmikes

MarketSmith Stochastic

jmikes Updated   
version=5
This version of the stochastic produces the identical stochastic as used in MarketSmith
The three primary differences from a classic stochastic are as follows:
1. Close values only
2. 5-day ema instead of 3-day simple moving averages for smoothing the fast and slow lines
3. Slow and fast lines are truncated to integer values

by Mike Scott
2023-09-11
Release Notes:
This is an update to a previously published script. The purpose of the script is to replicate the MarketSmith stochastic indicator which is implemented differently than mainstream implementations. The comments section of the code describes the differences. This update is because I noticed that the internal ta.ema() function that computes exponential moving averages behaves differently than I expected. Thus I hand coded the ema algorithm in this update. I believe this update faithfully replicates the behavior of the MarketSmith indicatior.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?