// This Strategy was Created by ©NoobSharks // if you use it and like it, send us some donation: BinancePay ID: 223731148 - Metamask: 0x82782b3ebD1d6bf7faa18a3943fA6f16EBBF3134 // (yes, I might be naive but I trully Believe you will support us) // For more info about this indicator check "https://www.youtube.com/c/NoobSharksLutanoMercadoCripto" and search for the PlayList "Indicadores NoobSharks" // Check also our website includeing strategies, free indicatores and technical analysis videos //@version=5 indicator(title="[NB] - Indicator - Mult Type Double Moving Averages", shorttitle = "[NB]IND.MultTypeDoubleMAs", overlay = true) // inputs maLenF = input.int(defval = 74, step = 1, title = "Length", group = "Fast Moving Average") maSrcF = input(defval = close, title = "Source", group = "Fast Moving Average") maTpF = input.string(defval = "SMA", options = ["EMA", 'HMA', 'RMA', 'SMA', 'SWMA', 'VWAP', 'VWMA', 'WMA'], title = "Type", group = "Fast Moving Average") maLenS = input.int(defval = 32, step = 1, title = "Length", group = "Slow Moving Average") maSrcS = input(defval = close, title = "Source", group = "Slow Moving Average") maTpS = input.string(defval = "SMA", options = ["EMA", 'HMA', 'RMA', 'SMA', 'SWMA', 'VWAP', 'VWMA', 'WMA'], title = "Type", group = "Slow Moving Average") selectMa(TypeF, srcF, lenF)=> if TypeF == "SMA" selectMa = ta.sma(srcF, lenF) else if TypeF == "EMA" selectMa = ta.ema(srcF, lenF) else if TypeF == "RMA" selectMa = ta.rma(srcF, lenF) else if TypeF == "WMA" selectMa = ta.wma(srcF, lenF) else if TypeF == "VWMA" selectMa = ta.vwma(srcF, lenF) else if TypeF == "HMA" selectMa = ta.hma(srcF, lenF) else if TypeF == "SWMA" selectMa = ta.swma(srcF) else if TypeF == "VWAP" selectMa = ta.vwap(srcF, lenF) else na fastMa = selectMa(maTpF, maSrcF, maLenF) slowMa = selectMa(maTpS, maSrcS, maLenS) plot(fastMa, color = color.fuchsia, title = "Fast MA") plot(slowMa, color = color.white, title = "Slow MA") bullCross = ta.crossover(fastMa, slowMa) bearCross = ta.crossunder(fastMa, slowMa) if bullCross alert(syminfo.ticker + "Fast MA crossing OVER Slow MA",freq = alert.freq_once_per_bar_close) if bearCross alert(syminfo.ticker + "Fast MA crossing UNDER Slow MA",freq = alert.freq_once_per_bar_close)