molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Thu May 09, 2024 7:48 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: MT4 Backtester and Solving a Frustrating Quirk
PostPosted: Wed Jul 18, 2012 3:52 pm 
Offline

Joined: Wed Mar 14, 2012 12:31 am
Posts: 118
General Note to All:

When you start the back-testing phase of your Bot developments, you will no doubt start to run head-first into some interesting MT4 design characteristics (to put it softly). One of those quirky characteristics, happens to come into play when you begin the optimization work on your bot designs.

Keep this protocol firmly in mind. Whenever (absolutely whenever) you Save any (absolutely any) change to your .mol and then re-start and/or re-run the MT4 Tester, please do yourself a HUGE favor by remembering that in order to actually test the Saved changes you just made to your .mol, you will have to click on the Tester's "Expert Properties" button and:

a) Reset the Testing Tab
b) Reset the Inputs Tab
c) Reset the Optimization Tab

If you only reset the Testing Tab, MT4 will not reset any other Tab under Expert Properties. The exact same thing holds true for the Inputs and the Optimization Tabs. You MUST reset ALL THREE TABS BEFORE you begin the test containing the recently Saved .mol changes.

The designers of MT4 left this part under your control - so you have to remember exactly which set of properties in your EA, you wish to run using a different set of values (the most recently Saved .mol changes). You also have to remember that those test values may be contained within THREE different locations: Testing Tab, Inputs Tab and Optimization Tab.

You DO NOT always have to do this - however - if you want to remain consistent across ALL back-testing cycles, then you might want to establish the protocol of resetting ALL three tabs, each time you Save a change to your .mol. This way, you will not forget to reset certain properties that you just changed in Molanis.

It cost me several hours worth of work, trying to hunt down "bad code" because I saw trades that did not execute when they were supposed to, based on the Saved changes to the .mol file. The reason the trades did not execute had nothing to do with the code, but with the fact that simply Saving changes to the .mol file WITHOUT also resetting the Expert Properties Tabs, meant that NONE of the Saved changes relating to the .mol were actually being tested.

So, I was sitting there like a total idiot re-running tests, scratching my head after verifying that the code was properly written and never knowing WHY the trades would fail to execute when the code said that they absolutely should be executed. It was out of a total hunch, that I decided to check the Input Tab under Experts Properties within the Back-Tester, that I noticed my Saved changes to the .mol were not being reset.

This should save lots of time, headache and frustration for those that do not already know about this. I only wish that somebody had told me about it - a long time ago. My goodness! How many EA designs have I simply tossed out, thinking that they were bad designs, or thinking that something was wrong with Molanis, when neither was the case.

This is a perfect example of poor Modal Consistency in MT4. MT4 should assume that ANY changes that are Saved to the .mq4 and compiled to the .ex4, are the new desired inputs to the EA - period. MT4 should then FORCE the user to UNDO the recently Saved changes to the .mq4/.ex4, by using the Expert Properties Tabs to "reset" the portions of the EA according to the users needs. Otherwise, the user is forced to make changes to the EA in multiple locations, whether they used the MT4 Editor, or some other third-party IDE to design their EA.

Learn about the MT4 Back-Tester Expert Properties Tabs: Testing, Inputs and Optimization. It is absolutely essential that you fully understand how they work and how they will impact your Saved EAs.

Un.....be....l i e v a b l e.


Top
 Profile  
 
 Post subject: Re: MT4 Backtester and Solving a Frustrating Quirk
PostPosted: Thu Aug 02, 2012 11:24 am 
Offline

Joined: Wed Jul 18, 2012 11:06 pm
Posts: 78
Thanks for sharing cfx! 8-)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009