Schaff Trend Cycle - BUG
Schaff Trend Cycle - BUG
In reviewing the latest version of Stocks & Commodities magazine, on page 96, the EasyLanguage code was provided for the Schaff Trend Cycle. Unfortunately, the code has a bug on line 2.
Plot1(_SchaffTC(TCLen,MA1,MA2), “Schaff_TLC”); The "_SchaffTC" code will not pass through the VERIFY command of TradeStation. Does anyone have any suggestions on how to resolve this?
Thanks.
TIM
Plot1(_SchaffTC(TCLen,MA1,MA2), “Schaff_TLC”); The "_SchaffTC" code will not pass through the VERIFY command of TradeStation. Does anyone have any suggestions on how to resolve this?
Thanks.
TIM
-
- Posts: 16
- Joined: Mon Jan 18, 2010 3:22 pm
Re: Schaff Trend Cycle - BUG
Thank you for your comment. We will try to check into it.
-
- Posts: 16
- Joined: Mon Jan 18, 2010 3:22 pm
Re: Schaff Trend Cycle - BUG
Tim,
Apparently, the EasyLanguage code on page 96 of the April 2010 issue in the article "The Schaff Trend Cycle" may not work in the latest version of TradeStation. Please contact TradeStation technical support (http://www.TradeStation.com or https://www.tradestation.com/Discussion ... rum_ID=213) for assistance. They may be able to offer an updated version of this code.
Apparently, the EasyLanguage code on page 96 of the April 2010 issue in the article "The Schaff Trend Cycle" may not work in the latest version of TradeStation. Please contact TradeStation technical support (http://www.TradeStation.com or https://www.tradestation.com/Discussion ... rum_ID=213) for assistance. They may be able to offer an updated version of this code.
Re: Schaff Trend Cycle - BUG
Thanks, I spoke with TradeStation EasyLanguage team and they said that is was a BUG in the code not a TradeStation issue.
-
- Posts: 16
- Joined: Mon Jan 18, 2010 3:22 pm
Re: Schaff Trend Cycle - BUG
Tim,
You are correct that there were some errors in the EasyLanguage code that appeared on page 96 of the April 2010 issue of S&C. Thank you for letting us know of the problem.
The correct code will be posted at our website in the Subscriber's Area at http://technical.traders.com/sub/sublogin.asp as well as in our archived online version of the article at http://www.traders.com/Documentation/FE ... close.html, and also will be mentioned as a correction notice in the next issue of S&C.
You are correct that there were some errors in the EasyLanguage code that appeared on page 96 of the April 2010 issue of S&C. Thank you for letting us know of the problem.
The correct code will be posted at our website in the Subscriber's Area at http://technical.traders.com/sub/sublogin.asp as well as in our archived online version of the article at http://www.traders.com/Documentation/FE ... close.html, and also will be mentioned as a correction notice in the next issue of S&C.
Re: Schaff Trend Cycle - BUG
I could not find the code fix, has this fix been updated? Tim, were you able to make it work in TS. I'm getting the same error message
"This word has already been defined" .
"This word has already been defined" .
Re: Schaff Trend Cycle - BUG
Has the code been corrected for the SchaffTrendCycle code for TradeStation that was part of the April 2010 issue? I get an error on line 5 Inputs:TCLen(NumericSimple),MA1(NumericSimple),MA2(NumericSimple); I get an error "This word has already been defined." And I get a warning "TCLen is an input, redefinition".
Any help would be greatly appreciated.
Thanks
Ash
Any help would be greatly appreciated.
Thanks
Ash
Re: Schaff Trend Cycle - BUG
Has the bug fix for Schaff Trend cycle posted for TS?
Thanks
Thanks
-
- Posts: 17
- Joined: Mon Jan 11, 2010 4:22 pm
Re: Schaff Trend Cycle - BUG
Sorry. The best information we have on the bug is to redirect your question to Tradestation here:
https://www.tradestation.com/Discussion ... rum_ID=213
If they have posted a fix please re-post it here that would be greatly appreciated.
https://www.tradestation.com/Discussion ... rum_ID=213
If they have posted a fix please re-post it here that would be greatly appreciated.
-
- Posts: 16
- Joined: Mon Jan 18, 2010 3:22 pm
Re: Schaff Trend Cycle - BUG
The corrected EasyLanguage code for the Schaff trend cycle is as follows:
A correction notice ran in the July 2010 issue of STOCKS & COMMODITIES and the corrected code was posted in our Subscriber Area at http://technical.traders.com/sub/Codes/ ... Twomey.asp.
Incidentally, TradeStation Tech Support explains about the above EasyLanguage code that there are two sections to this code: the first three lines set up an indicator, and the rest is a function called ‘_SchaffTC’.
Please let us know if you have further difficulties.
For your interest only, a reader contributed some further discussion about this code in our June 2010 Letters to the Editor column in STOCKS & COMMODITIES. You will find it here: http://www.traders.com/Documentation/FE ... tters.html
Code: Select all
Inputs: TCLen (10), MA1 (23), MA2 (50);
Plot1(_SchaffTC(TCLen,MA1,MA2), "Schaff_TLC");
Plot2(25);
Plot3 (75);
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;
{%Fast K of MACD}
Frac1=IFF(Value2 > 0, ((XMAC-Value1)/Value2) * 100,Frac1[1]);
{Smoothed Calculation for % Fast D of MACD}
PF=IFF(CurrentBar <=1,Frac1,PF[1]+ (Factor * (Frac1-PF[1])));
{2nd Stochastic: DCalculate Stochastic of smoothed Percent Fast D, 'PF', above}
Value3=Lowest(PF,TCLen);
Value4=Highest(PF,TCLen)-Value3;
{% of Fast K of PF}
FRAC2=IFF(Value4 > 0,((PF - Value3)/Value4) * 100,Frac2[1]);
{Smoothed Calculation for %Fast D of PF}
PFF=IFF(CurrentBar<=1,Frac2,PFF[1]+(Factor * (Frac2-PFF[1])));
{The STC Function is the % Fast D of PF}
_SchaffTC=PFF;
A correction notice ran in the July 2010 issue of STOCKS & COMMODITIES and the corrected code was posted in our Subscriber Area at http://technical.traders.com/sub/Codes/ ... Twomey.asp.
Incidentally, TradeStation Tech Support explains about the above EasyLanguage code that there are two sections to this code: the first three lines set up an indicator, and the rest is a function called ‘_SchaffTC’.
Please let us know if you have further difficulties.
For your interest only, a reader contributed some further discussion about this code in our June 2010 Letters to the Editor column in STOCKS & COMMODITIES. You will find it here: http://www.traders.com/Documentation/FE ... tters.html
-
- Posts: 1
- Joined: Fri Jul 20, 2012 11:13 am
Re: Schaff Trend Cycle - BUG
Newbie here. Thank you for the updateKWasserman S&C wrote:The corrected EasyLanguage code for the Schaff trend cycle is as follows:
Code: Select all
Inputs: TCLen (10), MA1 (23), MA2 (50); Plot1(_SchaffTC(TCLen,MA1,MA2), "Schaff_TLC"); Plot2(25); Plot3 (75); 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; {%Fast K of MACD} Frac1=IFF(Value2 > 0, ((XMAC-Value1)/Value2) * 100,Frac1[1]); {Smoothed Calculation for % Fast D of MACD} PF=IFF(CurrentBar <=1,Frac1,PF[1]+ (Factor * (Frac1-PF[1]))); {2nd Stochastic: DCalculate Stochastic of smoothed Percent Fast D, 'PF', above} Value3=Lowest(PF,TCLen); Value4=Highest(PF,TCLen)-Value3; {% of Fast K of PF} FRAC2=IFF(Value4 > 0,((PF - Value3)/Value4) * 100,Frac2[1]); {Smoothed Calculation for %Fast D of PF} PFF=IFF(CurrentBar<=1,Frac2,PFF[1]+(Factor * (Frac2-PFF[1]))); {The STC Function is the % Fast D of PF} _SchaffTC=PFF;
A correction notice ran in the July 2010 issue of STOCKS & COMMODITIES and the corrected code was posted in our Subscriber Area at http://technical.traders.com/sub/Codes/ ... Twomey.asp.
Incidentally, TradeStation Tech Support explains about the above EasyLanguage code that there are two sections to this code: the first three lines set up an indicator, and the rest is a function called ‘_SchaffTC’.
Please let us know if you have further difficulties.
For your interest only, a reader contributed some further discussion about this code in our June 2010 Letters to the Editor column in STOCKS & COMMODITIES. You will find it here: http://www.traders.com/Documentation/FE ... tters.html
Who is online
Users browsing this forum: No registered users and 6 guests