<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — MT5 Portfolio - how to change code for opening only BUY or SELL trades]]></title>
		<link>https://forexsb.com/forum/topic/9685/mt5-portfolio-how-to-change-code-for-opening-only-buy-or-sell-trades/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/9685/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in MT5 Portfolio - how to change code for opening only BUY or SELL trades.]]></description>
		<lastBuildDate>Tue, 16 Jul 2024 18:46:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: MT5 Portfolio - how to change code for opening only BUY or SELL trades]]></title>
			<link>https://forexsb.com/forum/post/80609/#p80609</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>=for example when we want to use only buys only sells..there must be an option in EAS to set this on true and it will be added automatically in code..</p></blockquote></div><p>for what I know, at EA level there&#039;s the Long or Short Entry Rule Indicator for opening only BUY or SELL; but you can&#039;t apply it to the entire portfolio. I want the same EA is generated both with BUY and SELLS trades, and eventually apply the BUY/SELL filter at Portfolio level in strong trends only.</p><p>Manually adding the BUY/SELL condition to every EA is a very long process if you have dozens of strategies in the portfolio (it meas doubling the strategies for having the same EA counted twice: one version opens BUY only, the other version opens SELL only).</p>]]></description>
			<author><![CDATA[null@example.com (poteree)]]></author>
			<pubDate>Tue, 16 Jul 2024 18:46:55 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/80609/#p80609</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT5 Portfolio - how to change code for opening only BUY or SELL trades]]></title>
			<link>https://forexsb.com/forum/post/80581/#p80581</link>
			<description><![CDATA[<div class="quotebox"><cite>poteree wrote:</cite><blockquote><p>Many thanks Roughey, it works! As from image attached, the 2 new inputs appear now in the Portfolio Box on MT5.</p><p>I believe you can support Mr Popov in adding new functionalities to the Portfolio :-D another small change (I hope) having a even higher positive impact is this one:<br /><a href="https://forexsb.com/forum/topic/9767/how-to-automatically-stop-eas-with-closed-profit-0-to-open-trades/">https://forexsb.com/forum/topic/9767/ho … en-trades/</a></p></blockquote></div><p>there are some things we can do and add with bool. </p><p>this are small kind of codes i think popov can do it also.. in my opinion it is possible to use such code snippets to add automatically.<br />i dont know how popovs basic mql code can be changed. but for example when we want to use only buys only sells..there must be an option in EAS to set this on true and it will be added automatically in code..</p>]]></description>
			<author><![CDATA[null@example.com (Roughey)]]></author>
			<pubDate>Mon, 15 Jul 2024 11:53:26 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/80581/#p80581</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT5 Portfolio - how to change code for opening only BUY or SELL trades]]></title>
			<link>https://forexsb.com/forum/post/80580/#p80580</link>
			<description><![CDATA[<p>Many thanks Roughey, it works! As from image attached, the 2 new inputs appear now in the Portfolio Box on MT5.</p><p>I believe you can support Mr Popov in adding new functionalities to the Portfolio :-D another small change (I hope) having a even higher positive impact is this one:<br /><a href="https://forexsb.com/forum/topic/9767/how-to-automatically-stop-eas-with-closed-profit-0-to-open-trades/">https://forexsb.com/forum/topic/9767/ho … en-trades/</a></p>]]></description>
			<author><![CDATA[null@example.com (poteree)]]></author>
			<pubDate>Mon, 15 Jul 2024 11:45:30 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/80580/#p80580</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT5 Portfolio - how to change code for opening only BUY or SELL trades]]></title>
			<link>https://forexsb.com/forum/post/80493/#p80493</link>
			<description><![CDATA[<div class="quotebox"><cite>poteree wrote:</cite><blockquote><p>Good afternoon EA Studio community,</p><p>waiting eventually for having this option inside the Portfolio settings, in the meanwhile does anyone Know how to change the MT5 Portoflio code downloaded by Portoflio Summary in Ea Studio, in order to let only BUY trades or SELL trades to be opened by all the strategies inside the portfolio?</p><p>Thanks a lot for the tip!</p></blockquote></div><br /><p>put in this inputs</p><div class="codebox"><pre><code>input bool                 OnlyBuys                   = false;                 //Allow only Buy orders
input bool                 OnlySells                  = false;                 //Allow only Sell orders</code></pre></div><p>and in</p><div class="codebox"><pre><code>void ManageSignal(Signal &amp;signal)</code></pre></div><p>add this lines at the end</p><div class="codebox"><pre><code>         if(OnlyBuys &amp;&amp; signal.Direction == ORDER_DIRECTION_SELL)
           {          
            return;
           }
         if(OnlySells &amp;&amp; signal.Direction == ORDER_DIRECTION_BUY)
           {          
            return;
           }                       
//---        
      if (signal.Direction == ORDER_DIRECTION_BUY || signal.Direction == ORDER_DIRECTION_SELL)
         OpenPosition(signal);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Roughey)]]></author>
			<pubDate>Sat, 06 Jul 2024 07:23:53 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/80493/#p80493</guid>
		</item>
		<item>
			<title><![CDATA[MT5 Portfolio - how to change code for opening only BUY or SELL trades]]></title>
			<link>https://forexsb.com/forum/post/78957/#p78957</link>
			<description><![CDATA[<p>Good afternoon EA Studio community,</p><p>waiting eventually for having this option inside the Portfolio settings, in the meanwhile does anyone Know how to change the MT5 Portoflio code downloaded by Portoflio Summary in Ea Studio, in order to let only BUY trades or SELL trades to be opened by all the strategies inside the portfolio?</p><p>Thanks a lot for the tip!</p>]]></description>
			<author><![CDATA[null@example.com (poteree)]]></author>
			<pubDate>Tue, 05 Mar 2024 12:26:32 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/78957/#p78957</guid>
		</item>
	</channel>
</rss>
