OPEN-SOURCE SCRIPT
Minho Index | SETUP+@TraderMinho

//version=5
// By: Trader Minho — Analista Gráfico desde 2022
indicator("Minho Index | SETUP+traderminho", shorttitle="Minho Index (Classic)", overlay=false)
//--------------------------------------------------------
// PARAMETERS
//--------------------------------------------------------
shortPeriod = input.int(3, "Short Period")
mediumPeriod = input.int(8, "Medium Period")
longPeriod = input.int(20, "Long Period")
intensityFactor = input.float(3.0, "Intensity Factor", step = 0.1)
shortSmoothing = input.int(2, "Short Smoothing (EMA)")
mediumSmoothing = input.int(5, "Medium Smoothing (EMA)")
shortColor = input.color(color.new(#00CED1, 0), "Short Line Color (Aqua Blue)")
mediumColor = input.color(color.new(#FFD700, 0), "Medium Line Color (Yellow)")
zeroColor = input.color(color.new(color.white, 0), "Zero Line Color")
lineWidth = input.int(1, "Line Thickness")
//--------------------------------------------------------
// MOVING AVERAGE CALCULATIONS
//--------------------------------------------------------
smaShort = ta.sma(close, shortPeriod)
smaMedium = ta.sma(close, mediumPeriod)
smaLong = ta.sma(close, longPeriod)
//--------------------------------------------------------
// CLASSIC DIDI NORMALIZATION
//--------------------------------------------------------
priceBase = ta.sma(close, longPeriod)
didiShort = ((smaShort - smaLong) / priceBase) * intensityFactor
didiMedium = ((smaMedium - smaLong) / priceBase) * intensityFactor
//--------------------------------------------------------
// FINAL SMOOTHING (CLASSIC NEEDLE EFFECT)
//--------------------------------------------------------
aquaSmooth = ta.ema(didiShort, shortSmoothing)
yellowSmooth = ta.ema(didiMedium, mediumSmoothing)
//--------------------------------------------------------
// PLOTS
//--------------------------------------------------------
hline(0, "Zero Line", color = zeroColor, linewidth = 1)
plot(aquaSmooth, "Short (Aqua)", color = shortColor, linewidth = lineWidth)
plot(yellowSmooth, "Medium (Yellow)", color = mediumColor, linewidth = lineWidth)
// By: Trader Minho — Analista Gráfico desde 2022
indicator("Minho Index | SETUP+traderminho", shorttitle="Minho Index (Classic)", overlay=false)
//--------------------------------------------------------
// PARAMETERS
//--------------------------------------------------------
shortPeriod = input.int(3, "Short Period")
mediumPeriod = input.int(8, "Medium Period")
longPeriod = input.int(20, "Long Period")
intensityFactor = input.float(3.0, "Intensity Factor", step = 0.1)
shortSmoothing = input.int(2, "Short Smoothing (EMA)")
mediumSmoothing = input.int(5, "Medium Smoothing (EMA)")
shortColor = input.color(color.new(#00CED1, 0), "Short Line Color (Aqua Blue)")
mediumColor = input.color(color.new(#FFD700, 0), "Medium Line Color (Yellow)")
zeroColor = input.color(color.new(color.white, 0), "Zero Line Color")
lineWidth = input.int(1, "Line Thickness")
//--------------------------------------------------------
// MOVING AVERAGE CALCULATIONS
//--------------------------------------------------------
smaShort = ta.sma(close, shortPeriod)
smaMedium = ta.sma(close, mediumPeriod)
smaLong = ta.sma(close, longPeriod)
//--------------------------------------------------------
// CLASSIC DIDI NORMALIZATION
//--------------------------------------------------------
priceBase = ta.sma(close, longPeriod)
didiShort = ((smaShort - smaLong) / priceBase) * intensityFactor
didiMedium = ((smaMedium - smaLong) / priceBase) * intensityFactor
//--------------------------------------------------------
// FINAL SMOOTHING (CLASSIC NEEDLE EFFECT)
//--------------------------------------------------------
aquaSmooth = ta.ema(didiShort, shortSmoothing)
yellowSmooth = ta.ema(didiMedium, mediumSmoothing)
//--------------------------------------------------------
// PLOTS
//--------------------------------------------------------
hline(0, "Zero Line", color = zeroColor, linewidth = 1)
plot(aquaSmooth, "Short (Aqua)", color = shortColor, linewidth = lineWidth)
plot(yellowSmooth, "Medium (Yellow)", color = mediumColor, linewidth = lineWidth)
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.