forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Forum

Forex Software, Forex Strategies, Expert Advisors Generator

You are not logged in. Please login or register.


Forex Forum → Forex Strategies → Relative Strength Index Extremes with 200-Day Moving Average Filter

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 6

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

Re: Relative Strength Index Extremes with 200-Day Moving Average Filter

Nice thread, Pete! We should have more of these smile

Answers:
1.  Almost correct, RSI needs to be lower than the level and its period is 9, not 14, for opening filter.
2. Unfortunately can't think of a better way except permanent SL.
3. If you have time, why not. It will help you learn the program and introduce quite interesting threads, maybe something bigger grows out of it.

Corrected strat:

[Opening Point of the Position]
Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open

[Opening Logic Condition]
RSI
     [ A ]   The RSI is lower than the Level line
     Smoothing method  -  Smoothed
     Base price  -  Close
     Smoothing period  -  9
     Level  -  35
     Use previous bar value  -  Yes

[Opening Logic Condition]
Moving Average
     [ A ]   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
     [ a ]   The RSI crosses the Level line upward
     Smoothing method  -  Smoothed
     Base price  -  Close
     Smoothing period  -  14
     Level  -  60
     Use previous bar value  -  No

Re: Relative Strength Index Extremes with 200-Day Moving Average Filter

I suggest it is a great idea to share the strategies as many users do not have a background in this type of thing and no access to materials similar to the one you purchased.

Thanks for posting....!

If that percentage exit is in several of the strategies and you post them, I think Popov may find a way to develop an exit based on that....

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Relative Strength Index Extremes with 200-Day Moving Average Filter

Attaching strategy file if someone simply wants to test it.

Re: Relative Strength Index Extremes with 200-Day Moving Average Filter

footon wrote:

Nice thread, Pete! We should have more of these smile

Answers:
1.  Almost correct, RSI needs to be lower than the level and its period is 9, not 14, for opening filter.
2. Unfortunately can't think of a better way except permanent SL.
3. If you have time, why not. It will help you learn the program and introduce quite interesting threads, maybe something bigger grows out of it.

Corrected strat:

[Opening Point of the Position]
Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open

[Opening Logic Condition]
RSI
     [ A ]   The RSI is lower than the Level line
     Smoothing method  -  Smoothed
     Base price  -  Close
     Smoothing period  -  9
     Level  -  35
     Use previous bar value  -  Yes

[Opening Logic Condition]
Moving Average
     [ A ]   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
     [ a ]   The RSI crosses the Level line upward
     Smoothing method  -  Smoothed
     Base price  -  Close
     Smoothing period  -  14
     Level  -  60
     Use previous bar value  -  No

Hi Footon,
somewhere I replied on 1 of yours comment about TP as closing point. I can't find that discussion now.
Sorry for misunderstanding I was not trying to show you are not right.
I was trying to point out that even if TP is closing logic it could end up in loss if there is add to position on.
BR
Tomas

Re: Relative Strength Index Extremes with 200-Day Moving Average Filter

togr wrote:

Hi Footon,
somewhere I replied on 1 of yours comment about TP as closing point. I can't find that discussion now.
Sorry for misunderstanding I was not trying to show you are not right.
I was trying to point out that even if TP is closing logic it could end up in loss if there is add to position on.
BR
Tomas

No problem, Tomas! smile

Posts: 6

Pages 1

You must login or register to post a reply

Forex Forum → Forex Strategies → Relative Strength Index Extremes with 200-Day Moving Average Filter

Similar topics in this forum