This indicator is made to identify trends.
Parameters
Schaff cycle periods (pdsCy = 10)
short periods (pdsSh = 10)
long periods (pdsLg = 21)
| 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 | // Schaff Trend Cycle MCD = WilderAverage[pdsSh] - WilderAverage[pdsLg] ST =( MCD-LOWEST[pdsCy] (MCD) )/(HIGHEST[pdsCy] (MCD)-LOWEST[pdsCy] (MCD) )*100 STC=WilderAverage [round(pdsCy / 2)] (ST) // automatic trigger levels pk = STC[1] >STC AND STC[1] > STC[2] IF pk THEN      spkval = spkval +STC[1]      spk = spk + 1 ENDIF pkAvg =spkval / ( spk +.000001) if pkAvg = 0 THEN      pkAvg = 100 ENDIF str =STC[1] IF str THEN      sstr = sstr + 1      strval = strval + STC[1] ENDIF trAvg=strval / (sstr +.000001) // plot on own window (or not) RETURN pkAvg, trAvg, STC | 
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 : Filename : download the ITF files
									Filename : download the ITF filesPRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
 
								
							
 
									 
										 
										
 
								 
								 
								
 
								 
									
 
								
 
								 
								 
								 
								 
								
 
								 
								 
								
 
								 
								 
									 
								 
									 
									 
								 
								 
								 
								 
		 
		 
		
what are the two orizzontal line?
The results I get from this indicator seem different from the results obtained using the indicator built in the most recent prorealtime version (using the same parameters).
Is there something I should check?
thanks
An accurate indicator (identical to the platform one) for Schaff Trend Cycle is now also available here: https://www.prorealcode.com/prorealtime-indicators/schaff-trend-cycle2/