<?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>One Step Removed</title>
	<atom:link href="http://www.onestepremoved.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.onestepremoved.com</link>
	<description>MetaTrader Expert Advisor Programming</description>
	<lastBuildDate>Wed, 16 May 2012 19:23:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Signifigance Testing</title>
		<link>http://www.onestepremoved.com/significance-testing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=significance-testing</link>
		<comments>http://www.onestepremoved.com/significance-testing/#comments</comments>
		<pubDate>Wed, 16 May 2012 19:23:08 +0000</pubDate>
		<dc:creator>Shaun Overton</dc:creator>
				<category><![CDATA[Backtest]]></category>
		<category><![CDATA[Strategy & Indicator]]></category>
		<category><![CDATA[backtest]]></category>
		<category><![CDATA[confidence interval]]></category>
		<category><![CDATA[curve fitting]]></category>
		<category><![CDATA[expert advisor]]></category>
		<category><![CDATA[T test]]></category>

		<guid isPermaLink="false">http://www.onestepremoved.com/?p=2234</guid>
		<description><![CDATA[I recently had someone from Portugal approach me with an Expert Advisor that he programmed. He felt that it was successful and wanted to get my opinion on its viability. I only know a small amount of information about the system, yet I was able to confidently reject it as unproven. Statistics are the key. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had someone from Portugal approach me with an Expert Advisor that he programmed. He felt that it was successful and wanted to get my opinion on its viability. I only know a small amount of information about the system, yet I was able to confidently reject it as unproven. </p>
<p>Statistics are the key. It provides a relatively straightforward toolbox to easily dismiss the simplest of systems. The measure in particular that I care about is called a student&#8217;s t-test.</p>
<p>Let&#8217;s first talk about when this test is appropriate. If you have fixed take profits and stop losses in place on 100% of all trades, then it is appropriate to use this test. The reason is that these values provide fixed limits on the outcome of trades. The distribution of your trades is likely to form a nice bell curve. In math terms, this is called a Gaussian distribution.</p>
<p>If your strategy uses dynamic exits based on market conditions, then this test is not appropriate. The distribution of forex, stock and futures prices do not follow a bell curve. The test depends on the assumption that the distribution under study follows a bell curve. If you make assumptions that don&#8217;t match what you&#8217;re measuring, then results are useless at best and dangerously misleading at worst.</p>
<p>If you&#8217;d like to go into the mathematics involved, then you can find numerous sources on the internet that <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda352.htm" title="T-Test">explain t-tests</a>. I also really enjoy the book <a href="http://www.amazon.com/Statistics-4th-Edition-David-Freedman/dp/0393929728">Statistics</a> by Freedman, Pisani and Purves. </p>
<p>Most trading systems do not follow bell curves, which makes the details of the t-test largely irrelevant. What&#8217;s useful about it is to show that you can generally feel better about the outcomes and predictions based on the number of results in the backtest.</p>
<h2>Restrictions and Degrees of Freedoms</h2>
<p>The goal of any test is to ensure that the results are accurate. The more frequently that you test a concept, the more confident that you feel about the outcome repeating itself consistently. The idea of predictability largely matches our intuitive expectations. If my co-worker shows up on time regularly, then I feel confident about him showing up on time tomorrow. If he shows up late regularly, then I know that he&#8217;s likely to show up late in the future. </p>
<p>The increase in experience increases the level of confidence. Eventually, the number gets so big that we feel very comfortable with the probabilities. </p>
<p>The Portuguese client presented a system based on moving averages with 3 filters, a stop loss and a take profit. Let&#8217;s assume that each filter only had one parameter. The number of restrictions for the buy trade is the moving average period (1), the one parameter for each of the three filters (3), the stop loss distance (1) and the take profit distance (1). This yields a total of 6 restrictions for buy trades. Assuming that sell trades use the same inputs, then we have a total of 12 restrictions.</p>
<p>We can&#8217;t begin counting our total number of trades (i.e., degrees of freedom) until the backtest shows at least 12 trades to account for our restrictions. It&#8217;s a good idea to not infer anything about a trading system until 30+ trades elapse. With the 12 restrictions in place, that sets the threshold for the minimum number of trades to reach a conclusion at 30 + 12 = 42. </p>
<p>Generally, it&#8217;s a good idea to see 300-400 trades before drawing conclusions about any system. The reason for this is that some events are very rare. They may only occur once every couple of hundred trials. Allowing the amount of information to approach this threshold allows the trader to more comfortably evaluate what hidden risks may be present.</p>
<p>The backtest that the Portuguese individual submitted only contained 27 trades. Knowing what we know about basic analysis, I comfortably decided that there is nowhere near enough information on the system to consider evaluating it.</p>
<h2>A Word of Caution</h2>
<p>An algorithm&#8217;s trading statistics are almost certain to change with time. Unless you have a mathematically sophisticated model for evaluating volatility, best practice demands that you evaluate the trading results in light of the type of volatility experienced. Making money in 2008 when the markets nose dived does not mean that you would have made money in 2010, which was much quieter in comparison. Any signal in 2008 that indicated a short would almost certainly show returns that include a handful of monster winners. If those monsters fail to show up because the volatility does not cooperate, then your expert advisor will more than likely flop.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onestepremoved.com/significance-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strategy Decay</title>
		<link>http://www.onestepremoved.com/strategy-decay/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=strategy-decay</link>
		<comments>http://www.onestepremoved.com/strategy-decay/#comments</comments>
		<pubDate>Tue, 01 May 2012 19:13:06 +0000</pubDate>
		<dc:creator>Shaun Overton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.onestepremoved.com/?p=2229</guid>
		<description><![CDATA[Ernie Chan wrote a great blog post today on the life and death of a strategy. He talks about some of my favorite points: KISS (Keep It Simple, Stupid!) and the importance of viewing real performance relative to negative performance. If you like this blog, then you&#8217;ll love his. It&#8217;s very similar. The only difference [...]]]></description>
			<content:encoded><![CDATA[<p>Ernie Chan wrote a great blog post today on the <a href="http://epchan.blogspot.com/2012/04/life-and-death-of-strategy.html" title="Life and Death of a Strategy">life and death of a strategy</a>. He talks about some of my favorite points: KISS (Keep It Simple, Stupid!) and the importance of viewing real performance relative to negative performance.</p>
<p>If you like this blog, then you&#8217;ll love his. It&#8217;s very similar. The only difference is that Ernie tends to write with more assumptions about his readers&#8217; math skills.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onestepremoved.com/strategy-decay/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MQL Organization</title>
		<link>http://www.onestepremoved.com/mql-organization/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mql-organization</link>
		<comments>http://www.onestepremoved.com/mql-organization/#comments</comments>
		<pubDate>Tue, 01 May 2012 13:00:52 +0000</pubDate>
		<dc:creator>Shaun Overton</dc:creator>
				<category><![CDATA[MQL]]></category>
		<category><![CDATA[deinit]]></category>
		<category><![CDATA[expert advisor]]></category>
		<category><![CDATA[indicator]]></category>
		<category><![CDATA[init]]></category>
		<category><![CDATA[mql]]></category>
		<category><![CDATA[MQL4]]></category>
		<category><![CDATA[start]]></category>

		<guid isPermaLink="false">http://www.onestepremoved.com/?p=2226</guid>
		<description><![CDATA[All MQL expert advisors and indicators contain a few essential components. The general organization of MQL programs does not vary too often. Files usually start with a declaration of #defines (pronounced pound define) global variables and external variables, also known as an extern data type. They appear near the top of the code to help [...]]]></description>
			<content:encoded><![CDATA[<p>All MQL expert advisors and indicators contain a few essential components. The general organization of MQL programs does not vary too often.</p>
<p>Files usually start with a declaration of #defines (pronounced pound define) global variables and external variables, also known as an <a href="http://www.onestepremoved.com/mql-data-types/" title="MQL Data Types">extern data type</a>. They appear near the top of the code to help the read gain an understanding of the variables that will run in the program. Ideally, the names of the variables and how they are organized should assist the programmer with form a general understanding of what the expert advisor or indicator might do.</p>
<p>The next section is usually the init() function, which is the word initialize abbreviated. This section of the code is particularly relevant to programming custom indicators. Most of the general indicator settings like declaring the indicator buffers, the colors to use and other basic features are set within this section. I use init() in every expert advisor that we build to convert the inputs into an appropriate setting for the broker&#8217;s pricing. If a client inputs a stop loss of 50 into an EA, I don&#8217;t need to do anything if it&#8217;s a 4 digit broker. I do, however, need to convert the input to work with a 5 digit broker. I run a quick check within init() to see if Digits == 3 || Digits == 5. If so, then I multiply inputs affected by that setting by 10.</p>
<p>deinit() is the least important section; it&#8217;s pretty easy to deinitialize an MQL file because it usually does not take up any system resources. It&#8217;s rarely used for anything important. The only uses that I ever have for deinit() are to close an open file handle or to make some sort of closing note. This is often done either on the chart directly through the Comment() function or more often by writing directly into the <a href="http://www.onestepremoved.com/metatrader-logs/" title="MetaTrader Logs">log file</a>.</p>
<p>The start() function is the real meat of an MQL expert advisor or indicator. Whenever MetaTrader detects an incoming tick, it alerts any MQL programs. Those programs then call the start function so that it can do whatever needs doing. All trading operations, calculations, account monitoring, etc, occur within this section.</p>
<p>All of the other custom functions within the program appear below start(). I usually prefer to rank them in order of their importance or the frequency with which I call them throughout the program. The order of placement of functions does not affect performance in any way at all. It&#8217;s strictly a cosmetic practice that makes programming code more legible.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onestepremoved.com/mql-organization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MQL Data Types</title>
		<link>http://www.onestepremoved.com/mql-data-types/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mql-data-types</link>
		<comments>http://www.onestepremoved.com/mql-data-types/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 10:04:05 +0000</pubDate>
		<dc:creator>Shaun Overton</dc:creator>
				<category><![CDATA[MQL]]></category>
		<category><![CDATA[bool]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[data type]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[extern]]></category>
		<category><![CDATA[int]]></category>
		<category><![CDATA[mql]]></category>
		<category><![CDATA[static]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://www.onestepremoved.com/?p=2221</guid>
		<description><![CDATA[MQL4 supports seven data types within the program. Each type is associated with different trading tasks that programmers need to perform. The goal of this article is to provide a brief reference for when to use each data type. The double data type is probably the most common type found in MQL programs. This is [...]]]></description>
			<content:encoded><![CDATA[<p>MQL4 supports seven data types within the program. Each type is associated with different trading tasks that programmers need to perform. The goal of this article is to provide a brief reference for when to use each data type.</p>
<p>The double data type is probably the most common type found in MQL programs. This is because it is the type responsible for calculating floating point numbers. Say for example, that an expert advisor needs to determine when to adjust a trailing stop. The expert advisor looks at the current price and subtracts it from the current stop loss to maintain the appropriate distance (1.3230-1.3209=0.0021). The distance requires a decimal point. When the expert advisor saves the distance to memory, it needs to save the information after the decimal point. That forces the programmer to choose a variable of type double. </p>
<p>Integers, or int, is the simpler version of double. Double values require a decimal place to hold the number&#8217;s value accurately. An integer, or whole number, does not have a decimal place. Integers are appropriately used when the MQL programmer knows for a certain fact that the number will never contain a decimal. An example would be if you wanted to implement a max trades feature. If the number of open trades in the account exceeds a certain number, then prevent trades. We know in advance that there is no such thing at 4.76 trades being open. There can only be 4 trades open or 5 trades open. This clearly indicates the need to use an integer.</p>
<p>Datetime values are just what they sound like. They represent both the date and time. More specifically, a datetime variable represents the number of seconds that have elapsed since January 1, 1970. This is where it gets a little tricky. The number of seconds that have elapsed is actually an integer. Datetimes store integer values but then associate them with a date and time.</p>
<p>A value of 0 would indicate that the time is 00:00 on January 1, 1970. A value of 60 stands for one minute later at 00:01 1/1/1970, and so on. One benefit of knowing that the datetime type stores information as integers is that you can easily determine the amount of time that happens between an event. If the event starts at 15:35 and ends at 18:12, you can simply subtract 18:12 &#8211; 15:35 and wind up with the number of seconds between those values. That information can then be used to determine the number minutes/hours/days between the two events.</p>
<p>The color data type, not surprisingly, holds color information such as black, yellow, red and so on. Much like datetime types, color also uses integers to store the information. The difference, though, is that extracting the color information from the integer is not at all obvious. Increasing a color type from 32768 by one will not necessarily make it more or less green. Colors use the integer information to retrieve the red, green and blue components of the color in hexadecimal format. Explaining hexadecimals is well beyond the scope of this article. It&#8217;s unlikely to come up in your MQL programming. I&#8217;ve been doing this for over five years and only came across one project that required manipulating a color in way more complicated than alternating between two set colors.</p>
<p>A string is anything that resembles a word or sentence. It always uses quotes to contain the information. My favorite use of strings is to gather information to display on the chart or in a <a href="http://www.onestepremoved.com/metatrader-logs/" title="MetaTrader Logs">log file</a> whenever I need to <a href="http://www.onestepremoved.com/mql-debugging/" title="MQL Debugging">debug an expert advisor</a>.</p>
<p>Char is the final data type. It&#8217;s so closely related to a string that I wasn&#8217;t even aware this type existed until I looked up information for this article. If we study the word &#8220;trade&#8221;, then we will find that it is composed of the five characters t, r, a, d and e. </p>
<p>A final note on data types. There are two ways that types are held in memory. An extern variable is one that shows up in the inputs screen whenever an expert advisor or indicator loads. Static variables are the opposite. They remain within the MQL program and never visible outside of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onestepremoved.com/mql-data-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Martingale Forex</title>
		<link>http://www.onestepremoved.com/martingale-forex/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=martingale-forex</link>
		<comments>http://www.onestepremoved.com/martingale-forex/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 20:22:22 +0000</pubDate>
		<dc:creator>Shaun Overton</dc:creator>
				<category><![CDATA[Strategy & Indicator]]></category>
		<category><![CDATA[fixed fractional]]></category>
		<category><![CDATA[forex]]></category>
		<category><![CDATA[Martingale]]></category>
		<category><![CDATA[money management]]></category>
		<category><![CDATA[percent accuracy]]></category>
		<category><![CDATA[risk]]></category>

		<guid isPermaLink="false">http://www.onestepremoved.com/?p=2217</guid>
		<description><![CDATA[Trading forex with a Martingale money management system will almost inevitably lead to blowing up an account. I&#8217;ve written about this inevitable outcomes repeatedly over the past six months. At the risk of beating a dead horse, I figured that visual proof would alleviate any lingering hopes once and for all. Recall that Martingale systems [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://www.youtube.com/embed/cfZ0QHcvYGo" frameborder="0" width="560" height="315"></iframe></p>
<p>Trading forex with a Martingale money management system will almost inevitably lead to blowing up an account. I&#8217;ve written about this inevitable outcomes repeatedly over the past six months. At the risk of beating a dead horse, I figured that visual proof would alleviate any lingering hopes once and for all.</p>
<p>Recall that Martingale systems aim to never lose money. Instead of accepting losses and moving on, a Martingale betting strategy doubles the previous bet. Whenever a win finally does occur, all losses up until that point are wiped out. The trade also gains the same amount of profit that the original trade hoped to capture.</p>
<p>The experiment assumes that the trader uses <a title="Fixed Fractional Money Management" href="http://www.onestepremoved.com/fixed-fractional-money-management/">fixed fractional money management</a> set at 1% of the account value. Recall from earlier experiments that a 1% risk value will almost never blow up an account after 200 trades. The percent accuracy for the trades remains at 50%, which is perfectly random. The random number file has been upgraded to include 10 million random numbers instead of the previous half a million.</p>
<p>The goal of the exercise is to focus on the risk of ruin rather than the profits accrued. As time goes on, the likelihood of ruin increases with the number of trades placed. A trade is each time a new transaction enters. It does not matter whether or not the last trade was a winner or a loser.</p>
<p>Fifty trades on most Martingale systems corresponds to anything from several days to several weeks. The level of aggression used in the trade level (i.e., the pip distance used to open a new trade) is what most strongly affects the amount of time required to reach fifty trades.</p>
<p>Placing 50 trades shows what most traders know. The returns look fairly nice at that point. A return of 20% on the account shows a 40% probability of occurring. The risk of wiping out the account looks meek at 8.5%.</p>
<p>Increasing the number of trades to 200, which corresponds to several weeks or months, the odds of outright failure skyrocket to 35%. The lucky traders that have not yet blown up show returns ranging from 20% all the way to 300%. The total risk is more apparent, although many traders fall victim to the lure of quick, large returns.  If it all looks too easy at this point in time, that&#8217;s because it is.</p>
<p>Going out to 1,000 trades, which I roughly ballpark as the amount of trades an average expert advisor might complete in 9 months to a year, is where the inevitable result is obvious. The odds of reaching a zero balance reach 95%.  A tiny handful of traders are floating huge returns. As the number of trades increases from 1,000 to 2,000 to 10,000, the tiny fraction of accounts left eventually dwindles down to zero.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onestepremoved.com/martingale-forex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>3 Forex System Tips</title>
		<link>http://www.onestepremoved.com/3-forex-system-tips/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=3-forex-system-tips</link>
		<comments>http://www.onestepremoved.com/3-forex-system-tips/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 15:20:27 +0000</pubDate>
		<dc:creator>Shaun Overton</dc:creator>
				<category><![CDATA[Strategy & Indicator]]></category>
		<category><![CDATA[atr]]></category>
		<category><![CDATA[curve fitting]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[limit entry]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[stop entry]]></category>
		<category><![CDATA[volatility]]></category>

		<guid isPermaLink="false">http://www.onestepremoved.com/?p=2209</guid>
		<description><![CDATA[Many systems nowadays promise profits without effort and easy pips right to your account. You probably know by now that real life doesn&#8217;t work that way. A genuinely profitable system is hard to come by. In this article I will describe three simple tips that help you enhance your existing trading systems. The goal is [...]]]></description>
			<content:encoded><![CDATA[<p>Many systems nowadays promise profits without effort and easy pips right to your account. You probably know by now that real life doesn&#8217;t work that way. A genuinely profitable system is hard to come by. In this article I will describe three simple tips that help you enhance your existing trading systems. The goal is to make them more powerful and accurate.</p>
<h2>Stop and Limit Entries to Catch Trends</h2>
<p>Many trading systems use market orders to enter and exit the market. Market orders frequently exhibit low <a href="http://www.onestepremoved.com/backtesting-efficiency/" title="Backtesting for efficiency">entry efficiencies</a>. They get you in the market at a price that is not optimal. Placing a buy or sell order 10 pips from the price you wish to enter, in the direction of the trend for trending systems can make a big difference. For long trades put a buy order 10 pips higher than price, and for short trades put a sell order 10 pips lower than price. Range trading systems might consider limit entries, which would place the orders in the opposite direction of the example above.</p>
<h2>Using ATR to Account for Volatility</h2>
<p>Many novice system designers use constant pip distances in their forex trading system, i.e. 15 pips for stop loss, 10 pips for take profit, etc. This is a mistake as it doesn&#8217;t take into account changes in volatility. If the pair you trade exhibits changes in volatility, the system faces an increased likelihood of failure. </p>
<p>The Average True Range indicator (a.k.a. ATR) gives the average range of a forex pair or stock, and accounts for gaps as well. Instead of using constant numbers, use a percentage of ATR such as 50% ATR or 30% ATR. Once you do this change your system will automatically take into account volatility and will become much more flexible. Such systems will work better and will maintain profitability even in changing market environments.</p>
<h2>Avoid Overoptimization</h2>
<p>This is a tip especially for the programmers of you: over-optimization is the kiss of death of a trading system. Over-<a href="http://www.onestepremoved.com/metatrader-ea-optimization/" title="Optimize an Expert Advisor">optimization</a>, a.k.a. as curve fitting, means that you add many <a href="http://www.indicatorforex.com">Forex indicators</a> and filters and use them all to confirm your signals, and optimize them all for maximum profits. In the backtest it will seem that your system is becoming better when in fact it will become good only for the past and will fail in any forward-test on real, live data. Therefore, it is crucial to only include the most important parts of your system and do not add indicators that don&#8217;t make sense at the price-action level. Remember the principle of Occam&#8217;s razor: &#8220;The simplest solution is usually the most efficient one&#8221;.</p>
<p>Michael Wells is an FX programmer and trader. His site contains his insights about <a href="http://www.indicatorforex.com/">Forex trading systems</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onestepremoved.com/3-forex-system-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert to MetaTrader 5</title>
		<link>http://www.onestepremoved.com/convert-metatrader-5/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=convert-metatrader-5</link>
		<comments>http://www.onestepremoved.com/convert-metatrader-5/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 22:54:33 +0000</pubDate>
		<dc:creator>Shaun Overton</dc:creator>
				<category><![CDATA[MetaTrader Expert Advisor]]></category>
		<category><![CDATA[Alpari]]></category>
		<category><![CDATA[brokerage]]></category>
		<category><![CDATA[EA]]></category>
		<category><![CDATA[FXCM]]></category>
		<category><![CDATA[metatrader]]></category>
		<category><![CDATA[MQL5]]></category>
		<category><![CDATA[MT3]]></category>
		<category><![CDATA[mt4]]></category>
		<category><![CDATA[MT5]]></category>
		<category><![CDATA[translate]]></category>

		<guid isPermaLink="false">http://www.onestepremoved.com/?p=2203</guid>
		<description><![CDATA[Alpari&#8217;s recent launch of MetaTrader 5 triggered a small wave of MQL5 translation requests. Most traders assume that MT5 is about to take over the world. Perhaps it&#8217;s better to front run any potential problems. I assure you, though, that there&#8217;s no need to panic. The launch mainly signifies that the larger forex firms will [...]]]></description>
			<content:encoded><![CDATA[<p>Alpari&#8217;s recent launch of MetaTrader 5 triggered a small wave of MQL5 translation requests. Most traders assume that MT5 is about to take over the world. Perhaps it&#8217;s better to front run any potential problems. I assure you, though, that there&#8217;s no need to panic.</p>
<p>The launch mainly signifies that the larger forex firms will start rolling out their own installations of MT5 within the next six to twelve months. Rumor has it that Alpari&#8217;s owners are very close to the owners of MetaQuotes. Perhaps this is hearsay, but it&#8217;s my impression that Alpari is the first among equals when it comes to MetaQuotes&#8217; clientele. Alpari did pay up the wazoo, however, for their license. Maybe they&#8217;re just getting rewarded for adopting the new platform so quickly.</p>
<p>Most brokerages, especially the large ones, are not chomping at the bit to adopt the new release. In fact, most of them <a href="http://www.onestepremoved.com/big-brokers-hate-metatrader/" title="Why Big Brokers Hate MetaTrader">hate MetaTrader</a> with a passion. The back office is written largely for brokerages that exclusively want to use MetaTrader. The larger brokers, all of whom invariably offer their own proprietary platforms, have to jump through a lot of hoops to get all the moving parts between separate back office systems working in sync. The rollout will likely embroil their IT staff in problems for months on end. I seriously doubt most CEOs are looking forward to the switch.</p>
<p>Also, offering MT5 as the primary platform does not mean that your brokerage is going to flip the off switch on MT4. They depend on MetaTrader 4 for their cash flow. Brokerages will not sabotage themselves by preventing all of their customers from trading.</p>
<p>Rollouts of new technologies usually occur over a period of 9 months or more. When I worked with FXCM, I remember the handful of clients that refused to switch from Trading Station I to II. It wasn&#8217;t until 2 years after the initial release of the new version where the company decided to drag the stragglers kicking and screaming onto version II.</p>
<p>The switch from MetaTrader 3 to 4 worked in much the same way at the brokerages offering it at the time. It wasn&#8217;t until two years or so after its initial adoption that version 3 went by the wayside.</p>
<p>You have little to worry about as a retail trader considering the switch over to MT5. If you want to program a brand new EA and your broker already supports MetaTrader 5, then you should definitely program it in MQL5. Otherwise, stick with MetaTrader 4. It still has years of shelf life.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onestepremoved.com/convert-metatrader-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixed Fractional Money Management</title>
		<link>http://www.onestepremoved.com/fixed-fractional-money-management/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fixed-fractional-money-management</link>
		<comments>http://www.onestepremoved.com/fixed-fractional-money-management/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 20:52:01 +0000</pubDate>
		<dc:creator>Shaun Overton</dc:creator>
				<category><![CDATA[Strategy & Indicator]]></category>
		<category><![CDATA[account balance]]></category>
		<category><![CDATA[account equity]]></category>
		<category><![CDATA[automated trading]]></category>
		<category><![CDATA[expert advisor]]></category>
		<category><![CDATA[fixed fractional]]></category>
		<category><![CDATA[metatrader]]></category>
		<category><![CDATA[money management]]></category>
		<category><![CDATA[ninjatrader]]></category>
		<category><![CDATA[R multiple]]></category>
		<category><![CDATA[strategy]]></category>
		<category><![CDATA[winning percentage]]></category>

		<guid isPermaLink="false">http://www.onestepremoved.com/?p=2190</guid>
		<description><![CDATA[Fixed fractional money management changes the overall outcome of your trades. Remember that trading is the net outcome of several hundred trades.  The power of money management comes into play after several hundred trades or more. Trading totally at random with a 50% winning percentage and an R multiple of 1 yields no advantage, as [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://www.youtube.com/embed/pWs1vaxK5rM" frameborder="0" width="560" height="315"></iframe></p>
<p>Fixed fractional money management changes the overall outcome of your trades. Remember that trading is the net outcome of several hundred trades.  The power of money management comes into play after several hundred trades or more.</p>
<p style="text-align: left;">Trading totally at random with a 50% winning percentage and an R multiple of 1 yields no advantage, as I discussed last week in <a title="Modeling money management" href="http://www.onestepremoved.com/money-management-modeling/">modeling money management</a>. Remember that an R multiple is the average win to the average loss.  Such a system poses neither an advantage or disadvantage. The average outcome should come out extremely close to the starting balance.</p>
<p style="text-align: left;">Fixed fractional money management stretches some portions of the bell curve and compresses other regions. Before we get into that, it&#8217;s important to remember what fixed fractional money management means. It&#8217;s a complicated name for a simple concept. It stands for the idea of risking a set percentage of the current account equity rather than the starting equity.</p>
<p style="text-align: left;">Most traders focus on risking a set dollar amount such as $1,000 on a given trade. This method updates that dollar figure after every single trade.</p>
<p style="text-align: left;">Consider an example where the account balance starts at $100,000 risking 1%. Both methods risk the same amount on the first trade, $1,000. The next trade, however, will yield a different risk amount. A win on the previous trade would increase the account equity to $101,000. One percent of a 101 grand is $1,010 of risk on the next trade. A whopping ten dollar change.</p>
<p style="text-align: left;">That may seem trivial. It is most certainly not over the long run.</p>
<h2>Examples</h2>
<p>Consider a trader that plays the coin toss game and has a system with the following characteristics:</p>
<ul>
<li>He starts with a $100, 000 account balance</li>
<li>His R multiple is 1.0</li>
<li>He wins 50% of the time with no trading costs</li>
<li>He risks 1%</li>
</ul>
<p>The absolute worst outcome of playing the coin toss with a fixed dollar risk of $1,000 is a loss of $46,000.  Adding fixed fractional money management during that difficult drawdown improves the drawdown to a less substantial loss of $37,500. The worst drawdown goes from -46% to -37.5%. The method drags the absolute worst case scenario and pulls it closer to the average. When an unlucky, devastating drawdown kicks in, the technique reduces the losses that the trader experiences.</p>
<p>The best case scenario for fixed dollar risk is a $58,000 (58%)  return.  Adding money management to the system dramatically stretches the best case scenario further to the right. It improves to a $76,000 return (76%).  The good times get a lot better without changing anything at all about the trading system. The method stretches positive returns away from the average. The trader walks away with more money in his pocket.</p>
<p>The natural instinct is to conclude that fixed fractional money management is the way to go. I agree. It improves the risk reward profile of a totally random strategy. Adding it to a real trading system should help control parameters that most traders consider critical like drawdowns and maximizing the return.</p>
<p>An important consequence of using fixed fractional <a href="www.onestepremoved.com/forex-money-management/" title="Money management">money management</a>, however, is that the odds of receiving a below average return increase somewhat. The coin toss game suffered a below average return 47% of the time. Applying fixed fractional money management increased the likelihood of a below average return to 53%.  The effect is not all that much. Losing is more likely. But when it happens, the &#8220;loss&#8221; is so negligible that it can be thought of as breaking even.</p>
<p>Random numbers occasionally follow a seemingly non-random pattern such as loss-win-loss-win. When this occurs, the size of the trade on the losses is bigger than the trade size of the winners. Even if the winning percentage comes out at precisely 50%, those wins get slightly overshadowed by the losers.  That micro effect of slightly larger losses than gains shows up as a slightly increased risk of not making as much money as expected.</p>
<h2>Graphing all outcomes</h2>
<div id="attachment_2194" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.onestepremoved.com/wp-content/uploads/2012/04/fixed-fractional-curves.png"><img class="size-medium wp-image-2194" title="Fixed fractional curves" src="http://www.onestepremoved.com/wp-content/uploads/2012/04/fixed-fractional-curves-300x168.png" alt="Fixed fractional curves" width="300" height="168" /></a><p class="wp-caption-text">Fixed fractional money management changes the shape of the returns curve. This example is exaggerated to highlight the effect</p></div>
<p>Red areas represent the losing outcomes while green areas represent the winners. Money management is really about maximizing the ratio of green area to red area. Random trades with no expectation of profit yield a bell curve, which appears on the left.</p>
<p>Fixed fractional moves the highest density of returns slightly to the left. Doing so creates the trivial disadvantage of a slightly increased risk of negligible loss. Importantly, the far left side (the worst case loser) gets dragged much closer to the average. The far right side (the best case winner), gets stretched much further from the average. The green area is now larger than the red area. The random system has a minor expectation of generating a positive return!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onestepremoved.com/fixed-fractional-money-management/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Money Management Modeling</title>
		<link>http://www.onestepremoved.com/money-management-modeling/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=money-management-modeling</link>
		<comments>http://www.onestepremoved.com/money-management-modeling/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 19:04:14 +0000</pubDate>
		<dc:creator>Shaun Overton</dc:creator>
				<category><![CDATA[Strategy & Indicator]]></category>
		<category><![CDATA[drawdown]]></category>
		<category><![CDATA[money managment]]></category>
		<category><![CDATA[percent accuracy]]></category>
		<category><![CDATA[risk reward ratio]]></category>
		<category><![CDATA[trading]]></category>
		<category><![CDATA[wins]]></category>

		<guid isPermaLink="false">http://www.onestepremoved.com/?p=2180</guid>
		<description><![CDATA[We recently developed software to model the affects of random chance on money management. Although computers are capable of generating pseudo-random numbers, the pseudo-random process introduces bias into the random distribution. We opted to source our random numbers from random.org. The web site generates purely random streams of bits taken from atmospheric noise. We then [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://www.youtube.com/embed/mpOmhNC3sf0" frameborder="0" width="560" height="315"></iframe></p>
<p>We recently developed software to model the affects of random chance on money management. Although computers are capable of generating pseudo-random numbers, the pseudo-random process introduces bias into the random distribution.</p>
<p>We opted to source our random numbers from <a title="Random number generator" href="http://www.random.org">random.org</a>. The web site generates purely random streams of bits taken from atmospheric noise. We then use binary mathematics to change those bits into numbers ranging from 1-10,000.  Say, for example, that we want to model a trading system with a winning percentage of 50%.  Whenever a number comes out between 1-5,000, we consider that a winner. Anything above 5,000 marks a loser.</p>
<p>Changing the winning percentage to 65% works the same way. Any number less than 6,500 represents a winning trade. Numbers above 6,500 signal a loss. The modeling quality is accurate to the thousandth decimal place.  That type of accuracy is way more accurate than the &#8220;known&#8221; accuracy of your trading system, which can only be known within a few whole percentage points.</p>
<p>Most traders fall into the trap of thinking about their trades as individual outcomes. The more appropriate way to view returns is as the sum of all individual outcomes. Losing on any given trade does not matter. It only matters whether the sum of all your winners is greater than all of the losers.</p>
<p>It gets more complicated, unfortunately. A system with 50% wins and a 1:1 payout will almost never come out at exactly breakeven. The mathematical expectation is that we expect to see a degree of drift in the returns solely due to random chance. I suggest reading more in the <a title="Random trade outcomes and dollar profits" href="http://www.onestepremoved.com/backtesting-efficiency/">random trade outcomes and dollar profits</a> section to get a better understanding of drift.</p>
<p>Lastly, we must define a sampling period for evaluating the final result. I arbitrarily set the default value to 200. That means that the software tells us the range of outcomes after 200 total trades. That may take more than a year for some traders. Daytraders may reach that benchmark in several weeks of trading.  The question that we are answering is &#8220;what is my account balance likely to be after placing 200 trades?&#8221;</p>
<h2>Coin Toss Trading Experiment</h2>
<p><iframe src="http://www.youtube.com/embed/kSzk-1ptFzY" frameborder="0" width="560" height="315"></iframe></p>
<p>The first experiment is to analyze how dollar returns vary with a coin toss game and the most basic <a title="Money Management" href="http://www.onestepremoved.com/forex-money-management/">money management</a> method. A starting balance of $100,000 is used with a risk of 1%. The risk will not change as in the fixed fractional method. Instead, we will leave the lots fixed in order to strictly understand random chance. Wins always earn $1,000. Losses always lose $1,000. The odds of a coin toss are 50% wins with 50% losses and a 1:1 reward risk ratio.</p>
<p>The average trade comes out to $99,868.36, almost exactly $100,000. It&#8217;s what we expect for a 50-50 game with a 1:1 reward risk ratio. What I find interesting is the standard deviation of $14,377 and how it changes. I don&#8217;t want to cover scary math topics. The layman&#8217;s explanation is that the standard deviation is the &#8220;normal&#8221; range from the average that you might expect. The $100,000 balance, in most cases, would either lose $14,000 or make $14,000.</p>
<p>Everything beyond those standard deviation boundaries represent the less likely wild scenarios. The minimum outcome comes out to $58,o00, a massive 42% loss. This had a 0.54% chance of occuring. The maximum outcome shows as $158,000, a monster 58% return. This had an even smaller chance of occurring, only 0.1% (1 in every 1,000 trials).</p>
<p>Changing the account risk dramatically affects the standard deviation. 1% strikes most traders as sane and reasonable. Yet, there is a small chance of losing half the account to drawdown strictly because of terrible luck. Decreasing the overall risk by a fourth to 0.25%  drops the standard deviation by exactly one fourth.  The worst case scenario shrinks to a highly tolerable $11,500 drawdown (11.5%). Most traders would find a number between 10%-20% reasonable. The consequence of the reduced risk is that the best case scenario drops correspondingly down to a 14.5% gain.</p>
<p>Stretching the risk out to 2%, a normal industry practice, turns out to be risking accounting suicide with the coin toss game.  The worst case scenario drops the final account balance down to $8,000, a staggering 92% loss.</p>
<p>The goal is to help you define risk from a gut feeling matter into something more tangible and calculated. Too many traders enter the market day dreaming about profits. Risk enters the picture, but too few traders actually understand the relationship between risk and reward.  Hopefully, the picture of best, worst and average scenarios is starting to become more clear for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onestepremoved.com/money-management-modeling/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MetaTrader Data</title>
		<link>http://www.onestepremoved.com/metatrader-data/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=metatrader-data</link>
		<comments>http://www.onestepremoved.com/metatrader-data/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 13:00:17 +0000</pubDate>
		<dc:creator>Shaun Overton</dc:creator>
				<category><![CDATA[MetaTrader Expert Advisor]]></category>
		<category><![CDATA[Alpari]]></category>
		<category><![CDATA[Dukascopy]]></category>
		<category><![CDATA[forex]]></category>
		<category><![CDATA[FXCM]]></category>
		<category><![CDATA[FXDD]]></category>
		<category><![CDATA[GAIN]]></category>
		<category><![CDATA[history center]]></category>
		<category><![CDATA[hst]]></category>
		<category><![CDATA[M1]]></category>
		<category><![CDATA[price history]]></category>

		<guid isPermaLink="false">http://www.onestepremoved.com/?p=2174</guid>
		<description><![CDATA[It&#8217;s hard to keep track of places where you can download historical price data for MetaTrader. I decided to post a few links here on the blog to collect them all in one place. FXDD offers historical price data for all the major currency pairs. The prices extend all the way back to 2005. This [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s hard to keep track of places where you can download historical price data for MetaTrader. I decided to post a few links here on the blog to collect them all in one place.</p>
<p><a title="FXDD Price History" href="http://www.fxdd.com/en/mt1m-data.html">FXDD</a> offers historical price data for all the major currency pairs. The prices extend all the way back to 2005. This option is far and away the easiest to use. The files download in .hst format, which means that you don&#8217;t have to worry about formatting. The data resolution is at the M1 level. <a title="FXDD Price History" href="http://www.fxdd.com/en/mt1m-data.html">http://www.fxdd.com/en/mt1m-data.html</a></p>
<p>Alpari used to offer M1 data on its web site. They fluctuated between taking the links down and putting it back up eventually. Their download links, however, have been down for about two years now. It looks like they finally threw in the towel on offering free price histories.</p>
<p><a title="FXCM Strategy Trader" href="http://www.fxcm.com/strategy-trader.jsp">FXCM</a> offers the ability to export historical prices through their Strategy Trader platform. Obtaining the data is simple. The formatting is a little off, so you would need to write a simple program to convert this into an .hst file. <a title="FXCM Strategy Trader" href="http://www.fxcm.com/strategy-trader.jsp">http://www.fxcm.com/strategy-trader.jsp</a></p>
<p><a title="GAIN Price History" href="http://ratedata.gaincapital.com/">GAIN</a> offers free data, but they seem to make it intentionally difficult to find and work with. They split the data into one week intervals, and the price histories don&#8217;t appear to be even based on my quick glance over their csv file. I wouldn&#8217;t recommend going to all the trouble of downloading and formatting their data without a compelling reason. <a title="Gain Price History" href="http://ratedata.gaincapital.com/">http://ratedata.gaincapital.com/</a></p>
<p><a title="Dukascopy prices" href="http://www.dukascopy.com/swiss/english/data_feed/csv_data_export/">Dukascopy</a> offers extensive price history down to the tick level. If you want tick prices going back quite a way back in time without paying for data, this is the only option that I know of. I have not messed around with it personally. I only know about it from internet chatter for people who seem to feel that they need tick data for their backtesting. The formatting is not designed for MetaTrader. Once again, you would have to write a conversion program to move it into the MetaTrader history center. <a title="Dukascopy prices" href="http://www.dukascopy.com/swiss/english/data_feed/csv_data_export/">http://www.dukascopy.com/swiss/english/data_feed/csv_data_export/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.onestepremoved.com/metatrader-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/76 queries in 0.071 seconds using disk: basic
Object Caching 1020/1331 objects using disk: basic

Served from: www.onestepremoved.com @ 2012-05-17 03:59:30 -->
