<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: OrderSend Error 130 — What to Do?</title>
	<atom:link href="http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/</link>
	<description>My Forex experience and some Forex related information that might be useful to other traders</description>
	<lastBuildDate>Sat, 11 Feb 2012 18:14:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: admin</title>
		<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/comment-page-1/#comment-255447</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 16 Dec 2011 21:00:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.earnforex.com/blog/?p=639#comment-255447</guid>
		<description>Please let us know if you find the solution.</description>
		<content:encoded><![CDATA[<p>Please let us know if you find the solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nadine</title>
		<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/comment-page-1/#comment-255446</link>
		<dc:creator>Nadine</dc:creator>
		<pubDate>Fri, 16 Dec 2011 20:15:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.earnforex.com/blog/?p=639#comment-255446</guid>
		<description>The conditions were just met, but the EA did not execute.  Same error 130.  I&#039;m going to try a different approach.  That&#039;s for your assistance.</description>
		<content:encoded><![CDATA[<p>The conditions were just met, but the EA did not execute.  Same error 130.  I&#8217;m going to try a different approach.  That&#8217;s for your assistance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nadine</title>
		<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/comment-page-1/#comment-255438</link>
		<dc:creator>Nadine</dc:creator>
		<pubDate>Thu, 15 Dec 2011 15:32:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.earnforex.com/blog/?p=639#comment-255438</guid>
		<description>Thanks.  I will try that.</description>
		<content:encoded><![CDATA[<p>Thanks.  I will try that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/comment-page-1/#comment-255437</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 15 Dec 2011 15:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.earnforex.com/blog/?p=639#comment-255437</guid>
		<description>If you are sure that other EA are setting SL &amp; TP in OrderSend() and don&#039;t get OrderSend error 130 on this same account, then my only suggestion to you would be to apply NormalizeDouble() to your stop-loss and take-profit levels. E.g.:
&lt;pre lang=&quot;mql4&quot;&gt;
OrderSend(Symbol(),OP_SELL,Lots,CurrPrice,3,NormalizeDouble(CurrPrice+sLoss, Digits), NormalizeDouble(CurrPrice-tProf, Digits),&quot;MA cross SELL&quot;,MAGICMA,0,Red);
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>If you are sure that other EA are setting SL &#038; TP in OrderSend() and don&#8217;t get OrderSend error 130 on this same account, then my only suggestion to you would be to apply NormalizeDouble() to your stop-loss and take-profit levels. E.g.:</p>

<div class="wp_syntax"><div class="code"><pre class="mql4" style="font-family:monospace;"><span style="color:#8A2BE2;">OrderSend</span><span style="color:#000080;">&#40;</span><span style="color:#8A2BE2;">Symbol</span><span style="color:#000080;">&#40;</span><span style="color:#000080;">&#41;</span><span style="color:#000080;">,</span><span style="color:#339;">OP_SELL</span><span style="color:#000080;">,</span>Lots<span style="color:#000080;">,</span>CurrPrice<span style="color:#000080;">,</span><span style="color:#008000;">3</span><span style="color:#000080;">,</span><span style="color:#8A2BE2;">NormalizeDouble</span><span style="color:#000080;">&#40;</span>CurrPrice<span style="color:#000080;">+</span>sLoss<span style="color:#000080;">,</span> <span style="color:#f0f;">Digits</span><span style="color:#000080;">&#41;</span><span style="color:#000080;">,</span> <span style="color:#8A2BE2;">NormalizeDouble</span><span style="color:#000080;">&#40;</span>CurrPrice<span style="color:#000080;">-</span>tProf<span style="color:#000080;">,</span> <span style="color:#f0f;">Digits</span><span style="color:#000080;">&#41;</span><span style="color:#000080;">,</span><span style="color:#008080;">&quot;MA cross SELL&quot;</span><span style="color:#000080;">,</span>MAGICMA<span style="color:#000080;">,</span><span style="color:#008000;">0</span><span style="color:#000080;">,</span><span style="color:#339;">Red</span><span style="color:#000080;">&#41;</span><span style="color:#000080;">;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Nadine</title>
		<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/comment-page-1/#comment-255436</link>
		<dc:creator>Nadine</dc:creator>
		<pubDate>Thu, 15 Dec 2011 15:16:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.earnforex.com/blog/?p=639#comment-255436</guid>
		<description>Not sure what an ECN account is, but I know for market order, it&#039;s not possible to set SL/TP on opening, but I have other EAs that work fine doing that.</description>
		<content:encoded><![CDATA[<p>Not sure what an ECN account is, but I know for market order, it&#8217;s not possible to set SL/TP on opening, but I have other EAs that work fine doing that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/comment-page-1/#comment-255435</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 15 Dec 2011 14:04:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.earnforex.com/blog/?p=639#comment-255435</guid>
		<description>If you are trading on ECN account, you can&#039;t set SL or TP on position opening, you have to do it after the order is executed.</description>
		<content:encoded><![CDATA[<p>If you are trading on ECN account, you can&#8217;t set SL or TP on position opening, you have to do it after the order is executed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nadine</title>
		<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/comment-page-1/#comment-255434</link>
		<dc:creator>Nadine</dc:creator>
		<pubDate>Thu, 15 Dec 2011 09:26:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.earnforex.com/blog/?p=639#comment-255434</guid>
		<description>I have an EA with SL set to 650 (65 pips) and TP set to 800 (80 pips) but am still getting error 130 on execution.  It works fine in Strategy Tester.  The log file is as follows:

9:00:10 MACross GBPUSDm,H1: Alert: MA crossover -&gt; SELL GBPUSDm
09:00:10 MACross GBPUSDm,H1: MA crossover:  Error opening SELL order : 130
09:00:10 MACross GBPUSDm,H1: Bid: 1.558 SL: 1.5645 TP: 1.55

The code for this is:
&lt;pre lang=&quot;mql4&quot;&gt;
      if ( CurrPrice  SELL &quot; + Symbol());
         res=OrderSend(Symbol(),OP_SELL,Lots,CurrPrice,3,CurrPrice+sLoss, CurrPrice-tProf,&quot;MA cross SELL&quot;,MAGICMA,0,Red);
           if ( res &lt; 0 ) {Print(&quot;MA crossover:  Error opening SELL order : &quot;,GetLastError());
                               Print(&quot;Bid: &quot;, Bid, &quot; SL: &quot;, CurrPrice+sLoss, &quot; TP: &quot;, CurrPrice-tProf); }
      }
&lt;/pre&gt;

Do you have any ideas on how to resolve this?</description>
		<content:encoded><![CDATA[<p>I have an EA with SL set to 650 (65 pips) and TP set to 800 (80 pips) but am still getting error 130 on execution.  It works fine in Strategy Tester.  The log file is as follows:</p>
<p>9:00:10 MACross GBPUSDm,H1: Alert: MA crossover -&gt; SELL GBPUSDm<br />
09:00:10 MACross GBPUSDm,H1: MA crossover:  Error opening SELL order : 130<br />
09:00:10 MACross GBPUSDm,H1: Bid: 1.558 SL: 1.5645 TP: 1.55</p>
<p>The code for this is:</p>

<div class="wp_syntax"><div class="code"><pre class="mql4" style="font-family:monospace;">      <span style="color:#00f;">if</span> <span style="color:#000080;">&#40;</span> CurrPrice  SELL <span style="color:#008080;">&quot; + Symbol());
         res=OrderSend(Symbol(),OP_SELL,Lots,CurrPrice,3,CurrPrice+sLoss, CurrPrice-tProf,&quot;</span>MA cross SELL<span style="color:#008080;">&quot;,MAGICMA,0,Red);
           if ( res &lt; 0 ) {Print(&quot;</span>MA crossover<span style="color:#000080;">:</span>  Error opening SELL order <span style="color:#000080;">:</span> <span style="color:#008080;">&quot;,GetLastError());
                               Print(&quot;</span><span style="color:#f0f;">Bid</span><span style="color:#000080;">:</span> <span style="color:#008080;">&quot;, Bid, &quot;</span> SL<span style="color:#000080;">:</span> <span style="color:#008080;">&quot;, CurrPrice+sLoss, &quot;</span> TP<span style="color:#000080;">:</span> <span style="color:#008080;">&quot;, CurrPrice-tProf); }
      }</span></pre></div></div>

<p>Do you have any ideas on how to resolve this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/comment-page-1/#comment-255159</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 30 Nov 2011 09:55:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.earnforex.com/blog/?p=639#comment-255159</guid>
		<description>Did you try the proposed solution? Does your broker allows setting SL and TP on positions in the open order?</description>
		<content:encoded><![CDATA[<p>Did you try the proposed solution? Does your broker allows setting SL and TP on positions in the open order?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: juan david</title>
		<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/comment-page-1/#comment-255156</link>
		<dc:creator>juan david</dc:creator>
		<pubDate>Tue, 29 Nov 2011 23:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.earnforex.com/blog/?p=639#comment-255156</guid>
		<description>im having the same problem with  phoenix ( downloaded form here) and im running default settings with the recommended pairs. 

i have a 1000 demo account.

thanks in advance</description>
		<content:encoded><![CDATA[<p>im having the same problem with  phoenix ( downloaded form here) and im running default settings with the recommended pairs. </p>
<p>i have a 1000 demo account.</p>
<p>thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.earnforex.com/blog/2008/10/ordersend-error-130-what-to-do/comment-page-1/#comment-254028</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 02 Sep 2011 18:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.earnforex.com/blog/?p=639#comment-254028</guid>
		<description>And how did you do it?</description>
		<content:encoded><![CDATA[<p>And how did you do it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

