How to translate this method into a MS formula?

gbessone

Junior member
Messages
11
Likes
1
Hello guys,

i want to backtest a method which uses the the 2-period RSI as its primary tool, and claims 80% profitable trades on the S&P500 since 1995, but i dont know how to write the formula, can anyone help me out?

The method rules are the following:

Buy signal:

The price is above its 200-day simple moving average.

Day 1 - the 2-period RSI is below 65.
Day 2 - the 2-period RSI closes lower than Day 1.
Day 3 - the 2-period RSI closes lower than Day 2.
Buy market price on the close Day 3.


Exit Signal
:

Exit when the 2-period RSI closes above 75.


Thanks in advance to the one who gives me the MS formula!!

Best regards,

Gustavo
 
The problem you have with this is that you cannot buy the close unless you know what it is to be able to calculate the RSI. This is because the RSI uses the close value in the calculation. Where did you get this system from?
 
Nedkelly,

Let's say we buy 5 minutes before the close... would you be able to write the formula?

Regards,

Gus
 
Try this:-

Buy signal:

C>Mov(C , 200 ,s )
AND
REF(RSI(2),-2)<65
and
REF(RSI(2),-1)< REF(RSI(2),-2)
AND
RSI(2)< REF(RSI(2),-1)

Exit Signal:

RSI(2)>75
 
I ran this formula through the trade simulator and it works out quite well. It does have some large drawdowns but by and large it looks good. You wouldn't have done very well at the end of Feb this year. You would have bought on the 23/02/07 at 1453.80 and sold on the 8/03/07 at 1417.20, a loss of 36.6 points.

Interestingly, you would have bought the close on Thursday and sold out on Fridays close.
 

Attachments

  • spchart.jpg
    spchart.jpg
    11.3 KB · Views: 332
  • spchart2.jpg
    spchart2.jpg
    15.5 KB · Views: 297
Last edited:
lightning, thanks for the pdf, i will check it out, seems veeeery long, hehe.

NedKelly, i've noticed that too. Actually, i tried the formula with several different securities and it seems to have very high percentage of profitable rates, but the ones which aren't profitable are bigger than the profitable ones.

Anyway I think the forumla is a good starting point, perhaps a couple of improvements could be made over it.
 
Top