// 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 information about this indicator check "https://www.youtube.com/c/NoobSharksLutanoMercadoCripto" and give us a hand following us on YouTube // Check also our website includeing strategies, free indicatores and technical analysis videos: https://www.noobsharks.com //@version=5 // ----- BASE OF THE INDICATOR indicator(title="[NBpkg] Indicator - Chaikin Money Flow with Areas", shorttitle="[NB]IND.CMF.WithAreas", format=format.price, precision=2, timeframe="", timeframe_gaps=true) var cumVol = 0. cumVol += nz(volume) if barstate.islast and cumVol == 0 runtime.error("No volume is provided by the data vendor.") length = input.int(20, minval=1) ad = close==high and close==low or high==low ? 0 : ((2*close-low-high)/(high-low))*volume mf = math.sum(ad, length) / math.sum(volume, length) plot(mf, color=color.yellow, title="CMF Style") // ----- INCLUDING CRITICAL LINES // ZERO LINE hline(0, linestyle = hline.style_dotted, linewidth = 1, color = color.white, editable = false) // ----- BULLS LINES & FILL lineLimitLong = input.float(defval = 0.05, step = 0.01, title = "Limit Line for Longs: 0.05 is recomended") hline(lineLimitLong, linestyle = hline.style_dotted, linewidth = 1, color = color.green, title = "Limit for Longs") buyPreassureMin = input.float(defval = 0.25, step = 0.01, title = "Bull Area Min,: 0.25 is recomended") buyPreassureMax = input.float(defval = 0.40, step = 0.01, title = "Bull Area Max: 0.40 is recomended") fill(hline(buyPreassureMin, linestyle = hline.style_dotted, linewidth = 1, color = color.lime, title = "BullAreaMin"), hline(buyPreassureMax, linestyle = hline.style_dotted, linewidth = 1, color = color.lime, title = "Bull Area Max"), color.new(color.lime, transp = 80), title = "Bull Area Backround") // ----- BEARS LINES & FILL lineLimitShort = input.float(defval = -0.05, step = 0.01, title = "Limit Line for Shorts: -0.05 is recomended") hline(lineLimitShort, linestyle = hline.style_dotted, linewidth = 1, color = color.orange, title = "Limit for Bears") sellingPreassureMin = input.float(defval = -0.25, step = 0.01, title = "Bear Area Min,: -0.25 is recomended") sellingPreassureMax = input.float(defval = -0.40, step = 0.01, title = "Bear Area Max: -0.40 is recomended") fill(hline(sellingPreassureMin, linestyle = hline.style_dotted, linewidth = 1, color = color.red, title = "Bear Area Min"), hline(sellingPreassureMax, linestyle = hline.style_dotted, linewidth = 1, color = color.red, title = "Bear Area Max"), color.new(color.red, transp = 80), title = "Bear Area Background") // ----- ALERTS float currentPrice = close enterBullArea = ta.crossover(currentPrice, buyPreassureMin) alertcondition(enterBullArea, title = "Price in Bull Area", message = "Price entered Bear Area") leftBullArea = ta.crossunder(currentPrice, buyPreassureMin) alertcondition(leftBullArea, title = "Price out of Bull Area", message = "Price has left the Bull Area") enterBearArea = ta.crossunder(currentPrice, sellingPreassureMin) alertcondition(enterBearArea, title = "Price in Bear Area", message = "Price entered Bear Area") leftBearArea = ta.crossover(currentPrice, sellingPreassureMin) alertcondition(leftBearArea, title = "Price out of Bear Area", message = "Price has left the Bear Area")