OPEN-SOURCE SCRIPT

CT Reverse Stochastic Momentum Index

已更新
Introducing the Caretakers Reverse Stochastic Momentum Index .

According to Investopedia :
“The Stochastic Momentum Index (SMI) is a more refined version of the stochastic oscillator, employing a wider range of values and having a higher sensitivity to closing prices.”

The SMI was developed by William Blau and introduced in 1993 in an attempt to provide a more reliable indicator, less subject to false swings.
It calculates the distance of the current closing price as it relates to the median of the high/low range of price.

The SMI has a normal range of values between +100 and -100.

When the present closing price is higher than the median, or midpoint value of the high/low range, the resulting value is positive.
When the current closing price is lower than that of the midpoint of the high/low range, the SMI has a negative value.

I have reverse engineered the SMI formula to derive 2 functions.

One function calculates the chart price at which the SMI will reach a particular SMI scale value.
The second function calculates the chart price at which the SMI will crossover its signal line.

I have employed those functions here to give the price level where the SMI will equal :

  • Upper alert level ( default 40 )
  • Zero-Line
  • Lower alert level ( default -40 )
  • Signal line

The user can infer from these values that when closing prices cross the levels shown, the SMI will cross the indicated level or signal line.
If the price value is less than zero the value will show "impossible".

The advantage of knowing the exact prices that this will happen should give the user an additional edge and precision in risk management.

These crossover levels are displayed via an optional infobox with choice of user selected info.
There is an option to change the decimal places shown.

For easy and intuitive reading of the indicator when ….

  • SMI is above the signal line both the SMI and Signal line and the space between them is Green.
  • SMI is below the signal line both the SMI and Signal line and the space between them is Red.
  • SMI is above the Zeroline the space between them is Green.
  • SMI is below the Zeroline the space between them is Red.

Traditionally traders and analysts will consider:

  • Positives values above 40 indicate a bullish trend
  • Negative values below -40 indicate a bearish trend .

Common traditional ways to derive signals from the SMI :

  • When the SMI crosses above the zeroline, a buy signal is generated.
  • When the SMI crosses below the zeroline, a sell signal is generated.

  • When the SMI crosses below -40 and then moves back above it, a buy signal is generated.
  • When the SMI crosses above +40 and then moves back below it, a sell signal is generated.

  • When the SMI line crosses above the signal line. A signal to buy / take profit is generated
  • When the SMI line crosses below the signal line. A signal to sell / take profit is generated.


Traders also look for divergences between the SMI itself or the SMI histogram and price action.

The SMI is often used in conjunction with the Chande Momentum Oscillator or R squared indicator to determine overall market trendiness where the SMI is used to determine the direction of the trend, and also with volume indicators to show if the momentum carries significant selling or buying pressure.

版本注释
General tidy up of code.

Renamed many variables and functions for consistency and clarity.

Added SMI (eq) output which shows the price level pivot to make the SMI higher or lower than its previous value.

Added some simple development testing tools ( as notes at the bottom ) for newer coders knowledge.
版本注释
Upgraded to Pinescript Version 5.
Added color selection options for plots and fills.
Arranged settings and added setting section headers.
caretakerCentered OscillatorsreversestochasticmomentumindexTrend Analysis

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


You may contact me on Krown's Crypto Cave Discord: discord.gg/W9ettX54DF My Discord username is The Caretaker.
My Private indicators are available via :
krown-trading.teachable.com/?affcode=236462_mm1lb1_w
更多:

免责声明