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

RSI: there is more



PureBytes Links

Trading Reference Links

Alex,

Thanks for the following code segment.

Actually there is more , which I was unable to express clearly. But I think I have it now.

IF the trend as per the RSI is down, then the RSI rallies and moves above 40, then it dips but stays above 40, the trend changes to sideways.

IF the trend as per the RSI is up, then the RSI falls and moves below 60, then it rallies but stays below 60, the trend changes to sideways.

The sideways trend suggests that based on chart patterns / averages, etc we can take signals on either side.

Also, I visited your web site: unicorn.us.com. Lucky me. On my desktop, TS2000i was not showing strategy performance reports. But I read an article on your site to download a DLL. I did that and Voila! the report is now available. Thanks for this.

Sudarshan Sukhani


[
That doesn't sound hard.  What follows comes from the top of my
head, untested.  Start with:

vars: rsi0(0), trend(0);
rsi0 = rsi(price, length);
trend = 0;

>UPTREND: The RSI must move above 60. This should happen in the last
>x bars. After this movement, the RSI may fall, but it should remain
>above 40.

if highest(rsi0, x) >= 60 then begin
   if lowest(rsi0, highestbar(rsi0, x)) > 40 then trend = 1; {uptrend}
end;

>DOWNTREND: The RSI must move below 40. This should happen in the
>last x bars. After this movement, the RSI may rally, but it should
>remain below 60.

if lowest(rsi0, x) <= 40 then begin
   if highest(rsi0,lowestbar(rsi0,x)) < 60 then trend = -1; {downtrend}
end;

>SIDEWAYS: If the RSI is not in an uptrend / downtrend then it is
>sideways.

The variable 'trend' will be 0 (sideways) if it wasn't set by one of
the conditions above
]