Getting to Know Empty4 Inside Out

Post Reply
garyfritz

Re: Getting to Know Empty4 Inside Out

Post by garyfritz »

EXCELLENT idea, Khalid! I suspect we will find out about all kinds of "gotcha's" that we didn't know before. Perhaps once the discussion has died down we should consolidate it all into a single "book" of "what to look out for in Empty4."

I'll start, though my understanding on this point is foggy. I encourage more-knowledgeable sorts to chime in and clarify.

Empty4's Strategy Tester is, according to Steve, "bollocks." It seems that you really cannot trust the results of a backtest. (Which is why I prefer backtesting in Tradestation. Within well-understood limits, its backtests are very accurate.)

I believe there are several causes of this. The primary one is the data used for the backtesting, and the way that ST uses it.

ST supports several levels of backtesting:
* "control points," which ST itself says is "very crude" and "the results must not be considered." (Then why in bl***y hell is it in there!? Don't use it!)
* Open prices only, which I think is good for EAs that only operate at bar-close (which is probably not many)
* "Every tick," which is the "most reliable" way to backtest.

Even "every tick" will not be very reliable if ST doesn't have tick data to work with. E.g. if it only has M30 data, then it can't tell what happened inside the 30min bar. This can be critical if multiple things can happen in a single bar. E.g. if ST only has M30 data, an if your EA is just scalping for 10 pips, and if both the TP AND the SL fall within a single M30 bar (which will usually be the case), then even at "every tick" resolution there is no way for ST to t tell whether the TP or the SL was hit first.

I don't know how ST decides what data it has but unless you explicitly load up lower-TF data, you may run into these problems. This is where the "50%, 90%, 99% modeling quality" comes from. It is a weak attempt to tell you how accurate the backtest likely is. Anything below 90% is utter fantasy. 90% is marginal and may not be accurate for some EAs. Even using "every tick," you cannot get better than 90% quality unless ST actually has tick data to work with.

If you see "Mismatched chart errors" in your ST report, that indicates your historic data is incomplete or insufficient. See http://alansforexblog.com/2008/09/06/me ... imization/ for an explanation, and instructions on downloading M1 data. This should get you to 90% quality and may be sufficient for some EAs, especially if they hold their positions for more than just a few minutes. (Correct, experts?)

You can download tick data and load it into your Empty4 to increase to 99% quality. See e.g. http://eareview.net/tick-data
IF you load up tick data and use "every tick" testing, the ST tests should be as accurate as ST is capable of. I don't know how inaccurate it still might be or how/when those inaccuracies might occur. Anyone?
User avatar
Alpenkorps
Trader
Posts: 213
Joined: Thu Dec 15, 2011 4:03 am

Re: Getting to Know Empty4 Inside Out

Post by Alpenkorps »

Raf wrote:Can Empty4 be used in a 64-bit OS environment?
Yes of-course. All 64 bit OS are compatible with 32 bit applications (well most of the time). But with Empty4, its not a problem. It works just fine.
Take my love, take my land, Take me where I cannot stand
I don't care, I'm still free, You can't take the sky from me
User avatar
Alpenkorps
Trader
Posts: 213
Joined: Thu Dec 15, 2011 4:03 am

Re: Getting to Know Empty4 Inside Out

Post by Alpenkorps »

Khalaad wrote:How realistic to hope the following timeframes off-line charts all at the same time:

1. M3
2. M4
3. M10
4. M20
5. H2
6. H6
7. H8
8. H12 :?:

Khalid
I don't get it. If you want to have all of those off-line charts at a same time, it shouldn't be a problem as long as you have enough memory space (RAM) and a little CPU power. Off-line charts doesn't eat up much resources, TF Converter EA will just take M1 feed and make new candles as you want.
Take my love, take my land, Take me where I cannot stand
I don't care, I'm still free, You can't take the sky from me
User avatar
Alpenkorps
Trader
Posts: 213
Joined: Thu Dec 15, 2011 4:03 am

Re: Getting to Know Empty4 Inside Out

Post by Alpenkorps »

Thats a great habit Khalaad, Sometimes a little painful but always pays in the end :)

I tried Mihailo's renko strategy for a while (great strategy by the way) and learned about Empty4's off-line handling ability in a hard way ... man ... you should hear the sound my old lappy makes (The CPU cooler) when I pop up like 5 pairs ... :D

Anyway, you should try M10 chart sometime, really like that one.
Take my love, take my land, Take me where I cannot stand
I don't care, I'm still free, You can't take the sky from me
garyfritz

Re: Getting to Know Empty4 Inside Out

Post by garyfritz »

Question:

You can run multiple MT4s to run EAs/charts on different accounts.
Each Empty4 has to be installed in a different directory location.
This is a pain because it means you have to populate each one with all of your indicators/EAs/etc, and keep them all current.

Is there any reason you couldn't remove the "experts" folder from Empty4's #2 through #N, and replace it with a symbolic link to "experts" in Empty4 #1? See e.g. http://en.wikipedia.org/wiki/NTFS_symbolic_link

That way all MT4s would share the same set of EAs, indicators, etc. Not sure about templates since there are two "templates" folders, one in the "experts" folder and another one a level higher. Worst case you could probably get tricky and replace the "templates" folder in Empty4 #1 with a link to the higher-up "templates" in #1.

As far as I can see, no instance-specific data is stored in the "experts" folder. Empty4 can write out log files into the "logs" directory, but that shouldn't be a problem. I haven't experimented with this yet but I thought I'd ask for obvious problems before I tried it.
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Getting to Know Empty4 Inside Out

Post by gaheitman »

garyfritz wrote:Question:

You can run multiple MT4s to run EAs/charts on different accounts.
Each Empty4 has to be installed in a different directory location.
This is a pain because it means you have to populate each one with all of your indicators/EAs/etc, and keep them all current.

Is there any reason you couldn't remove the "experts" folder from Empty4's #2 through #N, and replace it with a symbolic link to "experts" in Empty4 #1? See e.g. http://en.wikipedia.org/wiki/NTFS_symbolic_link

That way all MT4s would share the same set of EAs, indicators, etc. Not sure about templates since there are two "templates" folders, one in the "experts" folder and another one a level higher. Worst case you could probably get tricky and replace the "templates" folder in Empty4 #1 with a link to the higher-up "templates" in #1.

As far as I can see, no instance-specific data is stored in the "experts" folder. Empty4 can write out log files into the "logs" directory, but that shouldn't be a problem. I haven't experimented with this yet but I thought I'd ask for obvious problems before I tried it.
It should work. These folks seem to be using it for:

templates: http://www.metatrader4.com/forum/11784#42725
experts: http://forum.mql4.com/8651#44517
history: http://forum.mql4.com/10807#62817

At least they never came back to complain about it not working. :D

I also think there was a comment about using it for a single file on the Hanover EA thread over at FF as a replacement for the file copy utility.

George
garyfritz

Re: Getting to Know Empty4 Inside Out

Post by garyfritz »

Thanks, George! I'll try it out.

Khalid, I doubt it. But depending on what you need, you could probably simulate it in an indy or EA. I've written TS systems that built "synthetic bars" out of lower-TF bars. So e.g. I could build M30 bars out of M5 bars, and have them start at any 5-min interval. It's messy but it's possible.
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Getting to Know Empty4 Inside Out

Post by gaheitman »

Khalaad wrote:
garyfritz wrote: Khalid, I doubt it. But depending on what you need, you could probably simulate it in an indy or EA. I've written TS systems that built "synthetic bars" out of lower-TF bars. So e.g. I could build M30 bars out of M5 bars, and have them start at any 5-min interval. It's messy but it's possible.
Gary,

Thank you for the support. :)

All I wish for is every Criminal, every :twisted: TE4 starting H1 bars at the top of the hour. I think when an EA is ready for real money trading, every trader, irrespective of which Criminal holds the account, should have a fairly equal chance of making a reasonable profit. Very hard to say: "EA here; your ability to make profit largly depends on which Criminal you trade with".

Khalid
I haven't tested this myself, but this guy seems to have modified the period_converter indicator to allow for:
  • Bar's opening timing shift
  • TimeZone shift
  • Omit Digit
http://forum.mql4.com/17169

This would seem to give us a criminal-agnostic time stream.

George
MichaelM
Trader
Posts: 117
Joined: Sun Dec 04, 2011 11:04 pm

Re: Getting to Know Empty4 Inside Out

Post by MichaelM »

Here's another crappity crap feature of Empty4 (I think?)

Basically, if you perform modifications to an internal variable inside the init() function.
Empty4 will perform those same modifications again (yes, ON TOP of said modification) after opening the Expert properties and pressing OK.

To get around it, if you are defining internal variables with a hardcoded value AND they are being modified inside init(), then you'll need to define those hardcoded values inside init() before modifying them.

Example: http://www.stevehopwoodforex.com/phpBB3 ... 6495#p6495
Last edited by MichaelM on Sun Feb 05, 2012 11:10 pm, edited 1 time in total.
skoda2008
Trader
Posts: 60
Joined: Wed Nov 16, 2011 12:20 am

Watch Out!

Post by skoda2008 »

Watch out for this doozy. I finished trading for the week and thought I'd stop the EA's from trading until Monday. Instead of closing down Empty4 altogether I just clicked on the EA disable button. To my shock, when I woke up in the morning a trade had been opened by the EA! I was running it on 20 pairs, and only one instance took a trade, not only did it open a trade, but it didn't set a TP or SL (2 stage broker) and the EA didn't continue to function and close the trade at the point it should have. The moral of the story is don't trust it and shut down Empty4 completely over the weekend.
Post Reply

Return to “Know your MT4 platform”