<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Adding dummy variables in CreateEntrySignal and Exitsignal]]></title>
		<link>https://forexsb.com/forum/topic/9002/adding-dummy-variables-in-createentrysignal-and-exitsignal/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/9002/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Adding dummy variables in CreateEntrySignal and Exitsignal.]]></description>
		<lastBuildDate>Wed, 05 Jan 2022 08:59:09 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Adding dummy variables in CreateEntrySignal and Exitsignal]]></title>
			<link>https://forexsb.com/forum/post/67452/#p67452</link>
			<description><![CDATA[<p>Hi,</p><p>now Ea studio exports its portfolio with his kind of code</p><div class="codebox"><pre><code>Signal CreateEntrySignal(int strategyIndex, bool canOpenLong,   bool canOpenShort,
                         int stopLossPips,  int takeProfitPips, bool isTrailingStop,
                         bool oppositeReverse = false)
  {
   Signal signal;

   signal.MagicNumber     = GetMagicNumber(strategyIndex);
   signal.Scope           = ORDER_SCOPE_ENTRY;
   signal.StopLossPips    = stopLossPips;
   signal.TakeProfitPips  = takeProfitPips;
   signal.IsTrailingStop  = isTrailingStop;
   signal.OppositeReverse = oppositeReverse;
   signal.Direction       = canOpenLong &amp;&amp; canOpenShort ? ORDER_DIRECTION_BOTH
                                         : canOpenLong  ? ORDER_DIRECTION_BUY
                                         : canOpenShort ? ORDER_DIRECTION_SELL
                                                        : ORDER_DIRECTION_NONE;

   return signal;
  }</code></pre></div><p>Here is the other line of strategies.</p><div class="codebox"><pre><code>   return CreateEntrySignal(0, ind0long &amp;&amp; ind1long &amp;&amp; ind2long, ind0short &amp;&amp; ind1short &amp;&amp; ind2short, 63, 175, false, true);</code></pre></div><p>It would be nice that we have an option in EAs to add custom Variables into it, so its easier to modify my eas more.</p><p>Cause for now we have to change this code in every line on its own. and if you have 100 strategies portfolio its a massive time. and i think its not such much an implementation problem for @popov.</p><p>So make an option to add more variables. It can be dummy variables at first without no functionality.</p><p>So before we download the portfolio we can have the option to implement more variables. That will be looked like this.</p><div class="codebox"><pre><code>Signal CreateEntrySignal(int strategyIndex, bool canOpenLong,   bool canOpenShort,
                         int stopLossPips,  int takeProfitPips, bool isTrailingStop,
                         bool oppositeReverse = false, [b]int custom[/b])
  {
   Signal signal;

   signal.MagicNumber     = GetMagicNumber(strategyIndex);
   signal.Scope           = ORDER_SCOPE_ENTRY;
   signal.StopLossPips    = stopLossPips;
   signal.TakeProfitPips  = takeProfitPips;
   signal.IsTrailingStop  = isTrailingStop;
   signal.OppositeReverse = oppositeReverse;
   signal.Direction       = canOpenLong &amp;&amp; canOpenShort ? ORDER_DIRECTION_BOTH
                                         : canOpenLong  ? ORDER_DIRECTION_BUY
                                         : canOpenShort ? ORDER_DIRECTION_SELL
                                                        : ORDER_DIRECTION_NONE;

   return signal;
  }</code></pre></div><p>and here will be automatically this.<br /></p><div class="codebox"><pre><code>   return CreateEntrySignal(0, ind0long &amp;&amp; ind1long &amp;&amp; ind2long, ind0short &amp;&amp; ind1short &amp;&amp; ind2short, 63, 175, false, true, [b]our new custom variable[/b]);</code></pre></div><p>What do you think about it. Maybe someone have better idea</p>]]></description>
			<author><![CDATA[null@example.com (Roughey)]]></author>
			<pubDate>Wed, 05 Jan 2022 08:59:09 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/67452/#p67452</guid>
		</item>
	</channel>
</rss>
