// Calculate CCI indicating continuance of trend. isup = cciVal > lenUpper isdown = cciVal < lenLower barcolor(bars_on ? isup ? aqua : isdown ? black : na : na )
// Check have alert and use MACD filter cciup_alert = isup and close>open and (not filterR or rsiVal>rsiUpper) and (not filterM or OutputSignal<0) and (not filterE or (emaMe>slowMC and rising(slowMC,dCandles))) ? na(cciup_alert[1]) ? 1 : cciup_alert[1]+1 : 0 ccidn_alert = isdown and close<open and (not filterR or rsiVal<rsiLower) and (not filterM or OutputSignal>0) and (not filterE or (emaMe<slowMC and falling(slowMC,dCandles))) ? na(ccidn_alert[1]) ? 1 : ccidn_alert[1]+1 : 0 // plotshape(cciup_alert==1? cciup_alert : na, title="CCIPAT Up Arrow", style=shape.triangleup,location=location.belowbar, color=olive, transp=0, size=size.small) plotshape(ccidn_alert==1? ccidn_alert : na, title="CCIPAT Down Arrow", style=shape.triangledown,location=location.abovebar, color=red, transp=0, size=size.small)
// generate an alert if required. alertcondition(cciup_alert==1 or ccidn_alert==1, title="CCIPAT Alert", message="CCIPAT Alert")
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.