Schaff - EasyLanguage Programming | futures io social day trading
futures io futures trading


Schaff
Updated: Views / Replies:4,568 / 7
Created: by kiasom Attachments:3

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Schaff

  #1 (permalink)
Elite Member
Stockholm
 
Futures Experience: Intermediate
Platform: MC
Favorite Futures: fx
 
Posts: 16 since Apr 2010
Thanks: 139 given, 22 received

Schaff

Found the Schaff Trend Cycle in EasyLanguage, as released by Mr. Schaff himself.
It's a very fast reacting indicator, which might be valuable in a MTF system.


From the documentation:
"What is the STC?
Schaff Trend Cycle (STC) is a popular indicator commonly used to identify or confirm price direction and market turning points. It was created by Doug Schaff and is based on the assumption that trends accelerate and decelerate in a cyclical pattern that can reflect the dominant price cycle of any asset in any timeframe.
.
Schaff created the STC after trying to resolve the discrepancies that he observed between two widely used methods of determining trend:
􀂃 Moving Average Convergence and Divergence (MACD), the movement of two moving averages away from and towards each other.
􀂃 Price Cycles, the direction of the dominant price cycle as shown by various Smoothed Stochastics.
The STC is created by running a MACD Line (the difference between two exponential moving averages) through a Double Smoothed Stochastic algorithm. The resulting oscillator combines the benefits of trend and momentum indicators. In trending markets it moves between 0 and 100, rising when an uptrend is accelerating and falling when a downtrend is accelerating.
In sideways markets the STC is used as a range-trading indicator and can be interpreted similarly to standard oscillators. That is, the STC can signal oversold conditions when it turns up from below the 25-Line, and overbought conditions when it turns down from above the 75-Line.
Why is the STC important?
The STC has several benefits compared to its component indicators. It produces less whipsaw and fewer false signals than the MACD or Price Cycle oscillators. By combining the two, Schaff created an indicator that is more accurate and more adaptive than either original indicator is by itself.
The STC usually turns up or down earlier than the MACD crossover, highlighting prospective trend changes sooner. In sideways markets, the STC generally travels in a clear path from under 25 to over 75, making it easier to interpret than the MACD which has no maximum or minimum values.
The STC is an improvement compared to Cycle Oscillators which can give out wrong signals when 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 40-bar Cycle. At those times a Cycle Oscillator set to the 20-bar cycle can give false signals, turning down in an accelerating bull market or rising into a rapidly declining bear market.
The STC adapts when the dominant cycle lengthens or shortens, and so often it identifies cycle 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 an extended bullish move, until the trend slows and prices begin a sideways or downwards retracement after the longer cycle peaks. Likewise, in strong bear markets the STC usually falls quickly to 0 and can remain there until trend slows and prices drop, confirming that a longer price cycle low has occurred."

There is the indicator:
 
Code
{*******************************************************************
Description : This Indicator plots the Schaff Trend Cycle
Provided By : FX-Strategy, Inc. (c) Copyright 1999
********************************************************************}
Inputs: TCLen(10), MA1(23), MA2(50);

plot1(_SchaffTC(TCLen,MA1,MA2),"Schaff_TLC");
plot2(25);
plot3(75);
And the function:
 
Code
{*******************************************************************
Description : This is the Schaff Trend Cycle function
Provided By : FX-Strategy.com (c) Copyright 1999
********************************************************************}

Inputs: TCLen(NumericSimple), MA1(NumericSimple), MA2(NumericSimple);
Variables: XMac(0), Frac1(0), PF(0), PFF(0), Frac2(0), Factor(.5);

{Calculate a MACD Line}
XMac = MACD(c,MA1,MA2) ;

{1st Stochastic: Calculate Stochastic of a MACD}
Value1 = Lowest(XMac, TCLen);
Value2 = Highest(XMac, TCLen) - Value1;

{%FastK of MACD}
Frac1 = IFF(Value2 > 0, ((XMac - Value1) / Value2) * 100, Frac1[1]);

{Smoothed calculation for %FastD of MACD}
PF = IFF(CurrentBar<=1, Frac1, PF[1] + (Factor * (Frac1 - PF[1])));

{2nd Stochastic: Calculate Stochastic of Smoothed Percent FastD, ?PF?, above.}
Value3 = Lowest(PF, TCLen);
Value4 = Highest(PF, TCLen) - Value3;

{%FastK of PF}
Frac2 = IFF(Value4 > 0, ((PF - Value3) / Value4) * 100, Frac2[1]);

{Smoothed calculation for %FastD of PF}
PFF = IFF(CurrentBar<=1, Frac2, PFF[1] + (Factor * (Frac2 - PFF[1])));

{The STC function is the %FastD of PF}
_SchaffTC= PFF;

Reply With Quote
The following 6 users say Thank You to kiasom for this post:
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Stockholm
 
Futures Experience: Intermediate
Platform: MC
Favorite Futures: fx
 
Posts: 16 since Apr 2010
Thanks: 139 given, 22 received


Here is the documentation document. With some good explanations.

Attached Thumbnails
Schaff-schaff-indy.pdf  
Reply With Quote
The following 2 users say Thank You to kiasom for this post:
 
  #4 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 176 received

Schaff Trend Cycle for NT

Has anyone started code to have this in NT ??

Reply With Quote
 
  #5 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,218 since Jun 2009
Thanks: 628 given, 6,316 received
Forum Reputation: Legendary

bottom of page
Schaff Trend Cycle Metatrader Indicator | Great Trading Systems

Reply With Quote
The following 3 users say Thank You to cory for this post:
 
  #6 (permalink)
Elite Member
Southern California
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: TF
 
randyjb's Avatar
 
Posts: 68 since Jun 2009
Thanks: 442 given, 29 received

Schaff Trend Cycle

SchaffTrendCycle.zipHere it is for NT ..6.5

Reply With Quote
The following 2 users say Thank You to randyjb for this post:
 
  #7 (permalink)
Membership Temporarily Revoked
us
 
Futures Experience: Intermediate
Platform: nt,ts
 
Posts: 45 since Dec 2010
Thanks: 60 given, 28 received

re

anybody got the version with the arrows of buy/sell? would appreciate it.

Reply With Quote
 
  #8 (permalink)
Elite Member
Palo Alto, CA
 
Futures Experience: Intermediate
Platform: MultiCharts, NSDT, Python
Broker/Data: IB/IQfeed
Favorite Futures: E6, ES
 
Posts: 10 since Apr 2010
Thanks: 122 given, 13 received

Multicharts Schaff Signal Code

Okay here is the code to convert this Schaff Indicator to a Signal.

This is my first attempt at this, so if this is wrong, or needs improvement do let me know.

 
Code
{*************************************************  ******************
Description : This is the Schaff Trend Cycle function
Provided By : FX-Strategy.com (c) Copyright 1999
**************************************************  ******************}

[IntrabarOrderGeneration = false]

Inputs: Price( Close), TCLen(10), MA1(145), MA2(240);
Variables: XMac(0), Frac1(0), PF(0), PFF(0), Frac2(0), Factor(.5);

{Calculate a MACD Line}
XMac = MACD(c,MA1,MA2) ;

{1st Stochastic: Calculate Stochastic of a MACD}
Value1 = Lowest(XMac, TCLen);
Value2 = Highest(XMac, TCLen) - Value1;

{%FastK of MACD}
Frac1 = IFF(Value2 > 0, ((XMac - Value1) / Value2) * 100, Frac1[1]);

{Smoothed calculation for %FastD of MACD}
PF = IFF(CurrentBar<=1, Frac1, PF[1] + (Factor * (Frac1 - PF[1])));

{2nd Stochastic: Calculate Stochastic of Smoothed Percent FastD, ?PF?, above.}
Value3 = Lowest(PF, TCLen);
Value4 = Highest(PF, TCLen) - Value3;

{%FastK of PF}
Frac2 = IFF(Value4 > 0, ((PF - Value3) / Value4) * 100, Frac2[1]);

{Smoothed calculation for %FastD of PF}
PFF = IFF(CurrentBar<=1, Frac2, PFF[1] + (Factor * (Frac2 - PFF[1])));

{******************Buy and Sell Signals******************}

If PFF crosses above 99 then 
begin
	buy ("SchaffFC Long") this bar at close;
end
else if PFF crosses below 1 then 
begin
	sellshort ("SchaffFC Short") this bar at close;
end
else if PFF crosses below 99 then 
begin
	sell ("SchaffFC Sell") this bar at close;
end
else if PFF crosses above 1 then 
begin
	buytocover ("SchaffFC Buy") this bar at close;
end;

Reply With Quote
The following 3 users say Thank You to jaikumarm for this post:

Reply



futures io > > > > > Schaff

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Schaff Trend Cycle Indicator cbritton ThinkOrSwim Programming 21 July 26th, 2017 10:10 AM


All times are GMT -4. The time now is 04:37 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-15 in 0.11 seconds with 20 queries on phoenix via your IP 54.234.255.29