Below is a True Relative Strength Indicator. It returns the Relative Strength by comparing the ROC of the DIA and the current stock. Set N to equal the period of ROC indicator in the Parameters tab. You must include the index symbol that you are comparing your stocks with, in this case I used the symbol DIA.
The parameters tab is as follows:
Name Type Default Min Max
StockCode Symbol DIA 0 0
Indi Indicator ROC(90)
N Double 90 1 1000
The code is:
A1:=(CLOSE-REF(CLOSE,N))/REF(CLOSE,N)*100;
V1:= FML(Indi),HighQuality;
V2:=FML(StockCode, Indi),HighQuality;
TRS:A1/V2;
- enjoy
