Forex Blog

First-hand Forex trading experience and information about foreign exchange market that will be useful to traders


Doug Schaff’s Trend Cycle (STC) — Now for MetaTrader!

January 6, 2011 by

Doug Schaff developed an interesting cyclical indicator for Forex trading several years ago. In 2008 he’s made it public. He presented a code of the indicator written for TradeStation EasyLanguage. Unfortunately, until now there weren’t any correctly converted versions for MetaTrader. I’ve found several variants of one code, which is neither correct nor full. From today, you can freely download the original Schaff Trend Cycle indicator for MetaTrader from The version converted by me has the following features:

  • Works properly in MT4 and MT5.
  • Calculates the indicator line for all the available bars but doesn’t recalculate old bars each tick.
  • Works on any trading instrument and timeframe but is better used with daily charts.
  • Doesn’t jump up or down during strong trends; detects the important changes promptly.

You can get the code of the MT5 and MT4 versions or read more info about this complex cyclical oscillator.

If you find any bugs in this MetaTrader indicator or if you want to make a suggestion regarding its functionality, please, use the commentary form below.

7 Responses to “Doug Schaff’s Trend Cycle (STC) — Now for MetaTrader!”

  1. Angelo

    Hi Andriy,

    thanks for your STC indicator. I like it very much. Only thing i miss is an alert when it crosses above / below 25 / 75. I couldn’t figure out how to add such an alert myself (i’m just starting out with MQL4). Ayy chance you might add alerts? Or perhaps give a hint how it could be done?



  2. Angelo

    Thank you, Andriy. Now i see how it’s done ;)


  3. bhupinder singh

    Hi sir,
    i have download STC with sound alert. i attach it on chart and it’s signal line is not showed on chart but it provides sound alert and values. plz fix it
    would be awesome if you could help me.

    Your regards
    Bhupinder Singh


    Andriy Moraru Reply:

    Hello Bhupinder,

    I cannot replicate this bug. Please help me to help you by answering these questions:
    1. What version of the indicator did you download?
    2. What version of the platform (MT4 or MT5, which build)?
    3. Does the separate indicator window show up on the chart?
    4. When you change the indicator’s settings, there is a Colors tab. What color is set there for the first output? 5. Is it different from your background color?
    6. Is there some output in the Experts tab of your terminal when you attach the indicator?


    bhupinder singh Reply:

    Hi Andriy ,

    1. I don’t know the version, but i download it from this link
    2. MT4 version 4.00 build 1090
    3.Yes, separate window is showed on chart
    4. I use default settings. chart color is black and signal line is orange red.
    5.There is nothing show, but when i changed time that indicator STC give sound alert like (STC is above 75)


    Andriy Moraru Reply:

    That’s an old version of the STC. Please download the one from here:


Leave a Reply

required (will not be published)