There are a few factors that you have to consider when setting up the Expert Advisor (EA) to run on your MT4 simulator. With proper setup and configuration, the simulated result will yield positive result when run the EA on live account.
Below are some configurations for your consideration.
1) The choice of simulation chart period. The commonly used charting period is 1 minute chart (M1), 5 minutes chart (M5), 15 minutes chart (M15), 1 hour chart (H1), 4 hour chart (H4) and 1 day chart (D1). From my experiences, simulating with M1 period result will produce accurate results from your EA. Any chart time frame greater then 1M, will result in frame stepping by the simulator. The simulator will step thru the time frame and aggregate the closet to your number, which can cause false breakout and unrealistic result.
2) Use fully downloaded M1 result from a data server. Many broker nowadays support client to backwards download data from now to 2002 (at least last 10 years of data). Once full M1 data downloaded, you can use period converter to convert to M5, M15, H1, H4 and D1 database. This will complete the database that is used by simulator when called to run back testing for your EA.
3) Most EA are ready to be used for live and demo trading. However, if you are modifying a EA that is meant for live trading, you need to include below 3lines of code to let it run in back testing mode by the simulator.
line1: static datetime nextRund
line2: if( nextRund > TimeCurrent() ) return(0);
line3: nextRund = TimeCurrent() + 30;
The above codes with delay your program by 30 seconds before it proceed to executed the next program. You cannot use while loop or jump program as it is non static and will stop the moment the program executed the last line of code. The above actually set a static variable and this variable is match with the time in the PC. As this variable is static, it will stay in memory when your program exist and execute again. The 30 is default in terms of seconds. This may be difficult at first, but after some trial and error, you will get use to it and use different time seconds to your advantage.
4) Delay is non static but it can be use to temporarily stop the program while running other function. This is extremely using if you are running multiple EA and executing on a single data server. By setting different delays, your program will execute at different time thus not congesting the order send to your server. This act as multitasking your order and does average your CPU utilisation over time.
source http://www.selfgrowth.com/articles/how-to-setup-mt4-expert-advisor-simulation
A straightforward guide to trading today's dynamic Forex market
Written
by Wayne McDonell, the Chief Currency Coach at FX Bootcamp, this book
shows readers how to successfully trade the Forex market on their own.
FX Bootcamp's Guide to Strategic and Tactical Forex Trading skillfully
explains how to combine popular technical indicators to
formulate a comprehensive market strategy. Readers will then learn how
to focus on using this information to create a tactical trading
plan--one that will help them pull the trigger to get in and out of a
trade. Along the way, McDonell takes the time to discuss the various
challenges a Forex trader faces, such as greed, fear, loss, and
isolation. As a Forex trader and educator of traders, Wayne McDonell
knows what it takes to make it in the competitive world of Forex. And
with FX Bootcamp's Guide to Strategic and Tactical Forex Trading he shows readers how.
Editorial Reviews
From the Inside Flap
In The Art of War, renowned military strategist Sun Tzu states,
"The general who wins the battle makes many calculations in his temple
before the battle is fought. The general who loses makes but few
calculations beforehand." While this observation comes from one of the
oldest military treatises in the world, it's an important piece of
advice for traders looking to win in today's dynamic Forex market.As
the Chief Currency Coach at FX Bootcamp, author Wayne McDonell helps
clients around the world excel in the Forex field by training them to
develop and execute a trading plan with military precision. Why does
this approach work so well? The answer is simple???trading Forex is
similar to war in that they are both zero-sum games, and in Forex
trading, this means that one trader's gain can only come from another's
equivalent loss. So, outthinking your opponent is essential to victory
in both of these arenas.
Divided into five comprehensive parts, The FX Bootcamp's Guide to Strategic and Tactical Forex Trading puts this competitive market in perspective and shows you how to achieve success within it. This reliable resource opens with a detailed look at the technical indicators you'll need to use in your trading endeavors. From here, you'll discover how to combine these popular indicators to formulate a comprehensive strategy and learn how to use this information to create a tactical trading plan???one that will help you pull the trigger to get in and out of trades.
Besides introducing you to a proven Forex trading methodology and showing you how to improve performance by running your trading operations like a business, this book also addresses some the most important psychological aspects of trading???including greed, fear, loss, and isolation???and discusses what you must do to overcome such obstacles.
In Forex trading, patience and discipline are just as important as technical and fundamental analysis. With The FX Bootcamp's Guide to Strategic and Tactical Forex Trading, you'll discover how developing positive trading habits and the right trading skills will put you in a better position to profit over the long haul.
Divided into five comprehensive parts, The FX Bootcamp's Guide to Strategic and Tactical Forex Trading puts this competitive market in perspective and shows you how to achieve success within it. This reliable resource opens with a detailed look at the technical indicators you'll need to use in your trading endeavors. From here, you'll discover how to combine these popular indicators to formulate a comprehensive strategy and learn how to use this information to create a tactical trading plan???one that will help you pull the trigger to get in and out of trades.
Besides introducing you to a proven Forex trading methodology and showing you how to improve performance by running your trading operations like a business, this book also addresses some the most important psychological aspects of trading???including greed, fear, loss, and isolation???and discusses what you must do to overcome such obstacles.
In Forex trading, patience and discipline are just as important as technical and fundamental analysis. With The FX Bootcamp's Guide to Strategic and Tactical Forex Trading, you'll discover how developing positive trading habits and the right trading skills will put you in a better position to profit over the long haul.
From the Back Cover
Praise for The FX Bootcamp's GUIDE TO Strategic and Tactical Forex Trading"Wayne
McDonell is the most popular Forex speaker on our Web site. His live
training and educational events draw large crowds of traders because he
can explain complex Forex trading concepts in a common language that
anyone can understand. This book does the same. I highly recommend it."
—Francesc Riverola, CEO of FXstreet.com
"If
you're looking for specific strategies and methods for making money
with currency trading, you need to start reading this book today. Wayne
knows from experience what it takes to succeed in the Forex markets. He
provides step-by-step instructions and explains in common language what
to look for in charts and in the news to find profitable trades
immediately. Don't make a single Forex trade until you've read this
book!"
—Tim Bourquin, founder of The Forex Trading Expo
With The FX Bootcamp's Guide to Strategic and Tactical Forex Trading,
McDonell shares his invaluable experience as a Forex trader and
commodities trading advisor with you. Filled with in-depth insights and
practical advice, this straightforward guide will teach you how to think
for yourself and trade successfully—relying on your own technical,
fundamental, and even psychological analysis. First, you'll become
familiar with the indicators—from moving averages to price support and
resistance—that form the foundation of the trading methodologies
discussed in the book. Then, you'll discover how to put together a
trading plan, and trade that plan for maximum profits. Along the way,
McDonell also takes the time to discuss the various challenges you may
face while trading Forex and explains how treating your trading
operations like a business can improve overall performance.
If you
want to be a successful Forex trader, you must have a firm
understanding of how the global market works and how to trade it. With
The FX Bootcamp's Guide to Strategic and Tactical Forex Trading, you'll
quickly learn how to gather intelligence, formulate a strategy, and
confidently pull the trading trigger.
About the Author
WAYNE McDONELL is the Chief Currency Coach of FX Bootcamp (www.fxbootcamp.com), a live Forex training organization. He is a professional Forex trader, a member of the National Futures Association, and a registered Commodities Trading Advisor. Respected in the Forex industry as a successful trainer, McDonell is a regular speaker at major investing conferences and expos in Asia, Europe, and America. His videos are syndicated around the world on outlets including Forex Television, FXstreet.com, MoneyShow.com, and MSN. His live trading Webinars have attracted up to 1,000 traders each. McDonell has written "how-to" articles for investing magazines, such as Your Trading Edge and the FOREX Journal magazine. He has also received notoriety in the National Post, TechWeek, Interactive Week, and Inc. magazine to name a few.
The FX Bootcamp Guide to Strategic and Tactical Forex Trading (Wiley Trading) Click here to read amazon customer reviews and rating
No comments:
Post a Comment