RSI_ATR System (Medium Term)

 

ND/Igorad,

Please help to code the following simple medium term strategy. This strategy is from August '06, Technical Analysis of Stocks & Commodities magazine.The author is Jamie Saettele.

He publishes a 3 1/2 year Tradestation back test that shows a $1,000 account growing to $71,300 in the 3 1/2 years. The equity curve is very smooth, with no major drawdowns.

Strategy:--------------------------------------------------------------------------------------------------------------------------------------------------------

Chart: EUR/USD, H4

Indicators: RSI(21), ATR(21) on D1 Chart

Buy Setup:

Buy when RSI(21) Closes Above 50

Buy Stop Entry:

Enter Buy Stop at the high of the bar that caused the RSI cross above 50 + 15% of the Daily ATR(21). 15% of the Daily ATR on EUR/USD will be around 15 pips.

Stop Loss/Buy Stop:

The Stop Loss will be the Entry Price minus 30% Daily ATR(21). About 30 pips or a signal to go short.

Open 2nd Lot:

Add another lot, Market Order, when the RSI crosses above 60 on the close. The Stop Loss for this second lot is the RSI falling below 50.

Close/1st Lot:

Close half the trade when the RSI crosses above 70 and then falls back below it.

Stop Loss/2nd Lot:

The Stop Loss for the remaining half of the position is a signal to go short OR the RSI falling below 40.

Sell Setup:

Sell when RSI(21) Closes Below 50.

Sell Stop Entry:

Enter Sell Stop at the low of the bar that caused the RSI cross below 50 - 15% of the Daily ATR(21). 15% of the Daily ATR on EUR/USD will be around 15 pips.

Stop Loss/Sell Stop:

The Stop Loss will be the entry price + 30% Daily ATR(21). (About 30 pips) OR a signal to go long.

Open 2nd Lot:

Add another lot when the RSI crosses below 40 on the close.

Stop Loss 2nd Lot:

The Stop Loss for this second lot is the RSI crossing above 50.

Close 1st Lot:

Close half the trade when the RSI crosses below 30 and then crosses back above it.

Stop Loss 2nd Lot:

The Stop loss for the remaining half of the position is a signal to go long OR the RSI rises above 60.

 

Attached is my attempt. I'm not sure what's wrong with it exactly, but it won't backtest, someone should know though. The logic is all in there.

It would be cool if someone could PM me if they fix it, since my elite subscrption expires today and I won't have access to your replies.

Files:
rsi_atr.mq4  6 kb
 

very interesting !

i found this: http://www.traders.com/Documentation/FEEDbk_docs/Archive/082006/ForexFocus/FOREXfocus.html

do you have a PDF of the article ?

 

Here is what I have so far

I'm just getting into programming MQL, and this is my first indicator and my first post in this forum.

I've attached the article and my indicator. I'll be making and EA of it soon. Any input is appreciated. Glad to be a part of the community.

Note: Use this on the H1 or H4 chart, any currency pair is fine.

Shows horizontal lines with last stop and entry. First blue/red arrow is entry indicator, second blue/red arrow in same direction is to add to position.

Green check mark is to close 1/2 of position. Close other 1/2 at opposite colored arrow. I'll explain more soon.

 
sampson:
Attached is my attempt. I'm not sure what's wrong with it exactly, but it won't backtest, someone should know though. The logic is all in there. It would be cool if someone could PM me if they fix it, since my elite subscrption expires today and I won't have access to your replies.

not sure if you are still around the forum... but i loaded the EA in a demo.

It is placing some trades, but every now and then i get an error message about an invalid price:

2007.07.03 18:00:37 RSI_ATR EURUSDm,H1: invalid price 1.36902667 for OrderSend function

is there anyway to make it have 4 digits (or 2 for the yen crosses)?

for those trades that did trigger... these are the results (none have closed so far)

7/1/07 - BUY EURUSD 1.3542 (currently +90)

7/2/07 - BUY EURUSD 1.3594 (currently +38)

7/2/07 - BUY GBPUSD 2.0184 (currently -4)

7/2/07 - BUY CHFJPY 101.19 (currently -10)

 

Updated Indicator

This update should help, let me know if there is anything else that could be tweaked.

Note, keep an eye out for the green check marks to close (they are pretty small and hard to see)

Also, use your discretion on closing, if your happy with a certain pip gain/loss go with that. Money Management...

I've been working on converting this into an EA and there is a lot of losses during the sideways price movement but the

big runs are big winners. Easier to see these trades with the eye than with a robot (EA). Still working on that and will post soon.

Enjoy

 

Hello,

I really like this indicator and have used this strategy in the past, however it seems to be erasing any other trendlines that you might draw on the chart yourself after a tick comes in.

The horizontal lines also are not always correct. I keep a handy excel chart nearby to tell me the 15/30% atr of the pairs so that I can come up with the correct entries and stops. I will attach it in case anyone would like to it.

I was wondering if someone could help me to add an alarm, both audio and email. I have tried using this word document I found that explains how to add an alarm but all I do is create more problems.

The word document outlining how to add an alarm and the excel I made for entries and stops is in the zip. If anyone can please help with this I would greatly appreciate it, thank you!

 

Hi I tested this indicator and it does not seem to work correctly based on the system rules stated in the PDF file. Using demo.metaquotes.net as server - if I look at the last entry signal on GBP/USD 4h chart (not addon) at 8/22 @ 16:00 the entry order should be at 1.9950 based on adding the previous DAY ATR (8/21 since 8/22 bar has not completed) .0154 * .15=23 pips to be added to the HIGH of the 4hr bar of RSI crossing (1.9927) = an entry of 1.9950, not 1.9924 as the blue line shows. The stop is also off some. I'm not sure where the error is unless I am misunderstanding the paper.

Based on the rules I read the RSI crosses 50 on whatever timeframe chart you are using (1h, 4h, etc) is the signal to put in a Buy Stop at the price of the bar high of the RSI cross plus the daily ATR (which would be the previous day I assume since the current day is still forming). Even if used the current day it didn't come out right for some reason.

Hmmmmm....

Also does anyone have the skills to add an alert to put your buy stop in, add to position, take 1/2 profit ?

Looking at this on a 4h GBP/USD chart I am truely impressed with the results. The qualifier of the 15% day ATR on top of the bar high filters out most bad entries. Most the losers I see come on the add to positions which are let to run until you get a reverse signal - but we cut cut those by moving the stop to breakeven on that position instead of letting the loss run against us.....

 
tracej:
Hi I tested this indicator and it does not seem to work correctly based on the system rules stated in the PDF file. Using demo.metaquotes.net as server - if I look at the last entry signal on GBP/USD 4h chart (not addon) at 8/22 @ 16:00 the entry order should be at 1.9950 based on adding the previous DAY ATR (8/21 since 8/22 bar has not completed) .0154 * .15=23 pips to be added to the HIGH of the 4hr bar of RSI crossing (1.9927) = an entry of 1.9950, not 1.9924 as the blue line shows. The stop is also off some. I'm not sure where the error is unless I am misunderstanding the paper.

Yes, that is why I added the excel sheet that will tell you the 15% and 30% and you just +/- when you put your order in. It also erases any trendlines drawn. You can also use the MTF_ATR indicator so you dont have to flip to day chart all the time.

But like I said in my previous post, I just really need an alert, there rest would be nice but not totally needed.

 

It based of of previous bar, plus daily atr...then it puts lines and redraws if necessary.

I based it on the close of the current bar, which is the ask, for early signals. You can choose to take it early if your brave or wait until the close of the bar.

-neta1o

 
neta1o:
It based of of previous bar, plus daily atr...then it puts lines and redraws if necessary.

I based it on the close of the current bar, which is the ask, for early signals. You can choose to take it early if your brave or wait until the close of the bar.

-neta1o

Ok, thanks for your explaination neta1o. So just to be clear - when the RSI crosses 50 on the current bar before the current bar completes - you look at the previous completed bar for your calculations (the bar before the RSI actually crosses). Is this correct? Just making sure I'm clear here as to whats you are doing.

Thanks for the clarifications.

Reason: