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

Re: TS Code for StochRSI



PureBytes Links

Trading Reference Links

> 
> Sometime back there was some discussion about
> Stochastic RSI.  Could anyone out there provide the
> TradeStation code for that indicator?  And perhaps
> some general guidelines on how one might apply it.
> 
> Many thanks,
> 
> Sean Hunt
> 
Sean -

I seem to have several variations; this is one:

------------------------------------
Input:

Price(Close),Length(14),Trailing(14),Periods(3),BuyZone(20),SellZone(80);

Plot1(Summation((RSI(Price,Length)-Lowest(RSI(Price,Length),Trailing))
,Periods)/Summation((Highest(RSI(Price,Length)
           ,Trailing)-Lowest(RSI(Price,Length),Trailing)),Periods)*100
           ,"StochRSI");
Plot2(BuyZone,"BuyZon");
Plot3(SellZone,"SellZon");

if CheckAlert then begin
 if (Plot1 >= Plot3) and (Plot1<Plot1[1]) then
  Alert=TRUE
 else if (Plot1 <= Plot2) and (Plot1 > Plot1[1]) then
  Alert=TRUE;
end;
------------------------------------------------

Here is a ShowMe that I use sometimes as a screen:

-------------------------------------------------
Input: Price(Close),Length(14);

Condition1=StochRSIFunc(Price,14)[1]<20 AND
StochRSIFunc(Price,14)>=20; Condition2=StochRSIFunc(Price,70)>=70 OR
StochRSIFunc(Price,252)>=70;

If Condition1 and Condition2 Then Begin
 Plot1(High,"ShowMe");
If CheckAlert Then Alert=TRUE;
End;
-------------------------------------------------------

and the necessary StochRSIFunc function:

--------------------------------------------------------
Inputs: Price(NumericSeries), Length(NumericSimple) ;
If CurrentBar > Length +3 then begin
Value1 = (RSI(Price,Length)-Lowest(RSI(Price,Length),Length));
Value2 = Value1[0]+Value1[1]+Value1[2];
Value3 =
Highest(RSI(Price,Length),Length)-Lowest(RSI(Price,Length),Length);
Value4 = Value3[0]+Value3[1]+Value3[2]; StochRSIFunc =
100*(Value2/Value4); end;
---------------------------------------------------------

Basically, it is used to enter the pullback of a long term up trend. 
These are the buy rules:

StochRSI 70 and/or StochRSI 252>= 70 and StochRSI 14 crosses over 20
       or
StochRSI 70 >= 50 amd 3 point rise in the past 21 days and StochRSI 
14 crosses over 20.

Rules for shorting have not been established.

I have another version of StochRSI which I would be happy to forward. 
Offhand, I don't recall the real differences, if any.

Since I notice your are a Compuserve member, you can get a complete 
file about the StochRSI as used by John Yurko from the INVFORUM 
library. I'm sorry but I don't recall the file name.




JFB
Shaven Heads Trading
NYC