Evan Carmichael Top Header about About About facebook Twitter YouTube Google+

Simulation Setup for MT4 Expert Advisor



Free PDF Download
Financial planning in relationship - By Sng Chong How

Name: Email:


Simulation Setup

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.

c) 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.


Related Articles

  Which is the most popular forex expert advisor?
  Best FX Trading EA Expert Advisor
  How To Install Expert Advisor Onto MT4 Automated Trading
  Which is the Best Forex Trading EA
  How to run multiple trading accounts in MT4 currency trading
  Money Management: Developing a Good Practice with the Guidance of a Financial Advisor
  Top Forex Trading System
  How to trade FX for a living
  Start Autotrading today
  Problems Between MT4 Simulation Results EA and Actual Live Trading Result
  Boost Your Business -- Become An Advisor
  Sales simulations – a blue ribbon training methodology
  Sales simulations - high impact training designs
  How to Setup an Income Tax Payment Plan
  How to Be a Trusted Advisor
  Best Automated FX Trading System
  Running an Electronic Medical Records Simulation Day
  How Virtual IT Support Can Help Your Small Business?
  Don’t Hire A Business Advisor / Brokers For Your M&A And Capital Loan Needs In Canada
  The Best Financial Services Come From the Right Advisor

Home > Business-Financing > Sng Chong How > Simulation Setup for MT4 Expert Advisor >

Free PDF Download
Financial planning in relationship - By Sng Chong How

Name: Email:

About the Author: Sng Chong How

RSS for Sng's articles - Visit Sng's website

I support green products and actively involved in recycling movement. Currently am blogging and trading Forex to earn extra income to support family on top of having a full-time job.


Click here to visit Sng's website.
Dashed Line

More from Sng Chong How
Leverage And Forex Trading
How to use High Low Open and Close price in automated currency trading
How to choose MQL4 Live trading result for automated Forex Trading
Top Forex Trading System
Closing the gap between MT4 Demo and MT4 Live trading

Related Forum Posts

Re: Best Internet Marketing Strategy Re: Best Internet Marketing Strategy
AdSense revenue sharing AdSense revenue sharing
Re: How can I promote my site? Re: How can I promote my site?
Re: Service Or Product? Re: Service Or Product?
Introduction Introduction

Share this article. Fund someone's dream.

Share this post and you'll help support entrepreneurs in Africa through our partnership with Kiva. Over $50,000 raised and counting - Please keep sharing! Learn more.
Share for a Cause
Featured Article



Worksheets
By: Evan Carmichael

Do you have what it takes to be an entrepreneur?

8 Powerful Steps to Finding Your Passion

Does your pitch suck?

Create a plan of attach to launch your new business.

8-Cover

Like this page? PLEASE +1 it! Evan Signature
Bottom Footer



Newsletter

Get advice & tips from famous business
owners, new articles by entrepreneur
experts, my latest website updates, &
special sneak peaks at what's to come!
Name:
Email:
Popular Articles

Ready for a Fresh Image?

Blogheads

The Magic of Marketing in Action

Suggestions

Email us your ideas on how to make our
website more valuable! Thank you Sharon
from Toronto Salsa Lessons / Classes for
your suggestions to make the newsletter
look like the website and profile younger
entrepreneurs like Jennifer Lopez.