Schaff Code

download Schaff Code

of 21

  • date post

  • Category


  • view

  • download


Embed Size (px)

Transcript of Schaff Code

  • 5/26/2018 Schaff Code


    February 15, 2008

    Releasing the Code to the Schaff Trend CycleBy Doug Schaff, CEO

  • 5/26/2018 Schaff Code




    Who is Doug SchaffWhat is the STC?Why is the STC important?

    TA principles the STC is based on

    Why release the STC Code now?Personal StoryHow I got into ForexMy development as a traderWhy I developed the STCBreakdown of TA principles behind the STC

    Technical Specifications

    How the STC improves on previous indicator?

    The Code for the STC

    Application of the Indicator

  • 5/26/2018 Schaff Code


    Who is Doug Schaff?

    Doug Schaff is the president and founder of FX-Strategy, Inc. Schaff is a pioneer in buildingtechnical forex trading tools, including automated trading systems. He brings more than 25years forex trading experience to FXS. He has held multi-million dollar spot positions in allthe major currencies and was the first person to trade a 10-year forex option.

    His trading background includes stints as senior bank trader for Bankers Trust New York andParis, and Chief dealer at Merrill Lynch Bank, where he established the Bank's currencyoptions trading desk. As head of FX-Strategy, Inc, Schaff has been a leader in developingcutting-edge forex trading tools, including the Schaff Trend Cycle & automated tradingsystems on Pro Charts. He and Terry Schaff are the co-authors of Getting Ready to TradeFX and The Forex Strategy Manual now being printed in its 2ndEdition.

    What is the STC?

    Schaff Trend Cycle (STC) is a popular indicator commonly used to identify or confirm pricedirection and market turning points. It was created by Doug Schaff and is based on theassumption that currency trends accelerate and decelerate in a cyclical pattern that canreflect the dominant price cycle of any currency in any timeframe.

    .Schaff created the STC after trying to resolve the discrepancies that he observed betweentwo widely used methods of determining trend:

    Moving Average Convergence and Divergence (MACD), the movement of two movingaverages away from and towards each other.

    Price Cycles, the direction of the dominant price cycle as shown by various SmoothedStochastics.

    The STC is created by running a MACD Line (the difference between two exponential movingaverages) through a Double Smoothed Stochastic algorithm. The resulting oscillatorcombines the benefits of trend and momentum indicators. In trending markets it movesbetween 0 and 100, rising when an uptrend is accelerating and falling when a downtrend isaccelerating.

    In sideways markets the STC is used as a range-trading indicator and can be interpretedsimilarly to standard oscillators. That is, the STC can signal oversold conditions when itturns up from below the 25-Line, and overbought conditions when it turns down from abovethe 75-Line.

    Why is the STC important?

    The STC has several benefits compared to its component indicators. It produces lesswhipsaw and fewer false signals than the MACD or Price Cycle oscillators. By combining thetwo, Schaff created an indicator that is more accurate and more adaptive than eitheroriginal indicator is by itself.

    The STC usually turns up or down earlier than the MACD crossover, highlighting prospectivetrend changes sooner. In sideways markets, the STC generally travels in a clear path fromunder 25 to over 75, making it easier to interpret than the MACD which has no maximum orminimum values.

    The STC is an improvement compared to Cycle Oscillators which can give out wrong signalswhen the dominant cycle changes in length. In a strongly uptrending market, for instance,a 20-bar Cycle can be absorbed and practically disappear into the longer rise to the top of a

  • 5/26/2018 Schaff Code


    40-bar Cycle. At those times a Cycle Oscillator set to the 20-bar cycle can give falsesignals, turning down in an accelerating bull market or rising into a rapidly declining bearmarket.

    The STC adapts when the dominant cycle lengthens or shortens, and so often it identifiescycle tops and bottoms more accurately than fixed or multiple-length oscillators. In strong

    rising markets the STC moves up to its ceiling of 100 and can stay there, reflecting anextended bullish move, until the trend slows and prices begin a sideways or downwardsretracement after the longer cycle peaks. Likewise, in strong bear markets the STC usuallyfalls quickly to 0 and can remain there until trend slows and prices drop, confirming that alonger price cycle low has occurred.

    TA Principles that the STC is based on

    The first step to making a currency trading decision is to identify a market trend. Theearlier you can confirm a trend the better. Traders are constantly looking for a better wayto do this, a better trend indicator, one that identifies trend faster, without giving upaccuracy. This tradeoff between speed and reliability is a continual challenge for analysts.

    The history of technical analysis is driven by analysts, traders and other trying to developtheories, indicators and patterns in order to more promptly and accurately predict thedirection of market prices. Computers and programmers make it easier these days tocreate and test out new ideas, but it all is built on the work of past analysts and traders.

    The Schaff Trend Cycle combines tested technical analysis principles that underlie theMACD, Stochastics and Time Cycles, three well known technical indicators (and three of myfavorites). I wanted to build upon past successful innovation and, hopefully, to improveupon them.

    Each of these indicators is discussed further on in the article and how each is used in theSTC is presented.

    Why release the STC Code now?

    Im definitely ready to do it. Over the years that I worked with and applied the STC in mytrading, I also was training currency traders. And I found that I learned something valuablefrom each one, tweaks to an input or new ideas on how to apply it that helped my trading.At this point I want to see what other traders can do with it. I look forward to seeing howtraders will use and adapt the STC.

    I have included, below, some of my personal development as a forex trader, in the form offrequently asked questions from trading students and then answers. At a minimum youmay better understand what stubbornly motivated me to keep trying to resolve thedisagreements between two of my favorite technical indicators. Better yet, I hope thatsome essential financial principles may come through for you and that it will help you

    succeed more often and accumulate more profit so that you can accomplish your tradinggoals.

    PersonalQ. How did you get interested in trading?

    I have been fascinated with trading and investing for as long as I can remember. My Dadgave me three shares of Kelloggs stock when I was 11. He and I talked a lot about

  • 5/26/2018 Schaff Code


    markets when I was growing up, and eventually Id go with him to annual meetings oneverything from oil drilling ventures to hedge fund investments.

    Growing up near Chicago had a subtle influence. One of my schoolmates parents worked inthe corn pit at the Chicago Board of Trade. Others managed money. Over the years I havebecome more impressed at how savvy and entrepreneurial the Chicago financial community


    Q. What interested you to get into currency trading, specifically?

    By the time I went to Northwestern University I knew I wanted something international. Ihad some fascinating work experience and travel in Europe and Asia. One of my bestfriends was Japanese and the other was Russian.After college I worked on the Chicago Board of Options Exchange (CBOE) while getting myMBA at night at the University of Chicago. By the way, regarding my time as a phone clerkon the CBOE, I learned two things about my interests: 1) I definitely wanted to be a traderand 2) I definitely did not want to trade on the floor of an exchange. Of course thateventually made me suited for interbank trading, which I learned about in a course onInternational Finance.

    A famous professor was teaching it but frankly it started out quite boring. Then we got tothe section on currency exchange rates, and my interested perked up. I had never heard ofthe Interbank Foreign Exchange Market and could not believe how huge it was. The worldof interbank trading sounded intriguing. It suited my interest to trade and be in aninternational business.

    Graduation approached and I was interviewing with corporations. I chose Bankers TrustCompany, New York1. They were the only bank that said if I did well in their trainingprogram, and if the Foreign Exchange program needed somebody, that they would let meinterview for the job.

    Fortunately it worked out and I did get a job on Bankers Trusts FX Dealing Desk. The

    environment was more relaxed than elsewhere in the bank and I liked that right away. Youhad to wear a suit jacket to work but no one wore them at the trading desk. Everyone wasdown-to-earth compared to the rest of the bank. It turns out most of the traders had comefrom the banks back office, where they had learned practical skills, like sorting out wiretransfers that had gone wrong. That came in handy because interbank trading requires lotsof wires transfers, and the former bank office clerks, turned forex traders, could quickly sortthat sort of thing out.

    In the dealing room I never mentioned I had an MBA. There were two reasons for that: 1)the best FX traders there, including the Chief Trader, had not attended college, and b)business school had not taught me anything that would help me succeed in this world.

    Q. Did you trade right away?No, it doesnt work like that. I started out as a general assistant in the tradin