Sunday Breakout Strategy

email/sounds = alerts,
x and y adjust are adjusting the co-ordinates of the indicator.

I’m not sure if it works so please test it~

The first thing you need to do is go to this site… How to Achieve 90% Modeling Quality When Testing Expert Advisors | Alan’s Forex Blog

Follow the instruction for rebuilding your data. Note that Alpari is the [B]only [/B]source of free data, and their charts are GMT+2, so be sure to offset the data by 2 hours when you import it!!

Gif needs to do this too… I just noticed his backtest had 90000+ mismatched chart errors and the backtest modeling quality is “N/A”, where it should be 90% for accurate results. The results aren’t trustworthy without a 90% modeling quality (and, obviously, are only 90% trustworthy with it). T

That’s probably the reason Gif’s test shows a lot of losses while I show wins.

After you get the data rebuilt just open the MT4 Strategy Tester and select your EA, GBP/USD for the pair, and 4H for the TF. It’s pretty self-explanatory. :slight_smile:

hehehe, writing a dll is tricky, you see metatrader language is not really a programming language but its more like a scripting language, to write dll (dynamic link libraries) you need a real programming language like C, C++, java or C# or others. Every language bases itself in algorithmy and problem “division to simple parts”. You cant program dll in metaquotes but you can use them since they adapted metatrader executable to read memory modules and import dll functions.

I can still give you the dll code in case you want, i havent built it yet but i will… because dll are read from memory, they become more tricky to build because if you make errors you can crash the entire metatrader platform, so there like no room to small mistakes, if your interested into programming you should try real programming languages, believe their all based on the same i mean algorithmy, only the sintax is diferent from language to language. Try surfing the web for c++ beginners guide and if you have questions i can pm you some answers and take your doubts.

check your private message box im sending it in a second, and remeber you agree to not change anything without my permission and to not post it anywere else or sell it.

EDIT: I cant seam to be able to send private messages, any help :confused:

Well of course i can understand any code even if its not commented… if you want me to check errors or anything i will, i can even help you program anything that you may have doubts.
the same to anyone in here that has meaningfull ideas :slight_smile:
Nothing is impossible in programming. Theres always a way.

yeah its good you did that! you know i dont actualy write the algorithmy problem on papper and then code it, i do it all on my head and then code directly on computer and what happens is sometimes i forget stuff in the middle of so much stuff, i can fix that right away.

Keep in mind sometimes it may happen that mondays may be a holy day or something or that the market starts a large number of pips under the actual sunday day, for these cases you will need to define a rule of action, what happened (wich is probably the case, i havent checked yet) is that price didnt cross the intended range before friday intraday action, i can also set a rule to not trade when it doesnt triger until tuesday? Its your choice.
If you find anything else let me know so i can fix it.

Very intresting.

Is this an analysis on the profitability of this strategy?

What do the x and y axis represent. Days and pips or dollars? Can you give us a bit more explantion/detail?

Mismatched chart errors are what i ahve been talking about all this time, the server / client chart update problems due to lag! you shouldnt take this too much into consideration because the bars still have the same sizes, the diference is in some platforms you may have the open at 2 and then high at 10 and in another the open at 4 but the high is still 10. since strategy doesnt use open then theres no big deal. And keep in mind those will always exist! even with after new fresh database downloads.

About the modeling quality you people even knowing exactly what it is, its more tricky then it looks, modeling quality looks for stuff that can be used in “real” like “does the bot cares if this order was precisely put at bar vollume 1 = bar precise open?” and it tries to evaluate the strategy in code. a proof i can give you that you shouldnt take it into consideration, did you know that if you use 2 bars followed close1 > open1 && close0 > open0 you auto get 25% modeling? Yes so there goes reliability, of course all this mixed in a big strategy. what really matters in a strategy even modeling being (N/A not available) is that all safety checks are measured and that orders are placed precisely under strict conditions.

Hopefully metatrader 5 will be better than this, and yes metatrader 4 has alot of problems, anyone with expirience in database handling knows that most stuff shouldnt happen at all. in the other hand think about that if you have 200.000 clients and have to update all their charts by the second that could become a mess, so they did what they could like incoming tick chart updates.

Like for example in the EA im implementing i did care to write a file to know wich ones have been placed so there no possible repeating at all. also BE only trys to be applied once in can it is. i also took market stop levels (minimum number of pips so that you can place a pending or change SL) and alot more things. Modeling also fails to work always in backtests over 1 year and half thats why it isnt even 0%, its N/A.

Resuming what really matters for foward testing is that the bot or EA whatever you want to call it, needs to have all error controlling structures, order placing logic, safety check and user related check writen properly so that the bot does what it is supposed to do and not fail, and believe me modeling cant stop you of doing that.

Never mind.

Had problems with the attachment. Got it now.

I disagree! It most certainly should be taken into consideration!

You’re results have 92923 minutes of missing (or bad) data. That’s a full 64 days!!

Until this is fixed the backtesting data is not accurate. While it does appear to me that these errors may have actually lowered the backtesting results it’s still inaccurate and cannot be fully trusted.

I will agree that this has no bearing on how the EA will work on forwards testing though. For those people reading this that don’t understand how EA’s work don’t worry, the EA isn’t the problem, it’s the MT4 charts he tested it on that have the issue. :slight_smile:

Everyone see why I don’t trust automated backtesting now? :smiley:

Yes indeed i completly get your point… Well then guess we are doomed… why? even foward testing specialy in periods the market is not active, like bofore Tokyo open its the time that these problems start to appear in masses :slight_smile:

Now seriously the strategy is good, and even with small errors in charts here and there its more prone to work then not.

you forgot to decide what to do when theres holydays or gaps that dont let orders open until at least tuesday? think on the issue its important. :slight_smile:

The market is always open somewhere, even if it’s a bank holiday in a certain country. I don’t understand how that’s an issue. The market not being active doesn’t fail to put a candle on your chart… A tiny little line (basically a one pip doji) just appears.

In fact, the system relies on the periods of low active to work!! It’s what we’re basing our trades on… :slight_smile:

There is a data record for every minute in this chart. There are lots of price gaps and lots of inactivity, of course, but an EA should not be effected by them. If price gaps over the entry price the pending order will just kick in a few pips late.

Yes market is always open but low price movements tend to provoke the new data to be mismatched, this happens even when going foward. after all its not really a big problem.

About the image

See what i mean? if its ok then the problem is already solved by itself…

So am I right in thinking you select the pair that has the greatest range on Sunday? And then only trade that one pair?

I think I see the problem…

I don’t mean any offense by this, and I do appreciate you trying to code an EA for this system, but I think the main problem is that you don’t understand the system. If you have to ask that question then you have no concept of how or why this system works, so how can you program an EA for it… :confused:

Anyone who had read the system rules will know exactly what to do in that situation. You enter when price crosses the entry line. If it gaps over the line by a few pips that doesn’t change the rules.

And a price gap is not the same thing as a mismatched chart error. Price gaps will not stop EA’s from triggering orders, unless they are specifically programmed to do so.

i understand the system but, but reading this:
" Originally Posted by phil838
There’s something wrong with the EA… Check out Dec 17, 2007. It opened a sell position on Friday, held it over the weekend, then closed it for profit on Monday."

it made some doubts. those are cleared now, so the problem there was having them over the weekend. and that is fixed.

Surely the problem is opening a trade on Friday, no?

Both are problems! :smiley:

99% of this system is mechanical, but the decision of whether or not to enter the second trade if it happens later in the week requires some human judgement.

Friday is never ok though! I can’t think of any way to program that type of logic into an EA, but maybe Gif can. There are a lot of posts on this thread where we discuss the ins-and-outs of the second trade.

Personally I’d just turn the EA off when it got past the point I didn’t want that second trade, but (once again) that makes automated backtesting impossible. :slight_smile:

The only use of the EA for me is to figure lot size and enter trades on a lot of pairs at once, so we can spread the risk around and fix the problem of getting stopped out by one pip. Then Pirateboy will be able to sleep at night instead of staring at his chart… :slight_smile:

I don’t really care about the automated backtesting results anyway, I was just pointing out they aren’t accurate because of the mismatched chart errors. I would backtest it manually on any other pairs before I traded it on them. I’m just not going to bother to do that until I have an EA that makes trading the other pairs easy to do, because I’m not going to set up a dozen or more pending orders manually at lightning speed so I don’t miss an entry.

That’s a recipe for disaster! I’d end up typing an extra zero on my lot size and getting a margin call. :slight_smile:

As far as I am concerned my weekend breakout trades are counting on trends starting on a Monday so I don’t look to take a second trade after Monday - i.e. Monday evening I remove all pending orders.

phil is right in some stuff.

Well true thats what i do in my live trading account at FxPro, i built one bot to set TP/SL and BE, for me its more like a helper than a fully automated system.

Still backtesting and coding deals with alot more then just simple, in a certain way you got to the point that things are not static and it is [B]TRUE[/B], [B]any programmer knows that automated tradng systems are doomed to fail because market has so many variable that its impossible to program, everyday is like a completly new problem to solve![/B] even thow back testing allows to have an idea of what may happen, and foward testing gives us even better info.

If there was anyone out there believing a bot could profit alone, like an ATM machine, then your still in the holy grail looking phase! Most probably sometime will end up finding theres no such thing and that market needs to have somewhat a special adaptable strategy, wich does not exist. This is why management is so important along with some more stuff, like fundamental and technical analises.

Anyway understanding both i still give them a chance and believe me when i say, if a bot cant at least in a certain given number of trades represent a profit or loss, in various market situations the strategy most likely will not work, of course this is my opinion after trading 2 years live and doing countless research on my own. Most of you will not agree and i respect that.

And in the end even of this whole bot project was running smooth it still needs some user to check it from time to time, because no bot is ready for every single market situation, and no bot will ever be.

Relatively to this “Friday is never ok though! I can’t think of any way to program that type of logic into an EA, but maybe Gif can.” Yes i can program anything that its actualy “possible”. And keep this in mind about programming, even understanding your system when you say “…buy when crosses upper line and sell when crosses the lower line…” for me i need to worry with stuff like is price comming from under and crossed up? Or is the price comming from above and going down? Does the bar has pips enouth to actualy open an order? does it need anymore specific requirement to open the order? and the list could go on… So you see why the gap was important to me even you not realising the problems it could bring.

About this, “The only use of the EA for me is to figure lot size and enter trades on a lot of pairs at once, so we can spread the risk around and fix the problem of getting stopped out by one pip. Then Pirateboy will be able to sleep at night instead of staring at his chart…” we can build a helper version for this trategy if most people would agree and want it.

Hope this makes things abit more clear. :slight_smile:

And i am still continuing to program the bot.
EA update: will probably be posted tomorow!

Do you mean my modified one, or Philip838 one?
for mine, I will choose the one with highest RR, which is usually GBPJPY and GBPUSD,

now i’m more interested to get this EA working, haha~