RSI REVERSE function
Author: marchus
Creation Date: 10/30/2008 12:54 PM
profile picture

marchus

#1
Hi

I saw the site to bulkowski. Where he explaines a RSI trading strategy. What i was wondering if its possible to not sell ris when it passes 80 but when it passes and then fall below 80 = sell.

And then do the the opposite on the buy dont buy when it crosses below rsi under 30 but when it cross under and the passes over again ?

"# For a buy, the look back is 16 days.
# Buy when the RSI drops to or below 19 and then climbs above it. This used to be 20 but I felt the portfolio was buying too frequently. The 19 value boosted performance and cut the maximum potential loss, a win-win situation.
# Do not buy if the previous trade in the same stock was a loss and it occurred within 31 days (the wash sale rule).
# For a sale, the look back is 14 days.
# Sell when the RSI climbs to or above 80 and then drops below it."

http://www.thepatternsite.com/PortRSI.html
profile picture

Eugene

#2
QUOTE:
What i was wondering if its possible to not sell ris when it passes 80 but when it passes and then fall below 80 = sell.

Yes, it's possible. See TurnDown/TurnUp in the QuickRef, and check for the RSI level at bar-1 relative to when the Turnup/Turndown happened.
profile picture

marchus

#3
thank you Eugene (you always so fast answering) :)
profile picture

marchus

#4
I cant see whats wrong with this code ?


CODE:
Please log in to see this code.
profile picture

Cone

#5
Apart from lousy block formatting, there's nothing wrong with it. It runs just fine.
profile picture

marchus

#6
But fore some reason I dosent buy one time ?

Is it possible to use the wld4 script in wld 5 ?
profile picture

Eugene

#7
QUOTE:
Is it possible to use the wld4 script in wld 5 ?


FAQ
profile picture

Cone

#8
It in fact would buy if the conditions occur that permit it. RSI doesn't often go outside the 80/20 range.
profile picture

marchus

#9
Im not to sure if the script dose as it should: buy when the stocks fall below 19 and the rises over the 19 limit again, and the opposite on sell rule
profile picture

marchus

#10
Im not to sure if the script dose as it should: buy when the stocks fall below 19 and the rises over the 19 limit again, and the opposite on sell rule

if TurnUP( Bar, ZZTh1 ) then
if RSI( Bar, #Close, 16 ) < 20 then

It should say

if rsi is under < 19 and and
the turn above rsi > 20
Then buy
profile picture

Eugene

#11
QUOTE:
Im not to sure if the script dose as it should: buy when the stocks fall below 19 and the rises over the 19 limit again, and the opposite on sell rule


Sure it does, but it's better checking the threshold at bar-1 like this:

CODE:
Please log in to see this code.
profile picture

marchus

#12
So with a sell function it would look something like this ? ( it this system is correct as bulkowski describes it its probably the worst i have with trading fiction comission=4 Slippage =5 and 4% intrest rate on cash)

Once again wld have helped me find the real profit from the "gurus" of TA


CODE:
Please log in to see this code.
profile picture

Eugene

#13
By the way, have you looked into setting the RSI thresholds adaptively? There were one or two AT Mag articles that touched the topic - for instance:

Adaptive RSI System

Adaptivity is the key (or one of the keys, to be precise), and it could do better than just some fixed number like 19.