History: The Improved R2 Strategy: 84% Correct with Just 6 Rules By Larry Connors & Ashton Dorkins TradingMarkets.com February 21, 2007 In early 2005, we published the R2 Strategy on TradingMarkets which quickly became one of our more popular strategies. The strategy was also presented at "The Traders Expo" in Fort Lauderdale last year. In the "MoneyShow.com Best Webcasts of 2006" it was voted the number one presentation in the "Best for Traders" category. We recently updated and improved our research, leading to this article that shares our latest findings with you. What is the Improved R2 Strategy? The Improved R2 Strategy is a simple six-rule Market Timing Strategy which uses the 2- period RSI as its primary tool. Our research has shown that there is little statistical evidence using the standard 14-period RSI. But, when you shorten the period to a 2-, 3- or 4-period RSI, test results significantly improve. By using the 2-period RSI as we do here, you can see back-tested results of 84.31% correct in the S&P 500 Index going back to 1995 (12 years). Here are the Rules: The SPX is above its 200-day simple moving average (you can use any S&P 500 derivative product, including the SPYs, E-minis, etc). Day 1 - the 2-period RSI is below 65. This tells us that the market is in a neutral to possibly oversold condition. Day 2 - the 2-period RSI closes lower than Day 1. Day 3 - the 2-period RSI closes lower than Day 2. Buy the market (SPX, SPY, E-mini, etc) on the close Day 3. Exit when the 2-period RSI closes above 75. The RSI-R2 EA: Q: Bluto,are you using this EA (on Daily charts) on all of the currency pairs or just the 4 majors?Also,when you say "15 lots per signal",are these standard lots or mini lots and which broker are you using?Thank you. A: I'm running the EA on a chart for every pair. It should work equally well for any pair. I'm using 15 mini-lots @ IBFX. And yes, those would be daily charts. The EA is coded to use daily RSI & SMA signals. -bluto Q: I've been running this on Velocity4x demo on 17 pairs since yesterday. One buy trade opened yesterday on eur/gbp at .6754... The only change to defaults was to turn on money management, otherwise trades would not open (not enough margin in 10K demo for opening 10 lot trade!). So with money management turned on the above trade opened for .2 lots A: Turn off MM and change the lot size from 10-Lots to 0.01-Lots. You'll have enough money for the 17 pairs. Bodaire Q: Can this EA be opened just at the brokers daily open( 00:00 ) time for about 1 or 2 hours instead of leaving it on 24/7? Because,once it takes a trade,the trade will still be running on the brokers server, so we can turn off our computers. What do you think? A: With the RSI-R2 trade orders, you don't want to turn off the EA and I'll tell you why in a moment. Likewise, I'm not certain what your logic is with regards to letting the EA run for the first few hours after broker daily open. There's nothing magical about those first two hours that gives a higher probability of getting a signal. You don't know when the trade is going to signal....it could be anytime in a 24 hour period. Whether you need to leave the EA up and running or not really depends on how it was designed. For an EA lets say that always places orders with a 20 pip takeprofit and a 20 pip stoploss, you've set the upper and lower limits so it doesn't matter if you turn the EA off or not...The order is on the broker server with all of the known parameters. With other EA's like RSI-R2, there isn't any fixed takeprofit or stoploss assigned to the order when it's placed....the EA manages this dynamically. In fact, takeprofit is assigned as an absurd value like 700 which means you'll let the order run as far as it can go. On the stoploss side, you definitely need the EA up and running because it uses a parabolic stop routine and continuously updates the stoploss value of the order on the server as time passes...sort of a dynamic trailing stop. The server will not maintain the parabolic stop and if you turn the EA off and the trade goes against you, it could get ugly. Hope that helps. Q: If the EA gets a counter signal from RSI before the PSAR level is encountered doesn’t it close the prior trade then also? A 1: Yes...indeed it does. However, the likelihood of that seems remote considering how infrequent the right conditions line up for a signal. A 2: Good questions. The buy/sell signal criteria is very strict and there's only one set of conditions each for buy/sell. Closing orders is a different subject. That line of code you mention is in fact a hard exit per the original criteria from the trade journal article. The author of the method says if you have an open buy order and RSI rises above a value of 75 (overbought), then close the order....presumably because momentum should be slowing and a reversal might be coming. That's one way to exit the order. Another method obviously is via the parabolic stop. Yet another one is....say you have an open buy order and RSI never rises above 75, the order isn't stopped out, and suddenly you get a sell signal (very unlikely). A 3: I have had 4 positive demo trades (each on a different currency pair) since March 23rd and I believe that all of them exited due to the condition I showed. None of them hit the PSAR level. Thanks for clarifying that point. Don’t forget, some back test results show barely over 1 trade per month over 15 months of testing. So you are not going to be encountering tradable conditions that often. A 4: Yeah, thats what everyone has been saying. Ive had it running when others have reported trades ocurring so I thought it was something in my setup. I tested from 1/1 to current and it took only a total of 5-6 trades depending on the currency, so I will let it ride for the rest of April and see what happens. It does look promising. So simple, yet effective. I have to learn more about the RSI and its workings so that I understand what its doing, in order to go live with it.. we'll see.. im looking forward to Gremlin coming around as well. I have it running on 17 pairs in one instance of MT4. It has taken 5 trades all on different pairs. Q: It gave me 9 trades, 6 on the GBPUSD and 3 on the EUR. My complaint was that my Balance never was above my initial $10k and I ended up losing $21.32 demo trading 0.10-Lots each time. Bluto was making money. This version has the same bug as the original. After a trade is stopped out it will not trade again. 09/04/2007 V2.0 runs in each chart, so to run all pairs the EA has to be in every chart. Multi_pair runs in GBP/JPY chart but trades all pairs. 11/04/2007 (Attached RSI Ver 1.1 to this message) Ok folks - here's the original....well almost. I made two small but beneficial tweaks. 1. Provision to indicate if broker permits fractional lot sizes. Comes in handy if you're using money management. Also moved money management code into a function call. 2. Added an external variable to store the RSI Period value which was previously a hardcoded value of 2. Through backtesting with high quality modeling, I've found that each pair has optimum values for RSI Period which are different from each other. I think the value of 2 from the original trade journal where this method was described was applicable to stocks. I've assigned the optimum value to each pair in the opening initialization function. These have worked real well for me. Folks - I think we're on to a good thing with this EA. Let's keep the EA private to our community here if possible instead of broadcasting it all over the place unless that goes against policy. Let me know if you have any questions. -bluto 12/04/2007 In layman's terms, this is how the RSI-R2 Ver 1.1 EA works: With each new tick, the EA is called and control passes to the init_start() mainline function. First, we perform the money management option via the "Calc_Money_Management()" function call if the value of the UseMoneyMgmt variable is set to true. This function calculates the appropriate lot size to use based on available equity and the "RiskPercent" setting. If money management is disabled, the value of the default "LotSize" variable is used. -Then- Using a daily timeframe, first, get the closing value of RSI three days ago (RSI_Day_1), the closing value of RSI two days ago (RSI_Day_2) and the value of RSI one day ago (RSI_Day_3) . Also, get the closing value of a 200-day simple moving average one day ago (SMA200_Day3). We will analyze the behavior of a short term RSI over the prior three days as our primary buy/sell trigger. -Then- Check for Buy Signal: We're looking for a decreasing value of RSI over the past three days into a deeper oversold status as price remains above SMA200. If the value of RSI_Day_1 < 65 and the value of RSI_Day_2 < RSI_Day_1 and the value of RSI_Day_3 < RSI_Day_2 and the value of Closing Price from one day ago is > SMA200_Day3, we have a Buy signal, so set the boolean Buy Flag (Buy_Mode) to True, otherwise set it to false. -Then- Check for Sell Signal: We're looking for an increasing value of RSI over the past three days into a deeper overbought status as price remains below SMA200. If the value of RSI_Day_1 > 35 and the value of RSI_Day_2 > RSI_Day_1 and the value of RSI_Day_3 > RSI_Day_2 and the value of Closing Price from one day ago is < SMA200_Day3, we have a Sell signal, so set the boolean Sell Flag (Sell_Mode) to True, otherwise set it to false. -Then- Before we act on any potential signals that may have fired, we do some housekeeping on any order that may already be open. The EA only allows one sell or one buy order to be open at a time. If we have an open Buy order in progress and the value of RSI_Day_3 > 75, we close the order because RSI is entering extreme overbought status (reversal coming?) If we have an open sell order and the value of RSI_Day_3 < 25, we close the order because RSI is entering extreme oversold status. The order closures would actually happen on the opening bar of day 4 since we're on a D1 timeframe. We then update trailing stop using Parabolic SAR. Managing these stops can cause an order to stop out if things get nasty. -Then- We now act on any new buy/sell signals: - If we have a new buy signal and there isn't a buy order already open (OpenBuyOrders = 0), we check first to see if a sell order may be open and if so, we close it. Then we simply open a newa buy order and increment the open buy order counter (OpenBuyOrders++). The counter keeps us from opening multiple buy orders since we only want one. - If we have a new sell signal and there isn't a sell order already open (OpenSellOrders = 0), we check first to see if a buy order may be open and if so, we close it. Then we simply open a new sell order and increment the open sell order counter (OpenSellOrders++). The counter keeps us from opening multiple sell orders since we only want one. That's it. Control then passes back to MT4 via the last statement of "return(0)" in the init_start() routine until the next tick occurs and calls the EA at which point we repeat the entire process again. I hope that this helps clarify what the EA is doing under the hood. -bluto ----------------- 20/04/2007 Attached is the latest version of RSI-R2 (Ver 1.3). I added a check to compare the daily close to the SMA200. If a long trade is open and price has closed below the SMA200, the order is closed. Likewise, if a short trade is open and price has closed above the SMA200, the order is closed. This should help to address doomed trades like the current USDCAD that just keep moving in the wrong direction. Kudos to Mike for the suggestion. bluto. 21/04/2007 Some individuals using RSI-R2 Ver 1.2 have voiced their reservations about the effectiveness of the default PSAR stop routine. I've been doing some hardcore testing of various alternative trailing stop routines for the the past few days. My conclusion is that the existing PSAR is quite suitable for this particular EA. Being that it runs on a daily timeframe, it needs a lot of headroom to do it's thing and the other conventional trailing stop methods I've tested have caused trades to stop out prematurely. Therefore, I'm going to leave the default PSAR method in place unless somebody discovers a better alternative. Another discovery due to closer inspection is that three pairs in particular positively thrive under this EA: GBPJPY, CHFJPY & EURJPY. Keep an eye on these pairs and possibly consider allocating larger lot sizes because the profitability under several years of backtesting using the optimized RSI settings in Ver 1.2 is phenomenal. Any feedback is always appreciated. bluto Comments: RSI-R2 comes under the category of dip-buyers. Most dipbuyers that I have seen work best with no stop at all -- correct me if I am wrong, but the original strategy that this EA is based on didn't have one either. This causes large intratrade drawdowns which is unfortunately a feature of dip-buying. So the best strategy may be simply to have a fixed disaster-prevention stop which rarely gets hit, at 500 pips or so from the entry price, or several ATR. I think its best to concentrate on tuning the entry. Since this is an overbought-oversold trigger, how about using more than one overbought/oversold indicator such as unsmoothed Stochastic(2) (my tests show that this does reduce drawdown), or simply a % change of closes? 22/04/2007 This template was put together by Anica & Mario Slavinec.It will give you what you want.Put the rsi2_v2.tpl in templates and R2_Arrows_v2.mq4 in indicators. Hope this helps David AKA spiritfriends 21/04/2007 : The dawn of "Super RSI" I've made some significant enhancements to RSI-R2 Ver. 1.3 to further increase the probability of a winning outcome. I've added a few new EA property settings as well. New properties are: (1.) TradePositiveSwapOnly: self explanatory (2.) UseInternalOptimizedRSIPeriods: true by default; if true, uses the individual optimized RSI_Period values built into the EA for each pair. Set to false if you want to use the Default_RSI_Period for your own optimizing. I will later expose the optimized values as individual pair property values you can change if you want to. (3.) Default_RSI_Period: default value = 4 I've also changed the name of the EA to "Super RSI" and I'm only furnishing the executable version from here on out because I've employed some private proprietary code functions. This will also keep the original trade approach uniform and free from the clutter of all the EA mutations and clones. Sorry if anyone takes exception to this. I'm here to share EA's that can help you make money, not to teach others how to roll their own EA's from mine or how to program by copying my code. Drop the EA on as many DAILY charts as you want, set the lot size and any other settings, and let the EA do it's thing. Remember - the EA doesn't trade often so if you like a lot of action, perhaps a different EA is what you need. If you want limited market exposure and fewer trades with a high probability of success, this EA is for you. Cheers! Super RSI supercedes RSI-R2 with some enhanced internal workings to improve the probability of winning trades. -bluto 22/04/2007 Super RSI Ver 1.1 I had determined the optimized RSI values for each pair using IBFX historical data. The Optimized RSI values were previously hardcoded into the EA. However, for folks that don't use IBFX and may want to determine and use their own optimum RSI values based on their broker data, I made some changes to the EA to accommodate this. The RSI optimum RSI values for each pair are now individual properties that can be set as you which and contain my optimum RSI values by default. (1.) Set "UseOptimizedRSIPeriods" to false. (2.) Use the optimizer and backtest each pair using the Default_RSI_Period as the value to optimize with a starting value of 2, step of 1 and stop value of, say 10. (3.) Run the optimizer and determine which RSI value gives you the best profit, least drawdown, etc. (4.) Update the specific OptimumRSI_xxxxxx property for the pair you've optimized with the RSI value determined in step 3. (5.) Rinse and repeat for all pairs. (6.) When you're done, set UseOptimizedRSIPeriods back to true. bluto -------------------- 24/04/2007 Remember - Super RSI is a bit pickier about which trades it opens based on other trend related criteria above and beyond just RSI & SMA signals. You can run RSI-R2 Ver 1.3 if you want slightly more action, but the chances of a trade going south are slightly greater. In any event, watching this EA (RSI-R2 or Super RSI) and waiting for it to put on trades would be a bit like watching paint dry....oil based paint that is. bluto --------------------- 25/04/2007 Super RSI Ver 1.2 - Plz use this version A few minor tweaks and enhancements to provide better signals. You can use this without affecting any existing open trades. bluto --------------------- 27/04/07 The only difference between Super RSI & RSI-R2 is a proprietary little function I added to Super RSI to better qualify the trend which should enhance the chances of a winning trade. bluto ------------------ Robert's versions: Q: Please, can anybody tell the differences between: RSI_R2_EA_multi_pairSelect_v1.1 RSI_R2_EA_multi_pairFixed RSI R2 EA multi pairV1.1 RSI_R2_EA_V2.1 A: 1. RSI_R2_EA_multi_ pairSelect_ v1.1 This is the version I added inputs as someone requested to allow users to select what pairs they want to trade. This way they would not need to trade all pairs. It also has the bug fix. 2. RSI_R2_EA_multi_ pairFixed This version has the bug fix that was found in the original and still found in the original multipair version. 3, RSI R2 EA multi pairV1.1 I do not have this version. 4. RSI_R2_EA_V2. 1 This is the version with modular coding instead of straight line code. It also has many options to try for trailing stop as well as ideas posted by Gideon. Everything selectable by turning switches on or off using setting of 0 for off and 1 for on. As stated in a prior post the bug had to do with the original ea not correctly recognizing the close of a trade when the trade hit the stop or take profit. It did not happen often. I discovered this bug because the backtest of one of the pairs did not place trades after Sept 2006 even though it placed trades if I set the start date to Oct 1, 2006. Robert --------------- 05/05/2007 RSI EA Version 2.1 Here it the latest version of the RSI_R2 ea. Someone requested a check to prevent a trade from being placed on the same day a trade was closed. I have not seen bluto post this so I am attaching my version with that function added. The input useDelay is used to select this function. Set to 1 to use it, 0 otherwise. ------------------------ 11/05/2007 Robert, Your suggestion regarding use of CCI50 vs. RSI 14 is most likely the best solution to the trend reversal issue in this EA. CCI50 when tracing below 100 then above 0 provides better signals than RSI 14. Each time CCI traces < 50 the EA will wait for a new signal long until < 100 then > 0. You have already coded CCI50 regarding open positions. I appreciate your effort and work with this and other EAs. Regarding the many EA concepts I have followed at this site RSI_R2 is most similar to the reverse divergence concept which is a successful method. Incidentally CCI50 low value on this chart identified a reverse positive divergence thus confirming a long position in this TF. Subsequently CCI traced a classic positive divergence the price low of which touched the 200 sma. This observation is immaterial to the EA. Nevertheless CCI50 is doing a better job of i dentifying first a RPD then followed by a CPD which is the actual trade event manually. This phenomena identifies a tradable event with the trend which is lower risk. To the extent you are able to develop this EA I appreciate and thank you. Regards, Loren ------------------- 12/05/2007 I found that I did not have a correct understanding of the RSI signal. From further study of the code I have found that the RSI buy signal is valid when all three bars are below 65. Sell signal is valid when all three bars are above 35. I have made the following changes to the EA. 1. Removed ideas that did not help like MFI. 2. Replaces MA Angle with HMA for filter ( Hma3 indicator attached ) 3. Added code to only check signal once per completed bar 4. Made new RSI and CCI exit methods selectable from menu for easier testing for best method 5. Made modifications suggested by Loren Require daily RSI 14 weighted close >= 35 for long to correct the premature entry problem where price continues to decline for an indeterminate period. The reverse of this for shorts w/ RSI 14 <= 65. For the benefit of other programmers I added more comments. Backtest results show that using the filter and confirmation helped on the USDCAD but did not help on the GBPUSD. What helped more on the GBPUSD was using different buy and sell levels and the filter. Robert ---------------------------- 19/05/2007 I think you'll find Super RSI 1.3 to be hands down the most profitable version of all. If you want the version 1.5 which has some additional secret sauce, email me. bluto ---------------------------- 01/06/2007 Here's an updated version of Super RSI that contains a few more optimizations and improved order handling to protect from opening more than one order for a given signal the same day. You can simply replace any previous versions of Super RSI that are active without worrying about affecting any open orders. (Attached RSI-R2_EA_Ver._1.6.ex4) bluto