<?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>MQLmagazine.com &#187; Trading Strategies</title>
	<atom:link href="http://mqlmagazine.com/category/trading-strategies/feed/" rel="self" type="application/rss+xml" />
	<link>http://mqlmagazine.com</link>
	<description>All things MetaTrader</description>
	<lastBuildDate>Sat, 10 Jul 2010 14:57:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quoting &#8211; A new activity in MT5</title>
		<link>http://mqlmagazine.com/trading-strategies/quoting-a-new-activity-in-mt5/</link>
		<comments>http://mqlmagazine.com/trading-strategies/quoting-a-new-activity-in-mt5/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 19:00:50 +0000</pubDate>
		<dc:creator>Bogdan Caramalac, MQLmagazine sr.editor</dc:creator>
				<category><![CDATA[Trading Strategies]]></category>
		<category><![CDATA[arbitrage]]></category>
		<category><![CDATA[forex]]></category>
		<category><![CDATA[futures]]></category>
		<category><![CDATA[mt5]]></category>
		<category><![CDATA[quoting]]></category>

		<guid isPermaLink="false">http://mqlmagazine.com/?p=12</guid>
		<description><![CDATA[[Versiunea romaneasca] [MQLmagazine.com in romana] [English edition]
 Well, perhaps I exaggerated the term a bit, but after all, this is how I feel about it. It will be a way to implement fx/futures arbitrage and other similar arbitrages between replaceable assets. Like NYMEX Crude Light/ICE WTI or any major index and its mini versions.
Long time [...]]]></description>
			<content:encoded><![CDATA[<p><a title="[Versiunea romaneasca]" href="http://mqlmagazine.com/ro/strategii-de-trading/cotarea-o-noua-activitate-in-mt5/" target="_top">[Versiunea romaneasca]</a> <a title="[MQLmagazine.com in romana]" href="http://mqlmagazine.com/ro" target="_top">[MQLmagazine.com in romana]</a> <a title="[English edition]" href="http://mqlmagazine.com" target="_top">[English edition]</a></p>
<p><img class="alignleft size-medium wp-image-22" title="Lightspeed Trading" src="http://mqlmagazine.com/wp-content/uploads/2009/11/Lightspeed-Trading-238x300.jpg" alt="Lightspeed Trading" width="238" height="300" /> Well, perhaps I exaggerated the term a bit, but after all, this is how I feel about it. It will be a way to implement fx/futures arbitrage and other similar arbitrages between replaceable assets. Like NYMEX Crude Light/ICE WTI or any major index and its mini versions.</p>
<p>Long time ago, on my former <a title="blog" href="http://forum.vamist.ro/index.php?app=blog&amp;module=display&amp;section=entry&amp;automodule=blog&amp;blogid=2&amp;showentry=58" target="_blank">blog</a>, I presented a method to arbitrage the broker&#8217;s foolishness offering swap free forex trading and also fx futures trading. At that time, I also spoke just a bit  about missallignment arbitrage. Now we will dwelve in it.</p>
<p>As you know, futures copy the fluctuations of their underlying contracts, and the difference between, called <strong>basis</strong>, gradually reduces to zero, at futures expiry. I will not dwelve here into the calculations of fair value, because fair value, even for fx futures, can&#8217;t be calculated correctly, at least with the resources available to fx traders. However, there is no need to do it so. Since futures is an interest-adjusted spot, it means the basis reduces towards expiry with a so slow speed, especially when interest differentials are small, that for hours, even up amounting to days, it can be considered constant. And for the readers of my blog at that time, we saw fluctuations in basis applying especially with the new trading day , after each daily Globex restart. That means at least during the span of a trading day, the basis can be considered relatively constant. Which means that basis will fluctuate all the time around this constant value, providing a base for evaluating whether the futures is too far or too near from the underlying.  Taking into account that fx has a way higher volume and higher volatility than the futures, we can expect that the generator of the missallignment windows is the fx market, having much lower latency than the lazy futures market.</p>
<p><img class="alignleft size-full wp-image-118" title="discount window" src="http://mqlmagazine.com/wp-content/uploads/2009/11/discount-window.jpg" alt="discount window" width="1060" height="218" /></p>
<p>You can see in this chart fluctuations of the &#8220;discount window&#8221; , that is EURUSD &#8211; 6EZ9. Because we are not interested in the discount window itself, and we don&#8217;t wanna get caught in futures discounts that may be wrong because of wrong interest rate information, we consider the base for calculus the 20 minute simple moving average of the basis (the pink line). Red and green line are at 2 pip distance from the pink moving average. See how wide the basis fluctuates around its own moving average, a continuous arbitrageable white noise&#8230;</p>
<p>How is this used by professional traders ?</p>
<p>Professional traders trade in the real-markets, or level II markets. The level II markets are &#8220;the markets&#8221; as they are for real. Every market is formed up by supply and demand. Demand is represented by orders on the Bid side, which contains orders of traders that are <strong>willing to buy at a certain price</strong>, and supply is represented by orders on the Ask side, which contains orders of traders that are <strong>willing to sell at a certain price. </strong>This order posting activity is known as <strong>quoting</strong>.  When a trader <strong>wishes to buy at market price, will buy from the ones that are selling, at the Ask price, </strong>and a trader that <strong>wishes to sell at market price will sell to the ones that are buying, at the Bid price</strong>. This is known as <strong>market execution</strong> and is the one available to retail traders. Retail traders don&#8217;t quote, don&#8217;t make a market, they can&#8217;t <strong>post buy orders on bid, </strong>nor<strong> post sell orders on ask. Traders that are being filled buy at bid or sell at ask with no spread costs.</strong></p>
<p>A professional trader will know the basis, will take the futures price as the base for building the fx price, and will <strong>quote</strong> two fx orders, both far from the futures. Should one of them being filled, the other order will be deleted and the futures will be marketed to hedge the fx side. This will help enormously, since costs are quite halved : the forex trade will not incur spreads. Say the futures quotes 1.3000/01 and basis estimated for today is 50 pips up, with fx being normally at fx-50 pips. So we have fx at 1.2950/01. Assuming a 2 pip up/down fluctuation, the trader will quote an fx bid @ 1.2948 and an fx ask @ 1.2952. If one of them is filled in a swift market action , which is presumable in higher volatility moments, the futures will be marketed.  Say the bid is filled and we have now a buy fx @ 1.2948. The ask is deleted and the futures is sold @1.3000. <em>Ten minutes later, another volatile movement will close the gap. Futures quotes 1.3020/21, basis is skewed again, fx quoting not 50 pips lower, but 48, at about 1.2972, where will be closed. </em>Trades will be:</p>
<p>long fx @1.2948 , close @ 1.2972 , profit 24 pips</p>
<p>short futures @  1.3000, close @ 1.3021, loss 21 pips</p>
<p>net profit 3 pips.</p>
<p><em>Needless to say, the quoting process is a continuous one. Quoting part can reside , from the standpoint of MQL programming either in OnTick() alone, or in both OnTick() and OnBookEvent() if multiple symbols are advised to send quote events, in a multiasset quoting machine. At every quote coming OnTick() or OnBookEvent(), the orders will be repositioned (thus quoting).</em></p>
<p>But the odds will work always against the retail trader. Forced to use only market execution and support probably big latency, now the platform will make the things slight easier. What is the difference?</p>
<p>Retail traders can&#8217;t quote. They always have only market execution. That means that instead of quoting, they have to do it all with pending orders. It&#8217;s more of a <strong>pseudoquoting </strong>instead of <strong>quoting</strong>, because traders don&#8217;t post &#8220;quotes&#8221; in the orderbook . So it will appear like it is <strong>pending orders management</strong>. Our MT5 trader will run the expert advisor on the futures contract, with small volatility. The <em>OnTick()</em> will be executed every tick, as it happened with <em>start()</em> in MT4. Every time the prices are different, orders will be deleted and resent to the market &#8211; same process as in quoting. But this time we have a superior tool : <strong>the OnTrade() event.</strong></p>
<p>The OnTrade() event, as it is implemented now, doesn&#8217;t allow the trader to know which order has been filled. Even this way, a quick check can be implemented. It will not require a continuous check as in MT4, that was taking valuable time , causing the EA to skip quotes all the time. So right now retail traders have the ability to mimic pretty accurately what the professionals are doing. However, take into account that market needs to move more. Since your quoted prices are ask for a buy and bid for a sell, the market needs to move an extra pip each way to compensate for spread losses, which means exponentially less opportunities for retail traders. Take into account also futures slippage, that will be dangerous in both moments, when taking and closing the futures trade, because in these moments, the professional arbitrageurs put a heavy pressure on the futures, same as you do, but with a step forward&#8230;</p>
<p>An interesting feature of MT5 is the hated lack of hedging , which comes very handy in quoting. Instead of using global profit targets that will attract even more slippage when executed as order closes, the trader can quote his own exit of the situation. Again, as with taking the initial trade, opposite orders are quoted to trap volatility on the fx pair. Remember I wrote upper in the article, italic, what happens <em>ten minutes later ?</em> That was the normal version, supposing that we close trades. But what if we quote closing ?</p>
<p>Given that we have  bought or sold a spread, we can expect a market divergence from any of the two assets , of course with a higher chance on the forex side. So, we have to quote two orders. If one is filled, will clear the position on that side, and, with the add of the OnTrade() which will have the execution signaled, providing the means to close the other trade. For instance, right after taking both trades, the close trades could have been quoted:  short fx @ 1.2951, long futures @ 1.2997. Same as with the quoting process for taking trades, quoting for closing trades has to be continuous, quoting a large gap on both assets, with emphasis on the most liquid one. In MT4 environment, the &#8220;hedging enabled&#8221; facility would have made this impossible: other orders would not have closed the position, and a faint attempt to use automatic closes would have needed switching from stop loss to take profit&#8230;</p>
<p>This technique can be applied with commodities, stock indexes etc. All it matters is that the two assets must be linked by an arbitrage relationship. Take care, however, that execution is dependant on latency. And to have more often executions, is to &#8220;quote&#8221; the side that is more liquid, because it&#8217;s likely to be more volatile and generate more opportunities.</p>
<p>Good luck arbitraging! Without low latency, you&#8217;ll need the hell of a lot&#8230;</p>
<div class='dd_after'><table><tr><td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://mqlmagazine.com/trading-strategies/quoting-a-new-activity-in-mt5/&amp;t=Quoting+-+A+new+activity+in+MT5&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td><td><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http://mqlmagazine.com/trading-strategies/quoting-a-new-activity-in-mt5/&amp;title=Quoting+-+A+new+activity+in+MT5&amp;t=2' height='18' width='120' frameborder='0' scrolling='no'></iframe></td><td><script type='text/javascript'><!--yahooBuzzArticleHeadline=Quoting+-+A+new+activity+in+MT5;//--></script><script type='text/javascript' src='http://d.yimg.com/ds/badge2.js' badgetype='small-votes'></script></td><td><iframe src='http://api.tweetmeme.com/button.js?url=http://mqlmagazine.com/trading-strategies/quoting-a-new-activity-in-mt5/&amp;source=&amp;style=compact' height='20' width='90' frameborder='0' scrolling='no'></iframe></td><td><script type='text/javascript'> var fbShare = {url: 'http://mqlmagazine.com/trading-strategies/quoting-a-new-activity-in-mt5/',size:'small'}</script> <script type='text/javascript' src='http://widgets.fbshare.me/files/fbshare.js'></script></td></tr></table></div><!-- Generated by Digg Digg plugin, 
    Author : Yong Mook Kim
    Website : http://www.mkyong.com/blog/digg-digg-wordpress-plugin/ -->]]></content:encoded>
			<wfw:commentRss>http://mqlmagazine.com/trading-strategies/quoting-a-new-activity-in-mt5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

