<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — EA for MT5 dont work in 'Hedging Mode']]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/6064/" />
	<updated>2016-06-27T05:53:58Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/6064/ea-for-mt5-dont-work-in-hedging-mode/</id>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37138/#p37138" />
			<content type="html"><![CDATA[<p>I&#039;m working on that problem, but still cannot make it right.<br />The problem is that there is no working examples and the MQL documentation is very vague on that.</p><p>As per documentations I set the current position Ticket to the new order and it should Add, Reduce, Close, and Reverse but unfortunately only the reduce is working normally. </p><p>I opened a thread in the MQL forum here: <a href="https://www.mql5.com/en/forum/89553">https://www.mql5.com/en/forum/89553</a></p><p>However, as we know, the MetaTrader guys never solve the real problems.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-06-27T05:53:58Z</updated>
			<id>https://forexsb.com/forum/post/37138/#p37138</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37102/#p37102" />
			<content type="html"><![CDATA[<p>i think you can add code for hedging that also runs in netting mode.</p><div class="quotebox"><blockquote><p>position — position ticket. Fill it when changing and closing a position for its clear identification while trading in hedging mode. In the netting system, filling the field does not affect anything since positions are identified by a symbol name.</p></blockquote></div><p>from here:<br /><a href="http://www.metaquotes.net/en/metatrader5/news/4696">http://www.metaquotes.net/en/metatrader5/news/4696</a></p>]]></content>
			<author>
				<name><![CDATA[ForexNoop]]></name>
				<uri>https://forexsb.com/forum/user/9097/</uri>
			</author>
			<updated>2016-06-23T17:45:46Z</updated>
			<id>https://forexsb.com/forum/post/37102/#p37102</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37101/#p37101" />
			<content type="html"><![CDATA[<p>Yes, I read it already. I suppose that we have to give the current position as a parameter.</p><p>But I don&#039;t know (yet) how to detect if the MT works in a hedging mode.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-06-23T17:22:37Z</updated>
			<id>https://forexsb.com/forum/post/37101/#p37101</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37100/#p37100" />
			<content type="html"><![CDATA[<p>Hallo Popov,<br />I have tested your Solution on my Metaqoutes Demo-Accounts.</p><p>Demo in netting mode -&gt; works perfecly, opens orders, set Sl and TP, close orders -&gt; no Problem</p><p>Demo in Hedging mode -&gt; now open orders, only the first one with SL and TP, opens many orders in the same time,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the orders never closed.</p><p>On my Alpari Demo Account cant test it, because trading is disabled.</p><p>There is a article that describes the netting and hedging mode in mt5</p><p><a href="https://www.mql5.com/en/articles/2299">https://www.mql5.com/en/articles/2299</a></p><p>best regards</p>]]></content>
			<author>
				<name><![CDATA[ForexNoop]]></name>
				<uri>https://forexsb.com/forum/user/9097/</uri>
			</author>
			<updated>2016-06-23T17:08:30Z</updated>
			<id>https://forexsb.com/forum/post/37100/#p37100</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37096/#p37096" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>the closing of the position it doesn&#039;t work with no message in the history.</p></blockquote></div><p>I have an idea for the reason. I&#039;ll try to fix it during the weekend (if my MT5 starts testing/trading).</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-06-23T15:57:27Z</updated>
			<id>https://forexsb.com/forum/post/37096/#p37096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37095/#p37095" />
			<content type="html"><![CDATA[<p>You are a god <img src="https://forexsb.com/forum/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>It ok for me. The open position is good (buy and sell) but now it&#039;s the closing of the position it doesn&#039;t work with no message in the history.</p><p>We&#039;re going forward.</p><p>Sorry for my english <img src="https://forexsb.com/forum/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></content>
			<author>
				<name><![CDATA[cybermanu]]></name>
				<uri>https://forexsb.com/forum/user/9170/</uri>
			</author>
			<updated>2016-06-23T15:54:14Z</updated>
			<id>https://forexsb.com/forum/post/37095/#p37095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37092/#p37092" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Error: ActionTrade::ManageOrderSend(): OrderCheck(): Invalid price in the request</p></blockquote></div><p>Please make a small modification and test if this error will disappear.</p><p>Open you MQL5 expert in the editor and search the following (use <strong>Ctrl</strong> + <strong>F</strong> ): <strong>ORDER_FILLING_FOK</strong><br />Open a new line after that code and add the following line: </p><div class="codebox"><pre><code> request.price = (type == OP_BUY) ? tick.bid : tick.ask;</code></pre></div><br /><p>Your code must look like that:</p><p><span class="postimg"><img src="http://s31.postimg.org/aqxqgj8p7/screenshot_1827.png" alt="http://s31.postimg.org/aqxqgj8p7/screenshot_1827.png" /></span></p><p>Please report the result.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-06-23T15:05:34Z</updated>
			<id>https://forexsb.com/forum/post/37092/#p37092</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37091/#p37091" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Popov wrote:</cite><blockquote><p>I opened a topic in the MQL forums. I hope we will receive answer there.</p></blockquote></div><p>I added to the thread, and another person has also commented.</p>]]></content>
			<author>
				<name><![CDATA[Blaiserboy]]></name>
				<uri>https://forexsb.com/forum/user/2491/</uri>
			</author>
			<updated>2016-06-23T14:02:55Z</updated>
			<id>https://forexsb.com/forum/post/37091/#p37091</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37080/#p37080" />
			<content type="html"><![CDATA[<p><strong>Doesn&#039;t MT tester test because of the BREXIT vote today?</strong></p><p><span class="postimg"><img src="http://s31.postimg.org/kfjg1usqz/disabled_trade.png" alt="http://s31.postimg.org/kfjg1usqz/disabled_trade.png" /></span></p><p>Do I have to make FSB stop generating on Sundays or on holidays?</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-06-23T05:16:40Z</updated>
			<id>https://forexsb.com/forum/post/37080/#p37080</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37079/#p37079" />
			<content type="html"><![CDATA[<p>I opened a topic in the MQL forums. I hope we will receive answer there.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-06-23T05:00:08Z</updated>
			<id>https://forexsb.com/forum/post/37079/#p37079</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37078/#p37078" />
			<content type="html"><![CDATA[<p>This is absolutely wrong. The MT5 tester doesn&#039;t open trades in &quot;tester&quot; because the &quot;Trade is disabled&quot;.</p><p><a href="http://postimg.org/image/6xcjpkglj/"><span class="postimg"><img src="http://s31.postimg.org/6xcjpkglj/screenshot_1817.jpg" alt="http://s31.postimg.org/6xcjpkglj/screenshot_1817.jpg" /></span></a></p><p>What can I do? There is no info on that problem in the MQL forums.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-06-23T04:52:50Z</updated>
			<id>https://forexsb.com/forum/post/37078/#p37078</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37077/#p37077" />
			<content type="html"><![CDATA[<p>That is weird. I do not specify &quot;Price&quot; for the function OrderCheck because the EA executes only Market Order. It must be correct as per documentation:</p><div class="quotebox"><blockquote><p>Price, reaching which the order must be executed. Market orders of symbols, whose execution type is &quot;Market Execution&quot; (SYMBOL_TRADE_EXECUTION_MARKET), of TRADE_ACTION_DEAL type, <strong>do not require specification of price</strong>.</p></blockquote></div><p> </p><br /><p>The code is:</p><div class="codebox"><pre><code>            MqlTradeRequest request;
            MqlTradeResult result;
            MqlTradeCheckResult check;
            ZeroMemory(request);
            ZeroMemory(result);
            ZeroMemory(check);

            request.action       = TRADE_ACTION_DEAL;
            request.symbol       = _Symbol;
            request.volume       = orderLots;
            request.type         = (type == OP_BUY) ? ORDER_TYPE_BUY : ORDER_TYPE_SELL;
            request.type_filling = ORDER_FILLING_FOK;
            request.deviation    = 10;
            request.sl           = stopLossPrice;
            request.tp           = takeProfitPrice;
            request.comment      = OrderComment;

            bool isOrderCheck = OrderCheck(request, check);
            string retcode = ResultRetcodeDescription(check.retcode);</code></pre></div><p>I&#039;ll try to reproduce the error and fix it.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-06-23T04:42:14Z</updated>
			<id>https://forexsb.com/forum/post/37077/#p37077</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37075/#p37075" />
			<content type="html"><![CDATA[<p>I am also having same problem, same error and cannot execute any trades in MetaTrader 5, I opened a MetaTrader 5 demo account from MetaQuotes</p><p>(Error: ActionTrade::ManageOrderSend(): OrderCheck(): Invalid price in the request)</p>]]></content>
			<author>
				<name><![CDATA[hstsyd]]></name>
				<uri>https://forexsb.com/forum/user/3855/</uri>
			</author>
			<updated>2016-06-23T02:30:57Z</updated>
			<id>https://forexsb.com/forum/post/37075/#p37075</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37074/#p37074" />
			<content type="html"><![CDATA[<p>Thank you for the video,</p><p>Can you give me a TeamViewer access to your system. I think I can debug and fix it for 15 minutes on your comp.<br />The problem is that this problem doesn&#039;t happen on my terminal and I cannot guess what is the reason.</p><p>Please send me a PM with the login info and at what time is convenient for you.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-06-22T21:37:04Z</updated>
			<id>https://forexsb.com/forum/post/37074/#p37074</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: EA for MT5 dont work in 'Hedging Mode']]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/37073/#p37073" />
			<content type="html"><![CDATA[<p>hi,</p><p>It doesn&#039;t work. It doesn&#039;t take any position.</p><p><a href="https://youtu.be/Rj0L9F5Otjw">https://youtu.be/Rj0L9F5Otjw</a></p><p>best regard</p>]]></content>
			<author>
				<name><![CDATA[cybermanu]]></name>
				<uri>https://forexsb.com/forum/user/9170/</uri>
			</author>
			<updated>2016-06-22T19:48:53Z</updated>
			<id>https://forexsb.com/forum/post/37073/#p37073</id>
		</entry>
</feed>
