PureBytes Links
Trading Reference Links
|
Lance, I think I am having problems getting replies through list. I changed
your code as follows and ran it through a custom list of the S&P 500. Ran
fine through WS. If this is not the desired result describe what output is
required I will take another look.
Duke
Input: MakeFile (True), {Set to true to create .csv file}
File("C:\Desktop\RelStrength.CSV") ;
Vars: ThreeMonth (00),
SixMonth (00),
NineMonth (00),
TwelveMonth(00),
RS (00) ;
ThreeMonth = ((Close / Close[60] ) - 1) * 100 ; {Rate of Change%}
SixMonth = ((Close / Close[120]) - 1) * 100 ; {Rate of Change%}
NineMonth = ((Close / Close[180]) - 1) * 100 ; {Rate of Change%}
TwelveMonth = ((Close / Close[240]) - 1) * 100 ; {Rate of Change%}
{Assign weights to ROC look back periods}
RS = (ThreeMonth * .4) + (SixMonth * .2) + (NineMonth * .2) +
(TwelveMonth * .2) ;
Plot1(RS, "RS.ibd");
If LastBarOnChart and MakeFile then begin
FileAppend(File, Text(GetSymbolName, ", ", NumToStr(RS, 2)) +
NewLine) ;
End;
|