[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: RCI Study



PureBytes Links

Trading Reference Links

To everyone that requested text coding due to an TS returning an error
message for an attempt to access an array out of bounds:

I use TS 2000i and developed this for institutional TS users in Japan
several years ago. There were no reports of any problems nor have I ever had
any problems. Must be TS7...

Here's the text:

FUNCTION:
Input: Length(NumericSimple);
Vars: PriceRanking(0), Price(0), RC(0);

RC = 0;
For PriceRanking = 1 to Length begin
	RC = RC + ( Power(  ( NthHighestBar( PriceRanking,Close,Length ) + 1 ) -
PriceRanking, 2) );
End;

if  (Length * (Length - 1) * (Length +1) )  > 0 then
		RCI = 100 * (  1 - (RC * Length) / ( Length * (Length - 1) * (Length
+1) ) );


INDICATOR

Inputs:	Length(6),AvgLen(3) ;

Plot1(RCI(Length),"RCI    ") ;
Plot2(XAverage(RCI(Length),AvgLen),"RCI Sig") ;
Plot3(0, "Zero   ") ;

Regards


---