Schaff Trend Cycle Indicator - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


Schaff Trend Cycle Indicator
Updated: Views / Replies:10,387 / 21
Created: by cbritton Attachments:4

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
 4  
 
Thread Tools Search this Thread
 

Schaff Trend Cycle Indicator

  #11 (permalink)
Trading Apprentice
Haifa, Israel
 
Futures Experience: Intermediate
Platform: MT4, Thinkorswim
Favorite Futures: options, forex, EUR/JPY
 
Posts: 5 since Jun 2010
Thanks: 0 given, 1 received


HectorPriamedes View Post
Hey never mind, I solved it. thanks anyways guys.

Would you be willing to share the results if they are good?

Thank you

p.s. I tried to reply to your PM and was denied due to having less than 5 posts.


Last edited by nlenz; October 25th, 2012 at 08:29 PM.
Reply With Quote
 
  #12 (permalink)
Elite Member
OMAHA, NEBRASKA
 
Futures Experience: Intermediate
Platform: MULTICHARTS + TOS
Broker/Data: TRADESTATION + TOS
Favorite Futures: FUTURES
 
HectorPriamedes's Avatar
 
Posts: 23 since Sep 2011
Thanks: 29 given, 30 received

Solution!

The results are terrible thus far. However, I am willing to share in hopes that someone can improve on my work, and share back, that way we can all benefit.

As it is now, there is too much whipsawing with the Schaff and And TOS' backtesting format is not the best. I feel like the exit criteria should not necessarily be a reversal in the SCHAFF Cycle but maybe something else. In any event you play with it and post improvements. Here is how to send a short order when the SCHAFF fires short.

Add the following as a STRATEGY (not as a study)
Begin code:



input TCLen = 10;
input MA1 = 23;
input MA2 = 50;
def factor = 0.5;
input AverageType = {SMA, default EMA};
input TradeSize = 1;
input ShaffUpperLimit = 80;


# calculate the MACD
rec XMac = MACD(MA1, MA2, 9, AverageType).Value;

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

# %FastK of MACD
rec Frac1 = if Value2 > 0 then ((XMac - Value1) / Value2) * 100 else Frac1[1];

# smoothes calcuation for %FastD of MACD
rec PF = CompoundValue(1, PF[1] + (factor * (Frac1 - PF[1])), Frac1);

# 2nd stochastic: calculate stochastic of smoothed percent FastD, 'PF', above.
rec Value3 = Lowest(PF, TCLen);
rec Value4 = Highest(PF, TCLen) - Value3;

# %FastK of PF
rec Frac2 = if Value4 > 0 then ((PF - Value3) / Value4) * 100 else Frac2[1];

# smoothed calculation for %FastD of PF
rec PFF = CompoundValue(1, PFF[1] + (factor * (Frac2 - PFF[1])), Frac2);


def SchaffOutput= PFF;

def condition1 = SchaffOutput[1] < SchaffOutput[2];

def condition2 = SchaffOutput[2] > ShaffUpperLimit;


def x0 = condition1 and condition2;


AddOrder(OrderType.SELL_AUTO, x0, close[0], TradeSize, tickcolor = GetColor(0), arrowcolor = GetColor(0));



End Code.

That's for shorting. Go through the code and flip it for longs. I am still messing with the short side.

Please post improvements!

Reply With Quote
 
  #13 (permalink)
Trading Apprentice
Haifa, Israel
 
Futures Experience: Intermediate
Platform: MT4, Thinkorswim
Favorite Futures: options, forex, EUR/JPY
 
Posts: 5 since Jun 2010
Thanks: 0 given, 1 received



HectorPriamedes View Post
The results are terrible thus far. However, I am willing to share in hopes that someone can improve on my work, and share back, that way we can all benefit.

As it is now, there is too much whipsawing with the Schaff and And TOS' backtesting format is not the best.

Please post improvements!

Thank you. I am not surprised, because many indicators which look great in theory fail when subjected to backtests.

Reply With Quote
 
  #14 (permalink)
Trading Apprentice
Carlsbad CA USA
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: CL
 
Posts: 2 since Mar 2015
Thanks: 0 given, 0 received

Schaff Trend Cycle

Hello Everyone!
I'm new hear.
I'm looking for the TOS code for the Schaff Trend Cycle indicator. No tweaks, no changes. I found one file / attachment called STCSTUDY.ts, but it wants to open in a media player. ??? I believe the thinkscript is just straight text.
Can anyone help? THANKS IN ADVANCE

Reply With Quote
 
  #15 (permalink)
1.Fibs 2.??? 3.Profit
Puerto Rico
 
Futures Experience: Intermediate
Platform: thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: ES
 
rmejia's Avatar
 
Posts: 384 since Oct 2010
Thanks: 3,597 given, 421 received


jamesnettle View Post
Hello Everyone!
I'm new hear.
I'm looking for the TOS code for the Schaff Trend Cycle indicator. No tweaks, no changes. I found one file / attachment called STCSTUDY.ts, but it wants to open in a media player. ??? I believe the thinkscript is just straight text.
Can anyone help? THANKS IN ADVANCE

Open a chart in thinkorswim, then go to Edit Studies and Strategies and select the Import on the bottom left, then select the file. You can also right click the file, Open With and select Notepad, copy the code, then in the Edit Studies and Strategies select New... and paste the code there.

Attached Thumbnails
Schaff Trend Cycle Indicator-import.png  
Reply With Quote
 
  #16 (permalink)
Trading Apprentice
Haifa, Israel
 
Futures Experience: Intermediate
Platform: MT4, Thinkorswim
Favorite Futures: options, forex, EUR/JPY
 
Posts: 5 since Jun 2010
Thanks: 0 given, 1 received


jamesnettle View Post
Hello Everyone!
I'm new hear.
I'm looking for the TOS code for the Schaff Trend Cycle indicator. No tweaks, no changes. I found one file / attachment called STCSTUDY.ts, but it wants to open in a media player. ??? I believe the thinkscript is just straight text.
Can anyone help? THANKS IN ADVANCE

Hi James,

It won't work by double clicking. What you have to do is from within the TOS application open a chart, then in the "studies menu"->"edit studies..." a window will open and on the lower left of that window click "Import..." and finally navigate to the file on your computer from that TOS window and click "Open". After that the study will be available in the list of studies for usage.

Reply With Quote
 
  #17 (permalink)
Trading Apprentice
Carlsbad CA USA
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: CL
 
Posts: 2 since Mar 2015
Thanks: 0 given, 0 received


nlenz View Post
Hi James,

It won't work by double clicking. What you have to do is from within the TOS application open a chart, then in the "studies menu"->"edit studies..." a window will open and on the lower left of that window click "Import..." and finally navigate to the file on your computer from that TOS window and click "Open". After that the study will be available in the list of studies for usage.

Sir, you are a gentleman and a scholar. Followed your instructions and all went well.
Thank you. JIM

Reply With Quote
 
  #18 (permalink)
Trading Apprentice
Haifa, Israel
 
Futures Experience: Intermediate
Platform: MT4, Thinkorswim
Favorite Futures: options, forex, EUR/JPY
 
Posts: 5 since Jun 2010
Thanks: 0 given, 1 received


jamesnettle View Post
Sir, you are a gentleman and a scholar. Followed your instructions and all went well.
Thank you. JIM

You are welcome - glad it worked out. And thank you for the compliment

Reply With Quote
 
  #19 (permalink)
Trading Apprentice
Sydney NSW Australia
 
Futures Experience: Beginner
Platform: Stock pro
Favorite Futures: Gold
 
Posts: 3 since Jul 2017
Thanks: 0 given, 0 received

Schaff Trend Cycle

Hi - hoping someone can help me out with this code below -
Question In "rec Frac1 = if Value2 > 0 then ((XMac - Value1) / Value2) * 100 else Frac1[1];
What is "Frac1[1]"
Question again in "rec PF = CompoundValue(1, PF[1] + (factor * (Frac1 - PF[1])), Frac1);
What is PF[1]? and also same with Frac2[1] and PFF[1]?????? where do I get those values from? does the bracket [] just mean default the Frac1 value to 1 if Value2<=0 and so on with the others?

Would appreciate some assistance with this
Will V L

input TCLen = 10;
input MA1 = 23;
input MA2 = 50;
def factor = 0.5;
input AverageType = {SMA, default EMA};
input TradeSize = 1;
input ShaffUpperLimit = 80;


# calculate the MACD
rec XMac = MACD(MA1, MA2, 9, AverageType).Value;

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

# %FastK of MACD
rec Frac1 = if Value2 > 0 then ((XMac - Value1) / Value2) * 100 else Frac1[1];

# smoothes calcuation for %FastD of MACD
rec PF = CompoundValue(1, PF[1] + (factor * (Frac1 - PF[1])), Frac1);

# 2nd stochastic: calculate stochastic of smoothed percent FastD, 'PF', above.
rec Value3 = Lowest(PF, TCLen);
rec Value4 = Highest(PF, TCLen) - Value3;

# %FastK of PF
rec Frac2 = if Value4 > 0 then ((PF - Value3) / Value4) * 100 else Frac2[1];

# smoothed calculation for %FastD of PF
rec PFF = CompoundValue(1, PFF[1] + (factor * (Frac2 - PFF[1])), Frac2);

Reply With Quote
 
  #20 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


wvl1211,

take a look at chapter 1 in the TOS Learning Center, it explains what [1] will do:
Learning Center - Chapter 1. Defining Variables

Regards,

ABCTG


wvl1211 View Post
Hi - hoping someone can help me out with this code below -
Question In "rec Frac1 = if Value2 > 0 then ((XMac - Value1) / Value2) * 100 else Frac1[1];
What is "Frac1[1]"
Question again in "rec PF = CompoundValue(1, PF[1] + (factor * (Frac1 - PF[1])), Frac1);
What is PF[1]? and also same with Frac2[1] and PFF[1]?????? where do I get those values from? does the bracket [] just mean default the Frac1 value to 1 if Value2<=0 and so on with the others?

Would appreciate some assistance with this
Will V L


Reply With Quote

Reply



futures io > > > > > Schaff Trend Cycle Indicator

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
trend channel indicator available? subterfuge NinjaTrader Programming 22 August 28th, 2015 04:30 AM
Trend vs Cycle Trading shzhning Traders Hideout 10 February 19th, 2011 04:35 AM
Schaff kiasom EasyLanguage Programming 7 January 20th, 2011 03:17 AM
Trend Mode or Cycle Mode? gregid The Elite Circle 10 April 20th, 2010 06:52 PM
Counter trend Indicator emini_Holy_Grail Traders Hideout 15 February 13th, 2010 01:27 PM


All times are GMT -4. The time now is 01:01 PM.

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-16 in 0.16 seconds with 20 queries on phoenix via your IP 54.91.38.173