Hello, this is what I have. Do not remember from where I got it....

// Schaff Trend Cycle
pdsCy=Param("Schaff cycle periods",10,2,40,1); 
pdsSh=Param("Short periods",23,2,60,1);  
pdsLg=Param("Long periods",50,2,200,1); 

MCD=Wilders(C,pdsSh)-Wilders(C,pdsLg);
ST=(MCD-LLV(MCD,pdsCy))/(HHV(MCD,pdsCy)-LLV(MCD,pdsCy))*100;
STC=Wilders(ST,pdsCy/2);

Plot(STC,"Schaff Trend Cycle",colorRed,styleLine|styleThick);

Plot(70,"",colorBlue,1);Plot(30,"",colorYellow,1);

Reply via email to