Dynamic Momentum Range Index (DMRI)//@version=5
indicator("Dynamic Momentum Range Index (DMRI)", shorttitle="DMRI", overlay=false)
// Inputs
n = input.int(14, title="Momentum Period", minval=1)
atrLength = input.int(14, title="ATR Length", minval=1)
maLength = input.int(20, title="Moving Average Length", minval=1)
// Calculations
pm = close - close // Price Momentum (PM)
atr = ta.atr(atrLength) // Average True Range (ATR)
va = pm / atr // Volatility Adjustment (VA)
// Moving Average and Dynamic Range Factor (DRF)
ma = ta.sma(close, maLength)
drf = math.abs(close - ma) / atr
// Dynamic Momentum Range Index (DMRI)
dmri = va * drf
// Normalization
maxVal = ta.highest(dmri, atrLength)
minVal = ta.lowest(dmri, atrLength)
dmriNormalized = (dmri - minVal) / (maxVal - minVal) * 100
// Zones for Interpretation
bullishZone = 70
bearishZone = 30
// Plotting DMRI
plot(dmriNormalized, title="DMRI", color=color.blue, linewidth=2)
hline(70, "Overbought", color=color.red)
hline(30, "Oversold", color=color.green)
hline(50, "Neutral", color=color.gray)
// Background Coloring
bgcolor(dmriNormalized > bullishZone ? color.new(color.green, 90) : na, title="Bullish Zone Highlight")
bgcolor(dmriNormalized < bearishZone ? color.new(color.red, 90) : na, title="Bearish Zone Highlight")
Marketreversal
Dynamic Momentum Range Index (DMRI)//@version=5
indicator("Dynamic Momentum Range Index (DMRI)", shorttitle="DMRI", overlay=false)
// Inputs
n = input.int(14, title="Momentum Period", minval=1)
atrLength = input.int(14, title="ATR Length", minval=1)
maLength = input.int(20, title="Moving Average Length", minval=1)
// Calculations
pm = close - close // Price Momentum (PM)
atr = ta.atr(atrLength) // Average True Range (ATR)
va = pm / atr // Volatility Adjustment (VA)
// Moving Average and Dynamic Range Factor (DRF)
ma = ta.sma(close, maLength)
drf = math.abs(close - ma) / atr
// Dynamic Momentum Range Index (DMRI)
dmri = va * drf
// Normalization
maxVal = ta.highest(dmri, atrLength)
minVal = ta.lowest(dmri, atrLength)
dmriNormalized = (dmri - minVal) / (maxVal - minVal) * 100
// Zones for Interpretation
bullishZone = 70
bearishZone = 30
// Plotting DMRI
plot(dmriNormalized, title="DMRI", color=color.blue, linewidth=2)
hline(70, "Overbought", color=color.red)
hline(30, "Oversold", color=color.green)
hline(50, "Neutral", color=color.gray)
// Background Coloring
bgcolor(dmriNormalized > bullishZone ? color.new(color.green, 90) : na, title="Bullish Zone Highlight")
bgcolor(dmriNormalized < bearishZone ? color.new(color.red, 90) : na, title="Bearish Zone Highlight")
Simple Moving Average Slope [AstrideUnicorn]The Simple Moving Average Slope indicator (SMAS) is a technical analysis tool designed to help traders detect the direction and strength of the current trend in the price of an asset. It is also a great tool for identifying sideways markets. The indicator plots the slope of a simple moving average (SMA) of the closing prices over a specified time period. The slope is normalized by dividing it by the standard deviation of the slope over a longer time period.
HOW TO USE
Traders can use the Simple Moving Average Slope indicator in various ways. One common way is to look for bullish or bearish signals. A bullish signal occurs when the normalized slope rises above a predetermined threshold, resulting in the indicator turning green, indicating an upward trend in the market. Conversely, a bearish signal is generated when the normalized slope falls below the negative value of the threshold, causing the indicator to turn red, signaling a downtrend in the market. When the normalized slope falls between the positive and negative threshold values, a neutral signal is generated, indicating that the market is moving sideways. This can help traders avoid false trend signals from other indicators and strategies that may occur when the market is in a sideways regime. Additionally, traders can use the Simple Moving Average Slope indicator in conjunction with other technical indicators to confirm the trend direction.
SETTINGS
Window - specifies the number of bars used to calculate the SMA slope. The default value is 20.
Threshold - specifies the threshold value used to generate the bullish and bearish signals. The default value is 0.6. Traders can adjust these settings based on their trading strategy and the asset being analyzed.
Price Filter [AstrideUnicorn]The indicator calculates a fast price filter based on the closing price of the underlying asset. Overall, it is intended to provide a fast, reliable way to detect trend direction and confirm trend strength, using statistical measures of price movements.
The algorithm was adapted from Marcus Schmidberger's (2018) article "High Frequency Trading with the MSCI World ETF". It demeans the price time series using the long-term average and then normalizes it with the long-term standard deviation. The resulting time series is then compared to specified thresholds to determine the trend direction.
HOW TO USE
The indicator surface is colored green if the price is trending upwards and red if the price is trending downwards. If the indicator outline is the opposite color of the indicator surface, it indicates that the price is moving against the trend and the current trend may be losing strength.
If the 'Use threshold' setting is enabled, the indicator will be colored blue if its value is within the range defined by the upper and lower thresholds. This indicates that the price is trending sideways, or that the current trend is losing strength.
SETTNGS
Length - the length of the long-term average used to calculate the price filter. Recommended range 20 - 200. The sensitivity of the indicator increases as the value becomes smaller, allowing it to detect smaller price moves and swings earlier.
Threshold - the threshold value used to detect trend direction.
Use threshold - a boolean (true/false) input that determines whether to use the threshold value for confirmation.