Schaff Trend Cycle indicator is a cyclical oscillator created by calculating the Stochastic over MАСD line using cycles. As a result, the developers managed to achieve more stable and reliable results of the indicator script operation. A chart is almost unaffected by the short-term trends that inevitably emerge on the market. But the indicator generates an appropriate alert in case of some sharp changes of the market situation.
The author of the Schaff Trend Cycle indicator is Doug Schaff, the economist, whose observations of trading results on financial markets allowed him to develop and mathematically prove that currency trends almost never behave spontaneously. As time passes, the trend direction reverts to the basic one and the cycle of its ascending and descending starts to repeat, i.e. there is some periodicity. And the reliability of the market indicator/oscillator can be considerably increased, in case this periodicity is considered. This theory was confirmed in 2008 after mass researches had been conducted. After that Doug Schaff's mathematical model was used in the development of the new Schaff Trend Cycle indicator.
Aside from trends periodicity consideration, combination of two different methods of trends direction changes calculation was used to improve reliability of the Schaff Trend Cycle indicator and lessen the quantity of its false activations. These methods are smoothed stochastic oscillator and MACD.
For illustration purposes the indicator's operational field is graduated in standard units ranged from 0 up to 100. Two trigger levels are used — 25 and 75.
The following parameters are used as input ones for the Schaff Trend Cycle indicator setting:
The simplest method of Forex trading using the Schaff Trend Cycle indicator is to sell the currency when the indicator line goes down past the level 80 and to buy it when the indicator line goes up past the level 20. To minimize the quantity of false signals, Doug Schaff suggested to trace the following models of a chart behaviour. For a buy signal, the bar following the trigger bar should close above the high of the trigger bar. For a sell signal, the bar following the trigger bar should close below the low of the trigger bar. Trigger bar is the bar formed above the signal lines with levels 20 or 80.
The presented variant of this popular indicator allows to select the smoothing algorithm out of ten possible variants:
It should be noted that Phase parameter has completely different meaning for different smoothing algorithms.
The indicator uses SmoothAlgorithms.mqh library classes (must be copied to the terminal_data_folder\MQL5\Include). The use of the classes was thoroughly described in the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/486
The indicator generates signals for entering the market.3LineBreak
The indicator that paints the bars in blue for a bullish trend and in red for a bearish one.