Category Trend  Published on 03/08/2012

Schaff Trend Cycle

Description

The Schaff Trend Cycle is a faster and more accurate indicator than the MACD because the currency cycle trends are factored into the equation of the MACD. The STC Indicator uses a 23- and 50-period EMA with a cycle component used as the 10-period signal line. Factoring in cycle trends based on a certain amount of days, indicates how far and how long a trend lasts. The algorithm involves applying the smoothed stochastic twice on the MACD Line. The result combines the benefits of both indicators.  In trending markets it moves between 0 and 100, rising when an uptrend is accelerating and falling when a downtrend is accelerating.

 

 Schaff Trend Cycle chartshot


u

sktrader's avatar
sktrader

Joined on 03.08.2012

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: SchaffTrendCycle.algo
  • Rating: 5
  • Installs: 6399
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
VI
vilberto.barbati · 2 years ago

Hello,

I know that Schaff is an oscillator. It should go from 0 to 100. I'm wrong?

JI
jin64t · 6 years ago

Hi, perhaps you can fix as follows.

Factor may be calculated as follows.

Factor = 2.0 / (1.0 + 0.5 * Period);

         private double Highest(IndicatorDataSeries macd, int index)
        {
            double dblhigh = macd[index - Period];
            for (int i = index - Period + 1; i <= index; i++)
            {
                if (macd[i] > dblhigh)
                    dblhigh = macd[i];
            }
            return dblhigh;
        }

        private double Lowest(IndicatorDataSeries macd, int index)
        {
            double dbllow = macd[index - Period];
            for (int i = index - Period + 1; i <= index; i++)
            {
                if (macd[i] < dbllow)
                    dbllow = macd[i];
            }
            return dbllow;
        }

Cheers

EQ
EQ5FX · 9 years ago

Hi, the display of the indicator when downloaded is totally different from the actually indicator. Can you check that out.

 

Cheers