<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Trade Machine Blog &#187; Backtesting</title>
	<atom:link href="http://thetrademachine.com/blog/category/backtesting/feed/" rel="self" type="application/rss+xml" />
	<link>http://thetrademachine.com/blog</link>
	<description>Forex Trading Software, Expert Advisors</description>
	<lastBuildDate>Wed, 06 Jan 2010 16:36:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Metatrader Optimization</title>
		<link>http://thetrademachine.com/blog/2009/10/08/metatrader-optimization/</link>
		<comments>http://thetrademachine.com/blog/2009/10/08/metatrader-optimization/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 17:42:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Backtesting]]></category>
		<category><![CDATA[Back Test]]></category>
		<category><![CDATA[Metatrader]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://thetrademachine.com/blog/?p=376</guid>
		<description><![CDATA[Metatrader’s Strategy Tester allows you to optimize your expert advisor to find the most profitable settings for the multitude of possible input variable combinations.  You can optimize an expert advisor on a specific chart for a specific time period to find out which input values produced the highest returns and lowest drawdown. 
&#160;
However, it [...]]]></description>
			<content:encoded><![CDATA[<p>Metatrader’s Strategy Tester allows you to optimize your expert advisor to find the most profitable settings for the multitude of possible input variable combinations.  You can optimize an expert advisor on a specific chart for a specific time period to find out which input values produced the highest returns and lowest drawdown. </p>
<div>&nbsp;</div>
<p>However, it is important to remember that you should not over-optimize.  You may get amazing results with a specific input combination, but because the values are so constrained, you probably won’t see results like that in the future.  When optimizing an expert advisor, remember to use your head and think about why you are getting the results you are.  Was it from one huge winner that you are unlikely to see in the future?  Or did it win many times, making it a plausible trade setup for the future. </p>
<div>&nbsp;</div>
<p>Don’t forget, you need to have high quality minute data for optimization to be worthwhile.   See our article on <a href="http://thetrademachine.com/blog/2009/09/29/set-up-metatrader-history-data-get-90-backtesting-quality/">setting up your metatrader history data</a>.</p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<h2>How To Optimize &#8211; Step By Step</h2>
<div>&nbsp;</div>
<p>To get started optimizing your expert advisor, open Strategy Tester.  If you are new to backtesting, read our article:  <a href="http://thetrademachine.com/blog/2009/10/01/backtesting-with-metatraders-strategy-tester/">How to Backtest in Metatrader</a></p>
<div>&nbsp;</div>
<p>Select the <em>Expert Advisor</em> from the pull down menu.  Choose a currency <em>Symbol </em>and <em>Period</em>.  Select <strong>Every Tick</strong> for <em>Model</em>. Check <em>Use Date</em> and select a time frame that you have high quality minute history data for.   Finally check the box next to <em>Optimization</em>.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/optimization/optimization-check-box.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>Next, click on the Expert Properties button on the right.  Select the INPUTS tab to enter the range of values you will optimize for.  The <em>Start </em>value is the lowest value that you start from.  <em>Stop </em>is the highest.  And <em>Step </em>is the increment that you step through the range.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/optimization/optimization-inputs.jpg" /></p>
<div>&nbsp;</div>
<p>For the TakeProfit value, you can see that we start at 50, step through at 25, and stop at 300.  This will test every value inbetween 50 and 300 in a 25 increment.  So, 50, 75, 100, 125, all the way up to 300.  The same idea applies to the other variables. </p>
<div>&nbsp;</div>
<p>The checkbox on the left must be checked to optimize for that variable.  Otherwise, it will use the regular <em>Value</em>.  </p>
<div>&nbsp;</div>
<p>When you’re finished entering your input values, click OK.   Now we’re ready to start the optimization.  Click the Start button on the bottom right of the Strategy Tester window.  The backtest may take minutes or hours depending on how many values you are optimizing for.  You may want to choose a larger increment <em>Step </em>value or a smaller range if it is taking too long.</p>
<div>&nbsp;</div>
<p>After the optimization has completed, select the Optimization Results tab to look through the results.  You can sort by the values at the top.  Select <em>Profit </em>to view in order of highest returns, or <em>Drawdown </em>to see which values had the least risk.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/optimization/optimization-results-tab.jpg" /></p>
<div>&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://thetrademachine.com/blog/2009/10/08/metatrader-optimization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analyzing Backtest Results in Metatrader Strategy Tester</title>
		<link>http://thetrademachine.com/blog/2009/10/02/analyzing-backtest-results-in-metatrader-strategy-tester/</link>
		<comments>http://thetrademachine.com/blog/2009/10/02/analyzing-backtest-results-in-metatrader-strategy-tester/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 16:21:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Backtesting]]></category>
		<category><![CDATA[Metatrader]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[Back Test]]></category>

		<guid isPermaLink="false">http://thetrademachine.com/blog/?p=220</guid>
		<description><![CDATA[Okay, so you've completed your backtest using Metatrader Strategy Tester.  Now let’s look at the results.

<div>&#160;</div>

There are four tabs to look through:  <strong>Report</strong>, <strong>Graph</strong>, <strong>Results</strong>, and <strong>Journal</strong>]]></description>
			<content:encoded><![CDATA[<p>Okay, so you&#8217;ve <a href="http://thetrademachine.com/blog/2009/09/29/set-up-metatrader-history-data-get-90-backtesting-quality/">set up your history data</a> and completed your <a href="http://thetrademachine.com/blog/2009/10/01/backtesting-with-metatraders-strategy-tester/">backtest using Metatrader Strategy Tester</a>.  Now let’s look at the results.</p>
<div>&nbsp;</div>
<p>There are four tabs to look through:  <strong>Report</strong>, <strong>Graph</strong>, <strong>Results</strong>, and <strong>Journal</strong></p>
<div>&nbsp;</div>
<h2>Report:</h2>
<div>&nbsp;</div>
<p>This is the meat of the backtest. All the statistics of the backtest are displayed here.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/backtesting/fade-machine-2002-report.jpg" /></p>
<div>&nbsp;</div>
<p><strong>• Bars In Test</strong> &#8211; Displays the depth of the history on which the modeling was based.</p>
<div>&nbsp;</div>
<p><strong>• Ticks Modelled</strong> &#8211; Displays the size of the modeled sequence. Every record of the sequence represents the bar state (OHLCV) at one or another moment. Different bar states can be modeled depending on the timeframe, modeling method, and presence of history data from smaller timeframes within a bar. </p>
<div>&nbsp;</div>
<p><strong>• Modelling Quality</strong> &#8211; Calculated according to the following formula.  This should be 90%.  If not, read our article on <a href="http://thetrademachine.com/blog/2009/09/29/set-up-metatrader-history-data-get-90-backtesting-quality/">downloading and setting up history data</a>.</p>
<div>&nbsp;</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><small>ModellingQuality = ((0.25*(StartGen-StartBar) +<br />
                     0.5*(StartGenM1-StartGen) +<br />
                     0.9*(HistoryTotal-StartGenM1)) / (HistoryTotal-StartBar))*100%;</small></strong></p>
<div>&nbsp;</div>
<p><strong>• Gross Profit</strong> &#8211; The summed up profit for all profitable transactions;</p>
<div>&nbsp;</div>
<p><strong>• Gross Loss</strong> &#8211; The summed up loss for all unprofitable transactions;</p>
<div>&nbsp;</div>
<p>    <strong>• Total Net Profit</strong> &#8211; The Gross profit minus the Gross loss.</p>
<div>&nbsp;</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><small>TotalNetProfit = GrossProfit &#8211; GrossLoss</small></strong></p>
<div>&nbsp;</div>
<p>    <strong>• Profit Factor</strong> &#8211; Profit factor, shows the ratio between gross profit and gross loss. The larger this number is, the better.  </p>
<div>&nbsp;</div>
<p><strong><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ProfitFactor = GrossProfit / GrossLoss</small></strong></p>
<div>&nbsp;</div>
<p><strong>• Expected Payoff</strong> &#8211;  Calculated as follows:</p>
<div>&nbsp;</div>
<p><strong><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Expected Payoff = (ProfitTrades / TotalTrades) * (GrossProfit / ProfitTrades) &#8211;<br />
                  (LossTrades / TotalTrades) * (GrossLoss / LossTrades)<br />
</small></strong></p>
<div>&nbsp;</div>
<p>    <strong>• Absolute Drawdown</strong> &#8211; Absolute drawdown is the difference between the initial deposit and the smallest value of balance within testing:</p>
<div>&nbsp;</div>
<p><strong><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AbsoluteDrawDown = InitialDeposit &#8211; MinimalBalance</small></strong></p>
<div>&nbsp;</div>
<p><strong>• Maximal Drawdown</strong> &#8211;  The highest difference between one of local upper extremums of the balance graph and the following lower extremums:</p>
<div>&nbsp;</div>
<p><strong><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MaximalDrawDown = Max of (Maximal Peak &#8211; next Minimal Peak)</small></strong></p>
<div>&nbsp;</div>
<p>The rest of the statistics are pretty self explanatory, so we won&#8217;t waste time defining those.  For more information on this, visit <a href="http://www.metaquotes.net/experts/articles/tester_report/" target="blank">Metatrader&#8217;s website on backtesting</a></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<h2>Graph:</h2>
<div>&nbsp;</div>
<p>This is pretty obvious, it is a graph of the Expert advisor’s trade results.  The green lines at the bottom mark the lot sizes.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/backtesting/fade-machine-2002-graph.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<h2>Results:</h2>
<div>&nbsp;</div>
<p>This tab displays every order placed with the running total of your account balance.</p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<h2>Journal:</h2>
<div>&nbsp;</div>
<p>This displays any errors and status messages.</p>
]]></content:encoded>
			<wfw:commentRss>http://thetrademachine.com/blog/2009/10/02/analyzing-backtest-results-in-metatrader-strategy-tester/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Backtesting with Metatrader&#8217;s Strategy Tester</title>
		<link>http://thetrademachine.com/blog/2009/10/01/backtesting-with-metatraders-strategy-tester/</link>
		<comments>http://thetrademachine.com/blog/2009/10/01/backtesting-with-metatraders-strategy-tester/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 17:24:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Backtesting]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[Metatrader]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[Back Test]]></category>

		<guid isPermaLink="false">http://thetrademachine.com/blog/?p=184</guid>
		<description><![CDATA[So you’ve just gotten your hands on a hot new expert advisor and you need to know if this thing is really going to work.  It’s time to get your hands dirty and start testing.  There are two types of testing you should do:  forward testing and backtesting.  
&#160;
But first, make [...]]]></description>
			<content:encoded><![CDATA[<p>So you’ve just gotten your hands on a hot new expert advisor and you need to know if this thing is really going to work.  It’s time to get your hands dirty and start testing.  There are two types of testing you should do:  forward testing and backtesting.  </p>
<div>&nbsp;</div>
<p>But first, make sure you have high quality minute data for your backtest.  Read our previous article on <a href="http://thetrademachine.com/blog/2009/09/29/set-up-metatrader-history-data-get-90-backtesting-quality/">Downloading and Setting up History Data to Get 90% Backtesting Quality</a>.</p>
<div>&nbsp;</div>
<p><strong>Forward Testing:</strong><br />
Forward testing simply means to open a demo account and run the expert advisor in real time to see how it works and performs.   Forward testing is essential, however it takes a lot of time before you get a good idea about how the expert advisor will perform.  Instead of relying solely on forward testing, we can also perform backtests.  </p>
<div>&nbsp;</div>
<p><strong>Backtesting:</strong><br />
Backtesting lets you test years of data in just minutes.  So, before we decide to spend a lot of time forward testing, we can use Metatrader’s Strategy Tester to see how it will perform long term.</p>
<div>&nbsp;</div>
<p>Strategy Tester also allows you to optimize your expert advisor.  See our <a href="http://thetrademachine.com/blog/2009/10/08/metatrader-optimization/">optimization article</a> on this.</p>
<div>&nbsp;</div>
<h2>History Data</h2>
<div>&nbsp;</div>
<p>Before you start backtesting you will need to make sure you have complete and accurate history data set up.  If your modeling quality is less than 90% or you see mismatched chart errors, then your data is insufficient.  </p>
<div>&nbsp;</div>
<p>To download history data and learn how to set it up, read our previous article:  <a href="http://thetrademachine.com/blog/2009/09/29/set-up-metatrader-history-data-get-90-backtesting-quality/">How To Set Up Metatrader History Data And Get 90% Backtesting Quality</a></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<h2>Strategy Tester Backtest Settings</h2>
<div>&nbsp;</div>
<p>Now that you have your history data set up, let’s start backtesing!</p>
<div>&nbsp;</div>
<p>To open the Metatrader backtesting window, select from the top menu:  <strong>VIEW > STRATEGY TESTER</strong> (or Ctrl + R for the shortcut).  The window should open in the bottom of the terminal and look something like this:</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/backtesting/strategy-tester-2.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>Most of the Strategy Tester input values are pretty self explanatory.  First, select your <strong><em>Expert Advisor</em></strong> and the <strong><em>Symbol</em></strong> of the currency pair you want to test.</p>
<div>&nbsp;</div>
<p>For <strong><em>Model</em></strong> enter <em>Every Tick (the most precise method based on all available least timeframes to generate each tick)</em>.  This mode allows to model price movement within a bar the most precisely. </p>
<div>&nbsp;</div>
<p>For <strong><em>Period</em></strong> enter the time frame you want.</p>
<div>&nbsp;</div>
<p>Leave <strong><em>Optimization</em></strong> unchecked for the moment.</p>
<div>&nbsp;</div>
<p>Check <strong><em>Use Date</em></strong> and select the start time and end time that you want to test.  Make sure you have quality history data for this time period.</p>
<div>&nbsp;</div>
<p>Select <strong><em>Visual Mode</em></strong> only if you want a visually step through the backtesting.  Go ahead and try this to see how it works.  It is a good tool for checking the logic of your expert advisor and to spot any errors.  However, it does take a little more time to perform, so you might not want to always use this.</p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>Next, click on the <strong><em>Expert properties</em></strong> button on the right.</p>
<div>&nbsp;</div>
<p>Select the TESTING tab.  Enter an <em>Initial Deposit</em> value and leave everything else the same.</p>
<div>&nbsp;</div>
<p>Select the INPUTS tab.  This is where you enter any input values for your expert advisor.  These will vary depending on your own EA.  Change what you want, or leave the default settings.</p>
<div>&nbsp;</div>
<p>Don’t worry about the OPTIMIZATION tab for now.  Click OK to close the box.</p>
<div>&nbsp;</div>
<p>Now you are ready to start your back test.  Hit the <strong>START</strong> button and let’s see what results we get.  Depending on your EA and computer memory, it may take several minutes to hours to complete.</p>
<div>&nbsp;</div>
<p>Once your backtest has completed, it is time to <a href="http://thetrademachine.com/blog/2009/10/02/analyzing-backtest-results-in-metatrader-strategy-tester/"><strong>Analyzing the backtest results ></strong></a></p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/backtesting/strategy-tester-1.jpg" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thetrademachine.com/blog/2009/10/01/backtesting-with-metatraders-strategy-tester/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Set Up Metatrader History Data And Get 90% Backtesting Quality</title>
		<link>http://thetrademachine.com/blog/2009/09/29/set-up-metatrader-history-data-get-90-backtesting-quality/</link>
		<comments>http://thetrademachine.com/blog/2009/09/29/set-up-metatrader-history-data-get-90-backtesting-quality/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 04:00:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Backtesting]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[Metatrader]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[Back Test]]></category>

		<guid isPermaLink="false">http://thetrademachine.com/blog/?p=113</guid>
		<description><![CDATA[Setting up Metatrader 4 for backtesting can be a tricky, time consuming, and a little frustrating if you aren’t entirely sure you have it all working properly.  This article will guide you through the entire process from obtaining high quality minute history data to installing a separate backtesting account to importing and converting the [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up Metatrader 4 for backtesting can be a tricky, time consuming, and a little frustrating if you aren’t entirely sure you have it all working properly.  This article will guide you through the entire process from obtaining high quality minute history data to installing a separate backtesting account to importing and converting the tick data to different time frames.  In no time you will be up and backtesting years of history data with 90% modeling quality!</p>
<div>&nbsp;</div>
<p><strong>Step 1:</strong>	 <a href="http://www.megaupload.com/?d=XVUE3SF6" target="blank">Download high quality minute (M1) Alpari history data for Metatrader</a>.  This link takes you to Megaupload where the file is hosted.  Save and extract the data into a folder for future use.</p>
<div>&nbsp;</div>
<p><strong>Step 2:</strong>	Download a new installation of <a href="http://www.metaquotes.net/downloads/">Metatrader</a> from <a href="http://www.metaquotes.net/">Metaquotes.net</a>.  This will be your testing version of Metatrader.  Install it in a new folder, making sure not to copy over any existing installations of Metatrader.  I’ve named my new version <em>MetaTrader 4 Tester 2</em>.</p>
<div>&nbsp;</div>
<p><strong>Step 3:</strong>	When Metatrader installer asks you if you want to launch Metatrader upon completing the installation, choose to NOT launch Metatrader by UNCLICKING the check box.  Then select finish the installation.</p>
<div>&nbsp;</div>
<p><strong>Step 4:</strong>	After you have finished installing a new version of Metatrader 4, delete all the folders within your Metatrader history folder.  To find this folder browse the Metatrader program file where it was installed.  This is typically in the directory:  <strong>Program Files > Metatrader 4</strong> (or whatever you chose to name this) <strong>> history</strong>.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/delete-history-folders.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p><strong>Step 5:</strong>	Now that you have deleted all of the history files, launch Metatrader 4 Terminal and create a demo account with whatever broker they offer you.  You should be prompted to create this demo account when you first open Metatrader.  If you are not, don&#8217;t worry.  Just right click ACCOUNTS on the left and choose to OPEN AN ACCOUNT.</p>
<div>&nbsp;</div>
<p><strong>Step 6:</strong>	Once your new demo account has been created, you will need to DELETE it.  Yes, you read that correctly.  We need to delete the demo account we just opened.  We do this to prevent the demo account from overwriting the history data that we will be importing in upcoming steps.  You are probably asking:  Then why did we open this demo account to begin with?  The reason is to create a folder structure for all the currency pairs, which we will be importing data into very soon.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/delete-demo-account.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p><strong>Step 7:</strong>	After you delete your new account, close Metatrader.  Now we are going to take the Alpari history data we downloaded and extracted earlier and move it into our Metatrader Demo account folder.  Browse to the history folder within your Metatrader folder as we did earlier.  You should see a folder of the demo account we created and then deleted earlier (Note:  if you can&#8217;t see this folder and you are running Windows Vista, you may need to change some settings in Vista before you can see this folder.  You can also skip this step and just import the history files from wherever they currently are in the upcoming steps.) </p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/place-history-data-here.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>Before we copy over the M1 history data, make sure there aren&#8217;t any left over .hst files from your demo account.  If there are delete those.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/delete-remaining-history-files.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>Now copy over all of the history data files to this demo folder. Copy over just the files and not the folder structure so that you end up with all the data files together in the demo folder like this:</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/copy-files-over.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p><strong>Step 8:</strong>  Next, re-launch the Metatrader terminal.  From now on, every time you launch Metatrader, you will be prompted to “Open An Account”.   Choose CANCEL each time you are asked this in the future.  </p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/cancel-account-open.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>You will also be asked to login to your account.  Click CANCEL for this one each time too.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/cancel-account-login.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p><strong>Step 9:</strong>	Now we need to change the chart settings to their maximum values so that they can hold all the tick data we will be importing.  With Metatrader open, select TOOLS > OPTIONS.  </p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/tools-options.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>Choose the CHARTS tab and edit the “Max Bars In History” and “Max Bars In Chart” to their maximum values by entering as many ‘9’s as it will let you.  Click OK.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/set-chart-max-values.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>The next time you open this options menu these max values will be readjusted to the highest number of bars allowed:</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/set-chart-max-values-2.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p><strong>Step 10:</strong>	Next, go to TOOLS > HISTORY CENTER (or press F2 for the shortcut).   </p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/tools-history-center.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>On the left hand side find the currency pair that you want to import data for.  We have chosen AUDUSD.  Expand the menu so that you can see the different time frames.  They should be grayed out at the moment.  Double click on the 1 Minute timeframe of your pair to select it.  It will stay grayed out, but you need to double click it so that we can import the minute data.  </p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/history-center-select-m1.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p><strong>Step 11:</strong>	Click IMPORT.  Then click BROWSE and go to the <strong>Metatrader > history > demo account directory</strong> where we placed the minute data earlier.  Select the minute data and open it.  You may need to change <em>File Type</em> from <em>ASCII Text</em> to <em>All Files</em> so that you can see the data to open.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/select-import-data.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>You should see the data populate the import box.  It may take a few moments to load.  If it still doesn’t load, you may need to enter a ‘1’ for Skip Columns.  Or you if the data is not separated by commas, change it to whatever format it is in.  For ours, the only thing we changed was Skip 1 Column.  Once the data is loaded, hit OK.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/import.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>Because the data is separated into 2 files of different time periods for each pair, you will need to import each file like we did above.  So, after we import the data for AUDUSD 2001-2006, we will import again for the other AUDUSD file &#8220;M1_AUDUSD&#8221;.  Once we complete this, we will have a complete time period from 2001 to 2009.  </p>
<div>&nbsp;</div>
<p>Repeat these steps of importing data for each pair.  Once you have finished, hit OK to exit the History Center.</p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p><strong>Step 12:</strong>	 Open a chart for a pair that you imported data into.  Select the Minute timeframe (M1) at the top.  You should see a chart of the minute data for the time period that you imported.   All other time frames should still say “Waiting for update” because we still have to convert the minute data into all those time frames.</p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/open-chart-audusd.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p><strong>Step 13:</strong>	<strong>Converting The Data</strong> &#8211;  From the Navigator window on the left, expand SCRIPTS and open <strong>period_converter</strong>.  (TIP:  Make sure you have the EXPERTS tab selected at the bottom of the terminal so you can view the status of this script.)  You will need to convert the minute data to each time frame by changing the <em>ExtPeriodMultiplier</em> value and running the script.  M1 is already done, so let’s start with the 5 minute.  Enter 5 for M5 and click OK.  </p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/period-converter.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>You will know it has finished converting when the EXPERTS tab displays a message that it has written the records.   </p>
<div>&nbsp;</div>
<p><img src="http://www.thetrademachine.com/images/BlogImages/period-converter-records-written.jpg" /></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p>Open <strong>period_converter</strong> again.  It will ask you:  “Do you really want to stop period_converter”.  Choose Yes and repeat for the following time frames:  Enter 15 for M15, 30 for M30, 60 for H1, 240 for H4, 1440 for D1, and 10080 for W1.</p>
<div>&nbsp;</div>
<p><strong>Step 14:</strong>	Repeat the above steps for each currency pair.</p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<p><strong>Step 15:</strong>	Phew!  That&#8217;s it.  Now that you have your history data all set up, you are ready to <a href="http://thetrademachine.com/blog/2009/10/01/backtesting-with-metatraders-strategy-tester/"><strong>Start Backtesting With Metatrader&#8217;s Strategy Tester ></strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://thetrademachine.com/blog/2009/09/29/set-up-metatrader-history-data-get-90-backtesting-quality/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
