Topic: Relative Strength Index Extremes with 200-Day Moving Average Filter
Hi, I'm backtesting some of the strategies found in the book "Mechanical Trading Systems" by Richard L. Weissman. I've no idea if the strategies are any good, but they seem simple and based on the logic behind the indicators, so I thought it would be a good starting place as any.
This strategy is a mean reversion system (I'm starting my focus on these strategies due to recent low volatility in the forex market) and is called "Relative Strength Index Extremes with 200-Day Moving Average Filter".
From the book:
This system waits for the market to achieve extreme overbought or over- sold relative strength index (RSI) levels while still trading in the direction of the long-term trend through its use of a 200-day moving average as a filter. Because we are trading the direction of the long-term trend, we can place our exit with profit criteria levels somewhere beyond the mean. In this case we exit long positions when the 14-day RSI crosses beyond the 60 level and exit shorts when the 40 level is breached. As discussed in Chapter 2, we will need to include a second, fail-safe exit condition to protect us against unlimited loss in the event that the trend changes and the market does not revert to its mean. Using CQG, the programming code for the trend-following mean reversion system with RSI extremes, 200-day moving average filter, and 2.5 per- cent stop loss is written as:
Long Entry:
RSI(@,9)[–1] < 35 AND Close(@)[–1] > MA(@,Sim,200)[–1]
Long Exit—Condition #1:
RSI(@,14)[-1] XABOVE 60
Long Exit—Condition #2:
EntryPrice(@,0,All,ThisTradeOnly)–(.025* EntryPrice(@,0,All,ThisTradeOnly))
Short Entry:
RSI(@,9)[–1] > 65 AND Close(@)[–1] < MA(@,Sim,200)[–1]
Short Exit—Condition #1:
RSI(@,14)[–1] XBELOW 40
Short Exit—Condition #2 set “Price” field to:
EntryPrice(@,0,All,ThisTradeOnly)+(.025* EntryPrice(@,0,All, ThisTradeOnly))
I've included the CGQ code as this gives you a more precise idea about what the author is trying to achieve.
Here is my attempt to replicate the strategy:
[Strategy Properties]
A same direction signal - Does nothing
An opposite direction signal - Does nothing
Permanent Stop Loss - None
Permanent Take Profit - None
Break Even - None[Opening Point of the Position]
Bar Opening
Enter the market at the beginning of the bar
Base price - Open[Opening Logic Condition]
RSI
The RSI is higher than the Level line
Smoothing method - Smoothed
Base price - Close
Smoothing period - 14
Level - 35
Use previous bar value - Yes[Opening Logic Condition]
Moving Average
The position opens above the Moving Average
Smoothing method - Simple
Base price - Close
Period - 200
Shift - 0
Use previous bar value - Yes[Closing Point of the Position]
Bar Closing
Exit the market at the end of the bar
Base price - Close[Closing Logic Condition]
RSI
The RSI is higher than the Level line
Smoothing method - Smoothed
Base price - Close
Smoothing period - 14
Level - 60
Use previous bar value - No
Questions:
1. Did I replicate it correctly?
2. How do I implement a 2.5% stoploss like the author suggests?
3. Would you like to see more strategies from this book?
Thanks
Pete