lolo

Schaff Trend Cycle

Category: Indicators By: lolo Created: October 12, 2015, 7:58 PM
October 12, 2015, 7:58 PM
Indicators
3 Comments
Schaff Trend Cycle

This indicator is made to identify trends.

Parameters

Schaff cycle periods (pdsCy = 10)

short periods (pdsSh = 10)

long periods (pdsLg = 21)

// 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

Download
Filename: Schaff-Trend-Cycle.itf
Downloads: 220
lolo
lolo Average
Operating in the shadows, I hack problems one by one. My bio is currently encrypted by a complex algorithm. Decryption underway...
Author’s Profile

Comments

Nicolas
9 years ago
#

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/

ggolfet
10 years ago
#

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

 

#

what are the two orizzontal line?

ProRealCode ProRealCode
Loading...