1 (edited by krog 2010-03-17 02:48:03)

Topic: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Hi,
I set up a simple strategy for GBPUSD 5 minute, using Bar Range and MACD. If the Bar Range rises, and the MACD crosses the signal line upward, then enter long -- provided happens between 18:00 - 21:00 EST. Then, exit is based on hitting stop = 20, or hitting limit = 70.

What I cannot figure out is -- looking at the Balance/Equity chart, I can see that this strategy works for a week or two very reliably, then fails for a week or two very reliably. (I'll try to post a screenshot of the chart below after posting message and strategy.)

Any ideas / comments / suggestions in how to figure out when it works and when it doesn't? I've tried looking at larger time frame charts, but nothing seems to strike me as the answer. It would be great if there were some way to only trade for the times when it works, then mostly avoid the times when it does not work.

http://s3.postimage.org/BSKxr.jpg

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Strategy:

Forex Strategy Builder v2.11.0.0
Strategy name: BarRange_MACD_GBPUSD_5
Exported on: 3/13/2010 5:05:05 PM

Description
(This description might be outdated!)


Market: GBPUSD 5 Minutes
Spread in pips: 3
Swap Long in pips: 1
Swap Short in pips: -1
Commission per lot at opening and closing in pips: 0
Slippage in pips: 0

Maximum open lots: 20
Entry lots: 1
Adding lots: 1
Reducing lots: 1

Intrabar scanning: Not accomplished
Interpolation method: Pessimistic scenario
Ambiguous bars: 0
Tested bars: 31139
Balance: 26 pips (4025.50 USD)
Minimum account: -426 pips (3574.30 USD)
Maximum drawdown: 426 pips (425.70 USD)
Time in position: 25 %

A same direction signal - Does nothing
An opposite direction signal - Does nothing
Permanent Stop Loss - None
Permanent Take Profit - None

[Opening Point of the Position]
Bar Closing
     Enter the market at the end of the bar
     Base price  -  Close

[Opening Logic Condition]
Bar Range
     The Bar Range rises
     Number of bars  -  17
     Level  -  0
     Use previous bar value  -  No

[Opening Logic Condition]
MACD
     The MACD line crosses the Signal line upward
     Smoothing method  -  Simple
     Base price  -  Close
     Signal line method  -  Simple
     Slow MA period  -  10
     Fast MA period  -  8
     Signal line period.  -  8
     Use previous bar value  -  No

[Opening Logic Condition]
Day of Week
     Enter the market between the specified days
     From (incl.)  -  Sunday
     To (excl.)  -  Friday

[Opening Logic Condition]
Entry Time
     Enter the market between the specified hours
     From hour (incl.)  -  18
     From min (incl.)  -  0
     Until hour (excl.)  -  21
     Until min( excl.)  -  0

[Closing Point of the Position]
Stop Limit
     Exit at the Stop Loss or the Take Profit level
     Stop Loss  -  20
     Take Profit  -  70

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Thanks in advance to everyone for any suggestions or experience trying to solve this !!

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Just take a look at the market conditions and try to figure out, which indicator could show you the weeks when your strategy works and when not..  wink Probably is has something to do with trending and not trending markets.

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

krog wrote:

Strategy:

Forex Strategy Builder v2.11.0.0
Strategy name: BarRange_MACD_GBPUSD_5
Exported on: 3/13/2010 5:05:05 PM

[Closing Point of the Position]
Stop Limit
     Exit at the Stop Loss or the Take Profit level
     Stop Loss  -  20
     Take Profit  -  70


Please can you upload the generated strategy file so that I can attempt to answer your query.  Call me lazy but I don't want to recreate your strategy if you already have it saved to disk.

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Hi Opioid -- I suspect perhaps it could be something with trending vs. range-bound, perhaps a trending market has a better chance of making a limit move after entering the position, whereas a range-bound market is more likely to go the stop amount in both directions. Any favorite indicators for telling the 2 apart?

Another theory I have is strong moves start at different times -- ie, it works when the strong move happens in the Tokyo market (soon after the 4 pm EST entry), and does not work when the strong move happens in the London market (quite a few hours after the 4 pm EST entry time). However, that is questionable since it works for 2 weeks at a time, then not 2 weeks at a time.

Currently I'm experimenting with including a longer period indicator -- like 200 period -- so it would include a daily indicator reading with my 5-minute indicator readings.

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Hi MaxB -- no my fault -- I should have included it in the first place. But also note -- this strategy is one example; I have seen this type of consistent work-consistent fail up and down pattern in quite a few of my strategies. I'm looking for techniques to tell what market conditions it works, and when it doesn't -- then one could avoid trading during the 2 weeks when it fails.

I've attached the xml strategy in a zip file, let me know if you can get it. If not, I'll try pasting the xml into the forum.

Post's attachments

BarRange_MACD_GBPUSD_5.zip 1.73 kb, 22 downloads since 2010-03-16 

You don't have the permssions to download the attachments of this post.

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

I'll try a few other things today and post later on with what I find.

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Experiment 1: added Moving Average Crossover, with the fast = 40, slow = 160. Perhaps this would indicate a trend. Attached the screenshot -- basically results in a sideways Equity Balance chart, so no real benefit.
Result: Did not achieve the goal of avoiding the "non-working" times.

http://s2.postimage.org/4xqQr.jpg

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Experiment 2: added ADX, usually considered to show if there's a trend or not. After a bit of trial and error, found best combo was period = 46, then under level = 11 (strategy attached as .zip). Balance Equity chart shows steadily progressing upwards, but somewhat matches the ups and downs of the original strategy. I was surprised that "ADX lower than level line" worked better than "ADX higher than level line" -- I suppose it means when a trend is ending, or no trend and it's a 50% chance when the strong move eventually comes.
Result: given the close but reduced similarities, only partially successful in avoiding the "non-working" times. I am inclined to think it is just adding another indicator with more optimization for the sample, not necessarily pointing towards the goal.

http://s4.postimage.org/xJQ5A.jpg

Post's attachments

BarRange_MACD_GBPUSD_5_ADX_46_11.zip 1.85 kb, 16 downloads since 2010-03-17 

You don't have the permssions to download the attachments of this post.

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

You could try ATR MA Oscillator, Ive had some positive  experience with this indicator,
maybe it could improve your strategy.

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Thanks for the suggested indicator. With that, I was able to get a higher ending balance.

ATR MA Oscillator: ATR period:137; Signal Line Period: 82

The Balance Equity chart goes mostly up and to the right, but with a flat sideways stretch in the middle.

I suppose the goal of getting a strategy that only has maximum of 3-4 consecutive losses is a bit tough to find. There is no way to know what will happen in the coming week, only how it worked out in the past. Perhaps something like use the ATR to figure out the range for current market, then adjust stops and limits based on the ATR, instead of my strategy's technique of the same stop-limit all the time.

http://s1.postimage.org/82BB9.jpg

Post's attachments

BarRange_MACD_GBPUSD_5_ATRMAOsc_136-82.zip 1.86 kb, 24 downloads since 2010-03-17 

You don't have the permssions to download the attachments of this post.

13 (edited by MaxB 2010-03-18 14:50:31)

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Hi,
   You use an indicator called 'Bar Range Drawn' in your strategy.  Where can I find it?

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

<smiley slapping self on head> oh no -- forgot that was in the strategy. Find attached.
It's the same as Bar Range. Bar Range is a histogram chart on the bottom, but I wanted to see the bar range on the price chart so I made this custom indicator. It will draw the highs and lows of the bar range on the price chart. But it is only for visual purposes -- since it's the same as Bar Range, I did not bother adding entry functionality, rather set it to always allow entry (long or short) so Bar Range Drawn has no filtering effect.

Post's attachments

BarRangeDrawn.zip 2.54 kb, 17 downloads since 2010-03-18 

You don't have the permssions to download the attachments of this post.

15 (edited by krog 2010-03-18 21:03:11)

Re: BarRange+MACD for GBPUSD 5min - how to tell when will work and won't?

Here's another one you might find useful based on Bar Range: Bar Range Oscillator.
For the past n periods, it keeps a count of how many times the upper range was hit and how many times the lower range was hit. Then the histogram shows (up hits) - (down hits). The theory is that if there is a trend, it will continue pushing the highs up for an uptrend. If the histogram falls, it means new highs are not being made and new lows are probably being made, so the trend may be ending. Then the same holds in opposite for lows in a downtrend.

Post's attachments

BarRangeOsc.zip 2.51 kb, 20 downloads since 2010-03-18 

You don't have the permssions to download the attachments of this post.