<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — Adding dummy variables in CreateEntrySignal and Exitsignal]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/9002/" />
	<updated>2022-01-05T08:59:09Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/9002/adding-dummy-variables-in-createentrysignal-and-exitsignal/</id>
		<entry>
			<title type="html"><![CDATA[Adding dummy variables in CreateEntrySignal and Exitsignal]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/67452/#p67452" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Roughey]]></name>
				<uri>https://forexsb.com/forum/user/10939/</uri>
			</author>
			<updated>2022-01-05T08:59:09Z</updated>
			<id>https://forexsb.com/forum/post/67452/#p67452</id>
		</entry>
</feed>
