Simulation Setup for MT4 Expert Advisor

Simulation Setup

Popup Domination These are a few issue that I discovered when simulating with MT4 using History data. As the quality and accuracy of the history depends very much related to your trading strategy indicator and stoploss & profit taking.

a) Simulating M1 period result seems to yield the most accurate results from your EA. If you are using period H1 or any other period indicator or measurement of time, please replace 0 with PERIOD_H1 or any other time frame. Don't use in the strategy tester period H1, as the results will not be accurate if you plan to compare with real result. Therefore, use period M1 in your strategy tester. And modify your EA to run on in.



b) Downloading M1 result and using period_converter for 5, 15, 30, 60, 240, 1440 minutes will be getting more accurate results rather then just download and import M1 result from the internet. This will synchronize all other time frame with M1 as the base. The most realistic result you can get is from M1 timeframe, thus all other timeframe is actually using this M1 base. You can download from any internet website that provide time frame M1 from 2001 till date.


bannerc) In order to use the strategy tester in MT4 platform, you need to declare
static datetime nextRund
and use
if( nextRund > TimeCurrent() ) return(0);
nextRund = TimeCurrent() + 30;

The above will step thru your Period M1 and your Use date from yyyy.mm.dd to yyyy.mm.dd As the program automatically increment 30 seconds into nextRund (just a name datetime variable) and cause the if statement to exit the program via return(0). Which will exit the program or looping function (also eventually exit the program), and cause the strategy tester to step the TimeCurrent() to next period M1. During the tester, the TimeCurrent() will be simulated from start to end. As the program will exit, so all your variables that need to be valid (stay in memory when your program exist and execute again), please indicate static infront. This will enable that variable to be able to be use again (retain previous value) by the program.
You may need some times to understand the above, but read thru and try it out on the EA and you will learn how to use the above to your advantage.

d) Delay is not applicable to the strategy but you can use it freely on your EA while running live account. But using it in your EA to delay your looping or program while waiting for new live currency price is useful if you plan to run multiple currency using multiple strategy. Play around with different delay and you will notice the utilization of your CPU averaging over time instead of peaking at one point.
Please go try and use the above to improve your EA.

source: http://www.articlesbase.com/currency-trading-articles/simulation-setup-for-mt4-expert-advisor-2690896.html


The Little Book of Currency Trading: How to Make Big Profits in the World of Forex (Little Books. Big Profits)Click here to see 16 customer reviews and choose from 33 suppliers





Essentials of Foreign Exchange Trading (Essentials Series)Click here to see 21 customer reviews and choose from 34 suppliers




All About Forex Trading (All About Series)Click here to see 4 customer reviews and choose from 31 suppliers

No comments:

Post a Comment

Top Forex Automated Trading Expert Advisor (EA)


Forex EAROI (Monthly)Profit FactorMax Draw DownS3 ScoresStar RatingAlexa.com
FAP Turbo207%31.770.32%280 points5 starsRank 31,123
GPS Forex Robot28%3.935.68%260 points4 starsRank 283,290
Forex MegaDroid19.8%NANA250 points4 starsRank 72,310
Leo Trader Pro32%2.855.84%250 points4 starsRank 213,570

Fully editable *.mq4 files that compile successfully with no errors (3MB zip file with 200+ EA codes. Including 40+ strategies from the Strategy Book. You can download the Free Strategy Book by joining my email newsletter on the right side of this website. Click "Buy Now" to make payment and instant down the Best Forex Ranking Cook Book at USD $79 (One time payment only) Click here for more info

Please inform me if unable to purchase or download (send to sngerge@gmail.com)