<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — compounding]]></title>
		<link>https://forexsb.com/forum/topic/9383/compounding/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/9383/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in compounding.]]></description>
		<lastBuildDate>Tue, 18 Jul 2023 12:40:17 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: compounding]]></title>
			<link>https://forexsb.com/forum/post/75745/#p75745</link>
			<description><![CDATA[<div class="quotebox"><cite>Popov wrote:</cite><blockquote><p>I don&#039;t know what compounding is. I searched it and found that &quot;it makes you rich faster&quot;.</p><p>I&#039;m not sure what exactly it means. Is it a form of scaling the entry amount?</p><p>We don&#039;t have such a feature in EA Studio.<br />Normally, the Account doesn&#039;t rise with a temp that needs automated scaling.</p></blockquote></div><br /><p>Yess it&#039;s scaling the entry amount. I would love to have that feature added.</p>]]></description>
			<author><![CDATA[null@example.com (philsta)]]></author>
			<pubDate>Tue, 18 Jul 2023 12:40:17 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/75745/#p75745</guid>
		</item>
		<item>
			<title><![CDATA[Re: compounding]]></title>
			<link>https://forexsb.com/forum/post/73966/#p73966</link>
			<description><![CDATA[<div class="quotebox"><cite>geektrader wrote:</cite><blockquote><p>He means position sizing based on account balance. Search the Forum, there are already implementations by others there.</p></blockquote></div><p> Exactly <img src="https://forexsb.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (crifalo)]]></author>
			<pubDate>Mon, 13 Mar 2023 10:29:27 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/73966/#p73966</guid>
		</item>
		<item>
			<title><![CDATA[Re: compounding]]></title>
			<link>https://forexsb.com/forum/post/73937/#p73937</link>
			<description><![CDATA[<p>Thanks for sharing kitomc. </p><p>Could you perhaps post the full code for one of your portfolios? For a newbie in MT Coding like me, it&#039;s awesome to have something as a reference.</p>]]></description>
			<author><![CDATA[null@example.com (Scifo)]]></author>
			<pubDate>Sat, 11 Mar 2023 14:30:28 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/73937/#p73937</guid>
		</item>
		<item>
			<title><![CDATA[Re: compounding]]></title>
			<link>https://forexsb.com/forum/post/73934/#p73934</link>
			<description><![CDATA[<p>I put this code to a portfolio with an RDD of 100 and limited to a spread of 5 and the results were extraordinary, even hard to believe hahahah.</p>]]></description>
			<author><![CDATA[null@example.com (kitomc)]]></author>
			<pubDate>Sat, 11 Mar 2023 01:18:32 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/73934/#p73934</guid>
		</item>
		<item>
			<title><![CDATA[Re: compounding]]></title>
			<link>https://forexsb.com/forum/post/73933/#p73933</link>
			<description><![CDATA[<p>i found this code<br />the first is to compound interest and the second is to limit the spread</p><div class="codebox"><pre><code>---esto va debajo del magic number------
extern bool compuesto     = true;
double capitalToCompuesto ;




---Esto va debajo del for en OrderSend------

if(compuesto &amp;&amp; capitalToCompuesto &gt; 0) amount = Entry_Amount*(AccountEquity()/ capitalToCompuesto);





---Esto va en el init---
capitalToCompuesto  = AccountEquity();</code></pre></div><br /><p>2</p><div class="codebox"><pre><code>Input parameters section:

input int           Maximum_Spread_Points = 5;


----Esto va en OpenPosition Function ------


  if (!IsWithinMaxSpread())
        return;


-----Esto va debajo de todo el codigo es una funcion para el spread -----MT4-----

bool IsWithinMaxSpread()
{
    bool WithinMaxSpread = true;

    if (Maximum_Spread_Points &gt; 0)
    {
        double spread = NormalizeDouble(((Ask - Bid) / _Point), 0);
        //Need NormalizeDouble here because of rounding errors in MT4 that otherwise occur (confirmed in several backtests).

        if (spread &gt; Maximum_Spread_Points)
        {
            Print(&quot;El spread actual es de &quot;, DoubleToString(spread, 0), &quot; puntos, es mas alto del permitido que es &quot;, DoubleToString(Maximum_Spread_Points, 0), &quot; puntos. No realizara este trade!&quot;);
            WithinMaxSpread = false;
        }
    }

    return(WithinMaxSpread);
}
-------Funcion en MT5---------

bool IsWithinMaxSpread()
{
    bool WithinMaxSpread = true;

    if (Maximum_Spread_Points &gt; 0)
{
    double spread = NormalizeDouble(((SymbolInfoDouble(_Symbol, SYMBOL_ASK) - SymbolInfoDouble(_Symbol, SYMBOL_BID)) / _Point), 0);
    // Es necesario utilizar NormalizeDouble aquí debido a errores de redondeo en MT4 que de otra manera ocurren (confirmado en varios backtests).

    if (spread &gt; Maximum_Spread_Points)
    {
        Print(&quot;El spread actual es de &quot;, DoubleToString(spread, 0), &quot; puntos, es más alto del permitido que es &quot;, DoubleToString(Maximum_Spread_Points, 0), &quot; puntos. No se realizará este trade!&quot;);
        WithinMaxSpread = false;
    }
}

return WithinMaxSpread;
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kitomc)]]></author>
			<pubDate>Sat, 11 Mar 2023 01:17:01 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/73933/#p73933</guid>
		</item>
		<item>
			<title><![CDATA[Re: compounding]]></title>
			<link>https://forexsb.com/forum/post/73931/#p73931</link>
			<description><![CDATA[<p>He means position sizing based on account balance. Search the Forum, there are already implementations by others there.</p>]]></description>
			<author><![CDATA[null@example.com (geektrader)]]></author>
			<pubDate>Fri, 10 Mar 2023 21:07:53 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/73931/#p73931</guid>
		</item>
		<item>
			<title><![CDATA[Re: compounding]]></title>
			<link>https://forexsb.com/forum/post/73925/#p73925</link>
			<description><![CDATA[<p>I don&#039;t know what compounding is. I searched it and found that &quot;it makes you rich faster&quot;.</p><p>I&#039;m not sure what exactly it means. Is it a form of scaling the entry amount?</p><p>We don&#039;t have such a feature in EA Studio.<br />Normally, the Account doesn&#039;t rise with a temp that needs automated scaling.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Fri, 10 Mar 2023 16:47:15 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/73925/#p73925</guid>
		</item>
		<item>
			<title><![CDATA[compounding]]></title>
			<link>https://forexsb.com/forum/post/73900/#p73900</link>
			<description><![CDATA[<p>Hi,<br />Do you know how I can add compounding in mql5 code in portfolio?<br />Best regards</p>]]></description>
			<author><![CDATA[null@example.com (crifalo)]]></author>
			<pubDate>Thu, 09 Mar 2023 20:57:57 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/73900/#p73900</guid>
		</item>
	</channel>
</rss>
