NantzOS

Adaptive SMI Ergodic Strategy

NantzOS Updated   
The Adaptive SMI Ergodic Strategy aims to capture the momentum and direction of a financial asset by leveraging the Stochastic Momentum Index Indicator (SMI) in an ergodic form. The strategy uses two lengths for the SMI, a shorter and a longer one, and an Exponential Moving Average (EMA) to serve as the signal line. Additionally, the strategy incorporates customizable overbought and oversold thresholds to improve the probability of successful trade execution.

How It Works:
Long Entry: A long position is taken when the ergodic SMI crosses over the EMA signal line, and both the SMI and EMA are below the oversold threshold.

Short Entry: A short position is initiated when the ergodic SMI crosses under the EMA signal line, and both the SMI and EMA are above the overbought threshold.

The strategy plots the SMI in yellow and the EMA signal line in purple. Horizontal lines indicate the overbought and oversold thresholds, and a colored background helps in visually identifying these zones.

Parameters:
Long Length: The length of the long EMA in SMI calculation.
Short Length: The length of the short EMA in SMI calculation.
Signal Line Length: The length for the EMA serving as the signal line.
Oversold: Customizable threshold for the oversold condition.
Overbought: Customizable threshold for the overbought condition.

Historical Context: The SMI Indicator
The Stochastic Momentum Index (SMI) was developed by William Blau in the early 1990s as an enhancement to traditional stochastic oscillators. The SMI provides a range of values like a traditional stochastic, but it differs in that it calculates the distance of the current close relative to the median of the high/low range, as opposed to the close relative to the low. As a result, the SMI is less erratic and more responsive, offering a clearer picture of market trends.

In recent years, the SMI has been adapted into ergodic forms to facilitate smoother data analysis, reduce lag, and improve trading accuracy. The Adaptive SMI Ergodic Strategy leverages these modern enhancements to offer a more robust, customizable trading strategy that aligns with various market conditions.
Release Notes:
Cleaned up script, updated entry logic for more trades, added classic default colors, and added gradient fill for oversold and overbought zones.

KP
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?