Schaff Trend Cycle

Schaff Trend Cycle

This Schaff Trend Cycle code is an attempt to recode the same indicator as the one in the platform to be user with simplified creation to build automatic trading strategy through ProOrder or stock screener with ProScreener. Enjoy. Idea and final code come from this discussion: https://www.prorealcode.com/topic/why-cant-use-or-call-some-indicator/

How to use it:

The Schaff Trend Cycle (STC) indicator, invented by Dough Schaff, measures the overbought and oversold market conditions. This is an improved version of the traditional MACD indicator widely used by traders.
The STC works by detecting trends, uses exponential moving averages (EMAs), but includes a cycle to include trends in currency sequences.

The STC indicator combines the MACD with a slow stochastic indicator and provides an early signal to recognize trends.

The STC indicator oscillates between 0 and 100.
Less than 20 readings are considered oversold. Over 80 readings are considered overbought.

 

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. oraclus • 08/03/2017 #

    Merci il lui ressemble bcp

  2. juanj • 08/03/2017 #

    Think this is something we can experiment with in the ‘universal’ strategy along with the Bollinger and RSI2.

    https://www.prorealcode.com/prorealtime-trading-strategies/universal-strategy/

  3. ggolfet • 08/03/2017 #

    Hello Francesco,
    thanks for the code. Now I can do backtests on this indicator. I’m testing a weekly strategy and noticed that the parameters which fit most stock indexes do not work with volatile stock markets or commodities. Does every market have a different “cycle”, so you need to fit the indicator to every market (risking overfitting)?
    For weekly chart I use:
    TCLen = 25
    MA1 = 30
    MA2 = 60.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+4 more likes

Related users ' posts
Kris75 Hi Bolsatrilera, I love this indicator! Thanks; => did you develop a strategy around...
Lotech123 Thanks for this indicator. Working on a 3 M timeframe with the DJI, it can produce some inte...
JSTAR PRODUCTIONS Hi there, I downloaded the Indicator but the indicator does not show up on my charts. Am...
JSTAR PRODUCTIONS Hi, Worked it out. Thanks
Gianluca Hello there is a new version, is it possible to translate it? https://www.tradingview.com...
christophe11560 bonjour, PRT me demande de réduire la période d'adaptive cyber Cycle suite à de fort ralent...
Pietro Fontana christophe11560, i've coded this a long time ago for a different version of the PRT, i'm not...
CavalierDeCesDames Bonjour Nicolas, Thanks for your use full job. I tried this indicator on a shorter timefram...
Nicolas You are welcome. I'm glad you like it.
Bolbo It does not appear over the price indicator on V11. Thanks in advance.
Nicolas
7 years ago
Loop Hi All! Would it be possible to have the same indicator with the MACD calculated with the DE...
Nicolas Why not, but do you think it would make such a noticeable difference?
Loop Good question Nicolas! That's why I was curious to check it! MACD based on DEMA is usually m...
supertiti Thanks you so much Lucassen
dreif123 hi, copied the above code, not working on 10.3 the system says "return can only be used at ...
LUCASSEN Hallo , i have no problem , and i have the same versie 10.3, maybe you can ask Nicolas, tha...
Nicolas
7 years ago
Nicolas Para cambiar los colores del histograma, deben usarse las variables r, gyb entre las líneas ...
leofib Hello, I was looking for a MACD Histogram with red and green bars according to the value of ...
Helgart Hi, it's great to have this option of having a histogram coloured based on rising or fall...
Abz  hi , you need to add the indicator from the "price" menu in chart
Francesco Thank you Abz!
phanz Hi Nicolas, this is an interesting strategy. For long position, I assume entry when prices ...
SAM
7 years ago
Nicolas
7 years ago
Jurik MACD
Jurik MACD
1
Indicators
ramonjp Hi Nicolas, this sentence is correct?? ftmp0 = (1-falpha)*price + falpha*tmp0[1] I thi...
bolsatrilera
7 years ago
MACD MIRROR
MACD MIRROR
0
Indicators
Nicolas
7 years ago
soulintact Thank you very much Nicolas for this great indicator. I have tried to apply it to a trading ...
laitus No funciona este indicador ¿¿?? ¿Alguien sabe por qué?
Nicolas
8 years ago
ALMA MACD
ALMA MACD
7
Indicators
Arnaud HALVICK Great indicator, thank you!
JMat45 Hi Nicolas, just reviewing this indicator and noticed that you have double assigned the vari...
Nicolas That would not make any difference because the code is read from top to bottom.
MikeGC I don't know if you have used the variables a and b to optimise the parameters for the Super...
gianpiero75 I have not optimized, I multiplied the parameters for 6 (5,8), to use them on the 4  hoursTF...
bertrandpinoy bonjour Mike j utilise TrendChaser V2.0 et quand il prend position cela ne programme pas le ...
Pelle Nævestad Thanks Nicolas, this is a keeper!
Chicane23 Hi, when uploaded the WAE isnt showing histogram; only line. Is there a way to modify?
Nicolas Change the way the lines are displayed in the indicator settings window : histogram, lines, ...
Bard Did anyone get an error with lines 25 and 26?
Nicolas
9 years ago
ZeroLag MACD
ZeroLag MACD
13
Indicators
sam00075 Hi Nicolas, can you please upload a version with TEMA, so those who don't know how to code c...
Nicolas Use the MACD code here: https://www.prorealcode.com/topic/standard-prt-code-for-macd/#post-1...
Alai-n Afin d'avoir l'Histogramme Macd il faut rajouter ligne18 : HistogrammeMacd = ZeroLagMACD - S...
Nicolas
9 years ago
Nicolas Just replace the last line with this : RETURN dm as "Volume Weighted MACD", masignal as "Si...
thomas2004ch I happen to read this article. I would say the formel 'd = maslow - mafast' could be inverse...
Nicolas You are right! but still the picture is looking good. The formula is inverted! dunno why :) ...
Nicolas
9 years ago

Top