Daily Hi Lo

Syn, I was playing around with the ST in MT4 today for awhile before I realized I could not just “make” a new EA to test but had to use the sample ones already in my platform (Moving Average, MACD). Is there an EA somewhere for this I could work on? I’d like to contribute every week to analyzing all the pairs I chart and sharing my results here in the thread.

Hey Merchant Price,

Kindly find attached the EA that I coded myself, for you and everyone else to use.

In the inputs tab, you will find the variables you can change, and also set for the ST to optimize. Note the boolean variable breakout is set to true; when set to false it will trade bounces off the previous day high and low, which we’re not focusing on right now.

I do have code for a trailing stop in there, but it is not perfected right now, nor executed in the code. You will want to compile the code first before you run it.

As I said in a previous post, the EA cancels any open orders on the particular chart it’s activated on, and then sets new orders for the day. It does this upon the opening of the new daily candle.

CAUTION: It works on any time frame, something I have code to take into account yet. So if the TF of your graph is 15m bars, it will open and close orders every 15 minutes using the previous 15m bar high and low! Stick to the daily charts TFs.

Also lets all keep each other updated on any improvements to the code, or new optimized parameters. I have mostly been focusing on the GBPJPY, but there could be other great money making pairs, given the right parameters. Perhaps each one of us can choose pair to optimize. We’ll see.

Please let me know if you have any questions, and good luck getting setup. I look forward to your contributions. There is a lot of pips to grab out there with this method. I’m glad we can all help each other out.

Synergy

DailyBreakOut.zip (1.51 KB)

Hey Bobkat,

From my optimization of this week on the GBPJPY, SL=45, TP=65 and PipFilter=10 was the best. 20,60,10, was gave the best profit with a drawdown below 2%, but really has a jumping profit chart if you extend the parameters to the previous weeks, which were in fact not profitable!

I’m really digging the current parameters I’m using: 10,50,10, on the GBPJPY. And I’ll tell you why:

  • They have been profitable every week for the past 12 weeks.
  • It gives a nice steady profit chart
  • Max consecutive losses is 3, and that has only happened once, the average is 2.
  • Average consecutive wins is 2, and avg wins per week is 2.73.

All of this just points towards slow and steady gains. Yes the 10 pip SL is very small, and I see great profitable trades that could have made it had I given my trade 10 more pips to breath on the stoploss side. But then consecutive losses really cut down your gains, as I can see from the profit chart.

As I had mentioned before, the 10 pip SL is really dependent on breaks being very strong, and not bouncing back. If it does, the 10 pip SL ensures the loss isn’t that great. Combine with a large enough target profit, it all mixes in to make gains. I mean this week we had 2 wins, and 4 losses, and we’re still up, and I’m fine with that.

Anyways, I’m rambling. The point is I’m going to stick with 10,50,10 for next week. Adding this weeks trades to the overall profit chart from the 1st week of June, we see that it looks good (shown below). No clear sharp drop in the gains which might indicate it’s time to choose different parameters. But stay tuned, because the ATR appears to be plateau or decreasing.

I think personally I would always stick to a 10 pip SL for this method, atleast until I have significant amount of equity, and risk tolerance to bare the sharp drops when SL’s are hit.

This week I’m gonna do some more hunting for good pairs and good parameters. I might try some of the more exotic pairs. Maybe the JPY crosses. I’m really interested in having some basic principles to indicate which pairs are best for trading with this strategy. The correlation between the ATR and the profit curve was a gem IMHO.

Synergy

Thanks, Bro! You are appreciated!

This issue with optimization is that there are so many parameters that lead to profits over the duration of a week, two weeks, month or several months. It’s further confirmation that this strategy works in securing stable profits. Atleast, this much we know, from the beginning of May.

[B]Optimization for the GBPJPY[/B]

Below is a Optimization Plot (Week of June 27th), showing the profit for each Test Run by the ST. I’ve fixed the SL to 10 pips and allowed the TP and PipFilter to be variable. I have labelled the peaks with their respective TP, and the regions with the same PipFilter value is shown.

As anyone can see, there are a range of TPs one can choose from. One interesting find with this plot is that the profits are not strongly dependent on the PipFilter. As well, ramping up the TP wouldn’t really help with profits. There is an intermediate that is best.

Here’s the optimization plot for the previous week. Same cycle in the profit, no really dependence on the PipFilter.

Notice again the tight range (about 10 pips) which grabs the most profit, anything greater or less than that, and you didn’t make as much money as you could. Not a lot a room for different TP’s here. But never the less, profits either way. The little shoulder peak on the right of the main peak has a TP=100.

The issue is the we we want use the optimization parameters of the week of June 20th for the week of the 27th. In this case, had we chosen and TP of 75, we’d be in good shape for the following week. Had we chosen and TP=85, we’d be right in that dip between TP=75 and TP=100 shown on the first graph. Still profitable, but less so.

Things get a little hazy if we use the optimization parameters from the week of June 13th, for the week of the 20th, which are shown below.

Here, the best TP for the following week (June 20th, second plot in this post) would be either 55 pips or 100 pips. Interestingly, they both would give the same profit the following week (20th) as the data point for the TP=55 is on the same level as the TP=1000 peak on the second plot, just on the left side of the main peaks. Also, here PipFilter [I]does [/I]matter, and yields more profits with its around a value of 8 to 10.

Still profitable based on the previous weeks optimization data, but the values didn’t line up as well to catch the most profit for that week.

So we have nice correlated weeks, and some not so nice. I could do this over and over again, week for week, or even to optimization for a moving two week duration, or 4 week, or take the previous month. There are a lot of possibilities!

[B]Using previous weeks optimized parameters for the current week[/B]

The issue is when one week is a great winner, with very high optimized TPs, and the next week isn’t. Optimization for longer durations will give you the best TP values that correlate over many weeks. The profits will be less, but more steady. This is why I choose a TP=50.

It may also have to do with the daily range. I remember some where reading about setting your TP to 1/3 the daily range…

As for me, I think I’m one to choose steady profits, which are lower, rather than trying to optimize till I go crazy, just to squeeze out some more pips. The whole reason I decided to use this method was so I could set it and forget it, but now chart time as been replace with optimization time.

[B]Conclusions[/B]

So I guess the conclusion for now is:
[B]SL:[/B] 10 -> Keep the SL at 10 for now.

[B]TP:[/B] -> 20 and 100 pips. Which is great. You’re gonna make profit regardless. In fact everything I’ve been posting now about making more profits could all be attributed to greed :cool:. For me, I’m sticking with 50 pips for now.

[B]PipFilter:[/B] -> 10. Weeks not so profitable, this value grabs the most, probably because the price bounces of the previous daily highs and lows those weeks and this value avoids your orders being activated. Other weeks, it doesn’t matter, and your profits are not hurt by having it that high.

So 10, 50, 10 for me next week. I will try to extend this types of analyses when I have the chance. But we’re in good shape on the GBPJPY.

Have a great week everyone,

Synergy

[B]Addendum[/B]

Curiosity got me. Below is the Optimization Plot for the Week of June the 6th:

TP of 50 would have worked for the following week (of the 13th). So we definitely have something here.

And also if we look at the Optimization Plot for the Week of 30th of May:

We see the choice if 10/50/10 (or any other choices for that matter) was suitable for the following week.

[B]Another thing to notice is that the peak TP values decrease in proportion to the increase in the PipFilter.[/B] See how it’s TP=60 PF=0 and then TP=50 and PF=10. There is a set/optimal amount of pips that price will move past the daily hi and low, and you give up some of that from your TP to PF in order to avoid false breaks.

Sorry for the overload of posts!

Synergy

Hey guys, just wanted to chime in that I was checking the 100/200 ATRs for a dozen pairs and found CAD/JPY to be very promising. I liked the look of a few different pairs, but CAD/JPY has both ATRs trending strongly upward.

I am going to try my hand at running the strategy tester on that pair and hopefully will be able to share something very soon here.

Sounds good Merchantprince,

IBFX is going through a transition in adding one more decimal to the price quotes, so I can’t seem to bring up enough historical data on the CADJPY to see what you’re seeing. I hope they fix it before markets open today.

It appears the JPY crosses do well, at this moment, for this trading method. EURJPY and USDJPY are other examples I believe.

In my optimizations, I’m currently keeping the SL fixed to 10 pips. You may also allow it to vary, but I would keep it a max of 20 pips, which allows the R:R to be favorable. I don’t think we want SL and TP pairs like 30/40 ro 40/50, but more like 10/40 or 20/100, something with a good R:R ratio (maybe atleast 3 to 1?).

Also I think we want to avoid very large SL and TP values, such as 40/100, 50/110. While the R:R is ok, there’s to much risk on the SL side. If price does fall back more than 20 pips, it’s most likely a bounce off the daily level or a false break, and we should just cut our losses.

So high R:R optimized parameters are what, I believe, keep this strategy profitable. If we can’t find that on a particular pair, we find another one. If we can’t find one, then this method has to be put on the shelf for a while till the markets become ripe for it once more.

When you create your profit plots, compare it closely with the ATR and see if profit is made while the ATR line is [I]flat[/I]. It may be profitable when the ATR is steady, rather than just when it’s increasing.

Anyways I’m rambling, but thanks for your findings.

Cheers,

Synergy

ST data for last week, last 2weeks, and last 4 weeks: SL=10 (for all).

TP in the range of 50-60 pips looks best, for any PipFilter value.

I will be trading with SL=10, TP=50, and PipFilter=10.

Happy Trading everyone! :slight_smile:

Running into some issues with the strategy tester. I have everything put in as it should be (I think) and the tester runs after hitting the ‘Start’ button. However, once it completes there is no data on display in the Optimization Results or Graph windows. It sounds like an error tone sounds.

Checking the Journal for the tester, I see:

2010.07.18 17:36:06 There were 1 passes done during optimization, 1 results have been discarded as insignificant
2010.07.18 17:36:06 DailyBreakOut: optimization stopped
2010.07.18 17:36:04 DailyBreakOut: optimization started
2010.07.18 17:34:39 DailyBreakOut: loaded successfully

A long on that would be a spooky trade…

Of course opinions are worth what you pay for them;)

Cheers!

You either didn’t have enough historical data for the time you want to run, or there were just no profitable parameters.

I’ve been monkeying with it but must be missing some crucial piece of information. Here are what my setup screens look like when running the tester:

Looks fine to me.

Don’t optimize spread, fix it to one value. Ditto with SL.

Try it on another pair. try to GBPJPY which we know works, once you get things going, you can move to the other pairs.

Is this the MQL5 strat tester?

No, it is MQL4.

Synergy,

Are we trading off the small Sunday evening candle? If so my entries would be the following:
Buy = 132.83 (3 pip spread)
Sell = 132.12

If I am wrong, please correct me so that I don’t lose my shirt!

BK

We certainly are! Last week, this particular day’s trade (Monday) was a winner In the optimization, sunday is not excluded.

GBPJPY
Previous Day High 132.707 SL 100
Previous Day Low 132.225 TP 500
Spread 60 PipFilter 100
Price SL TP
Sell 132.125 132.225 131.625
Buy 132.867 132.767 133.367

Remember, my IBFX broker now has price down to the pipette, so divide everything by 10, and my values will be more exact. And my spread is 6.

Synergy

Those peaks look to be in a broad range from around 50 to 80 looks along the lines of my peak on gbp/usd that I posted early on.

My concern is that using Sunday’s small candle compared to a full day’s candle, that we are trading a different animal on Sunday nights. Any way of separating out Sunday night trade results from all the other trade days? I am skeptical about the results.