The Schaff Trend Cycle. An Improved Trend Indicator?

Developing the Schaff Trend Cycle Indicator in Python to Trade the Trend.

Sofien Kaabar, CFA
8 min readDec 7, 2021


There are two desired outcomes of a trend-following strategy, the first one is entering on time and the second one is exiting on time. We always seek to detect the changes of trends as early as possible and then want to exit after having exploited most of it. This is easier said than done and many indicators are lagging. In this article we will discuss a supposedly slightly less lagging version of an indicator that resembles the MACD.

I have just released a new book after the success of my previous one “The Book of Trading Strategies”. It features advanced trend-following indicators and strategies with a GitHub page dedicated to the continuously updated code. Also, this book features the original colors after having optimized for printing costs. If you feel that this interests you, feel free to visit the below Amazon link, or if you prefer to buy the PDF version, you could contact me on LinkedIn.

The Concept of Moving Averages

Moving averages help us confirm and ride the trend. They are the most known technical indicator and this is because of their simplicity and their proven track record of adding value to the analyses. We can use them to find support and resistance levels, stops and targets, and to understand the underlying trend. This versatility makes them an indispensable tool in our trading arsenal.

EURUSD hourly values with the 200-hour simple moving average.

As the name suggests, this is your plain simple mean that is used everywhere in statistics and basically any other part in our lives. It is simply the total values of the observations divided by the number of observations. Mathematically speaking, it can be written down as:



Sofien Kaabar, CFA

Top writer in Finance, Investing, Business | Trader & Author

Recommended from Medium


See more recommendations