Thank you for your answer Nicolas.
I had already found indicators that You mention, but both of them draw a different graphic compared of Schaff Trend Cycle that comes with Prorelatime 10.3.
I asked to Prorealtime support service and I’m waiting for an answer.
However, in the meantime I found an interesting article here: http://traders.com/Documentation/FEEDbk_docs/2010/04/close.html
In the article, the calculation method of STC is explained like this:
*** Code Start ***
SCHAFF TREND CYCLE EASYLANGUAGE CODE
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;
*** Code end ***
I tried to translate it, but I have 2 problems:
- In this formula: XMAC=MACD (c,MA1,MA2), the parameter c is not documented. It seems to be the cycle, but what is its default value?
- CurrentBar is a value that must be present in ProBuilder also. Maybe is it BarIndex?
Thanks.