Another SuperTrend version, which uses the ATR distance from price to calculate its own levels, but this time combined with CCI condition to turn bullish or bearish.
You can modify the CCI period into the setting and also at which level the Supertrend can switch from bullish trend to bearish trend and vice-versa.
Indicator translated from MT5 version, following a request into the Indicator’s forum:
https://www.prorealcode.com/topic/conversion-indicateur-supertrend-mt5/
| 
					 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55  | 
						//PRC_Supertrend+CCI | indicator //06.01.2021 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //converted from MT5 version  // --- settings  CCIPeriod=50 // CCI indicator period ATRPeriod=5  // ATR indicator period Level=0 // CCI activation level // --- end of settings icci = CCI[CCIPeriod](typicalPrice) iatr = AverageTrueRange[ATRPeriod](close) TrendUp=0.0 TrendDown=0.0 SignUp=0.0 SignDown=0.0 if(iCCI>=Level and iCCI[1]<Level) then   TrendUp=TrendDown[1] endif if(iCCI<=Level and iCCI[1]>Level) then  TrendDown=TrendUp[1] endif if(iCCI>Level) then   TrendUp=low-iATR  r=0  g=255  if(TrendUp<TrendUp[1] and iCCI[1]>=Level) then    TrendUp=TrendUp[1]  endif endif if(iCCI<Level) then   TrendDown=high+iATR  r=255  g=0  if(TrendDown>TrendDown[1] and iCCI[1]<=Level) then    TrendDown=TrendDown[1]  endif endif if(TrendDown[1]<>0.0 and TrendUp<>0.0) then   SignUp=TrendUp  drawtext("●",barindex,signup,dialog,bold,20) coloured(72,209,204) endif if(TrendUp[1]<>0.0 and TrendDown<>0.0) then   SignDown=TrendDown  drawtext("●",barindex,signdown,dialog,bold,20) coloured(255,140,0) endif  st = max(trendup,trenddown) return st coloured(r[1],g[1],0) style(line,2) as "Supertrend+CCI"  | 
					
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
								
							
								
								
										
								
								
								
										
								
								
								
								
										
										
								
										
										
								
										
								
										
		
		
		
Hello Nicolas
Whether the level is 0 or 1 makes no difference in the display is that normal?
The CCI scale is -100 / +100 , so indeed it will not make a big difference if you set that setting to 1 only! 🙂
Sorry ;-)))
ATRPeriod=5 // ATR indicator period
syntax error :unexpected identifier
any correction suggestions
This is a code to be used on the ProRealTime platform.
https://www.prorealtime.com
Very nice thank you for sharing
Bonjour Nicolas, comment faites-vous pour afficher votre indicateur directement sur le graphique de cotation svp ? Chez moi il s’affiche en dessous, de la même façon que s’affiche le RSI ou le MACD.
Appliquez le sur le prix.
Merci beaucoup pour votre travail et le partage !
Bonjour, est-il possible d’avoir un screener faisant ressortir les valeurs dont l’indicateur vient de passer au vert ? Merci pour votre réponse
oui bien sûr, merci de formuler la demande dans le forum ProScreener en respectant les règles de publication.
Bonjour,
J’ai cherché sur le forum une trace de la demande de robi38 sans résultat. Est il possible de savoir si le passage en screener a été fait ? Est il possible de choisir un horizon de temps antérieurs où le signal hausse / baisse est détecté ? (par exemple : faire la recherche pour un signal détecté il y a 5 jours)
Merci