<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Custom Fitness Function]]></title>
		<link>https://forexsb.com/forum/topic/5222/custom-fitness-function/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/5222/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Custom Fitness Function.]]></description>
		<lastBuildDate>Mon, 14 Mar 2016 18:35:12 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Custom Fitness Function]]></title>
			<link>https://forexsb.com/forum/post/34672/#p34672</link>
			<description><![CDATA[<p>Any update on that Mr. Popov? I´d really love to finally buy FSB Pro, but without having that one it´s a serious feature missing for me right now that I use in everday strategy generation.</p>]]></description>
			<author><![CDATA[null@example.com (geektrader)]]></author>
			<pubDate>Mon, 14 Mar 2016 18:35:12 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/34672/#p34672</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Fitness Function]]></title>
			<link>https://forexsb.com/forum/post/34540/#p34540</link>
			<description><![CDATA[<p>Hi Popov,</p><p>sorry for the long time of no response, I check into FSB at least once a year and just did it again (I am a StrategyQuant user actually). I have tried FSB Pro 3.5 right now and see that the custom acceptance criteria has not been done yet within the software but would still be needed to be &quot;hacked&quot;, is this correct?</p><p>I really had the hope it would have been added meanwhile as this is something crucial in my opinion for generation good strategies, at least that´s my finding from the last 8 years in developing trading systems. I much like the system that SQ offers in that relation, in being able to &quot;weight&quot; several acceptance criteria values as the main accept criteria (e.g. net profit, return / dd ratio, equity curve stability) against each other, e.g.: put 70% weight on net profit, 20% weight on return/dd ratio and 10% weight on equity curve stability (R^2) as the final custom weighted acceptance criteria.</p><p>Right now I see now way to do that and especially the equity curve stability is a completely missing acceptance criteria (as I would prefer to trade a strategy with 100000 net profit and a R^2 of 0.98 over a strategy with 400000 net profit but a R^2 of just 0.7 - a unstable equity curve), or did I not look hard enough? It would also be great if we would be able to sort the systems by that custom criteria in the repository, but I guess that would automatically happen anyway if that the custom criteria was used as a acceptance criteria?</p><p>I am a new buyer for sure as soon as I would be able to work so flexible with the acceptance criterias like I can in SQ, it´s really a &quot;must have&quot; for me.</p><p>Thanks a lot for your dedication and great work, so much appreciated.</p>]]></description>
			<author><![CDATA[null@example.com (geektrader)]]></author>
			<pubDate>Wed, 09 Mar 2016 05:11:07 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/34540/#p34540</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Fitness Function]]></title>
			<link>https://forexsb.com/forum/post/28228/#p28228</link>
			<description><![CDATA[<p>Adding a parameter to Account Statistics:</p><br /><p>1. Declare a global variable:</p><div class="codebox"><pre><code>        private double myParameter;</code></pre></div><p>2. Add method for calculating the parameter:</p><div class="codebox"><pre><code>private void CalculateMyParameter(IBacktester backtester)
{
    int firstBar = backtester.Strategy.FirstBar;
    int bars     = backtester.DataSet.Bars;

    double[] equityLine = new double[bars-firstBar];
    for (int bar = firstBar; bar &lt; bars; bar++)
        equityLine[bar-firstBar] = backtester.MoneyEquity(bar);

    double equityStdDev = StdDev(equityLine);
    double netBalance = backtester.NetBalance;

    myParameter = netBalance / equityStdDev;
}</code></pre></div><br /><p>3. Call that method from &quot;CalculateAccountStats(IBacktester backtester)&quot;</p><div class="codebox"><pre><code>            CalculateMyParameter(backtester);</code></pre></div><br /><p>4. Set the parameter in&nbsp; &quot;GetInfoRecords()&quot;</p><div class="codebox"><pre><code> 
            records.Add(new InfoRecord
            {
                Name  = &quot;My Parameter&quot;,
                Value = myParameter.ToString(&quot;F2&quot;),
                Flag  = myParameter &lt; 1
                    ? InfoRecordFlag.Bad
                    : myParameter &lt; 4
                        ? InfoRecordFlag.Normal
                        : InfoRecordFlag.Good
            });</code></pre></div><p><a href="http://postimg.org/image/xvbyk1p5l/"><span class="postimg"><img src="http://s28.postimg.org/xvbyk1p5l/screenshot_820.jpg" alt="http://s28.postimg.org/xvbyk1p5l/screenshot_820.jpg" /></span></a></p><p>The custom Account Statistics file is attached below.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Sun, 08 Mar 2015 14:26:09 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28228/#p28228</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Fitness Function]]></title>
			<link>https://forexsb.com/forum/post/28226/#p28226</link>
			<description><![CDATA[<p>How would the &quot;hack&quot; look like?</p>]]></description>
			<author><![CDATA[null@example.com (footon)]]></author>
			<pubDate>Sun, 08 Mar 2015 11:50:56 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28226/#p28226</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Fitness Function]]></title>
			<link>https://forexsb.com/forum/post/28224/#p28224</link>
			<description><![CDATA[<p>The Generator first calculates a strategy and after that checks if it complies with the Acceptance Criteria. If the criteria are fulfilled, the generator pushes the strategy to a collection in a place according to the &quot;Search Best&quot; parameter.</p><p>Currently you can add a new parameter to the custom Acceptance Criteria, but it will not be used as an acceptance criterion. What you can do is to &quot;hack&quot; some of the other params. <br />If ore users are interested in adding custom criteria, I&#039;ll add such feature.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Sun, 08 Mar 2015 06:23:11 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28224/#p28224</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Fitness Function]]></title>
			<link>https://forexsb.com/forum/post/28223/#p28223</link>
			<description><![CDATA[<p>Thanks, but I don´t want to use it as an acceptance criteria nor being able to sort already generated strategies by it. I want the actual generation process to use this as it´s goal already. There is a different if just storting strategies by that value AFTER they have been generated with &quot;maximize net profit&quot; as a goal than to directly generate them with &quot;maximize custom fitness function&quot; instead of &quot;NetProfit&quot; or any other of the available generating goals.</p>]]></description>
			<author><![CDATA[null@example.com (geektrader)]]></author>
			<pubDate>Sun, 08 Mar 2015 02:50:54 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28223/#p28223</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Fitness Function]]></title>
			<link>https://forexsb.com/forum/post/28222/#p28222</link>
			<description><![CDATA[<p>That&#039;s what I said, you can set it up in Account Statistics, it&#039;s in the code folder, and I understood you want it as acceptance criteria. Like I said I don&#039;t know if it will show up (when added into Account Statistics) as an acceptance criteria in the gen and optimizer, additionally if it can be used as a sorting condition in strat collection. If it&#039;d do the latter, it would be half a win, but probably it won&#039;t work. I&#039;m not the last instance of truth, the developer is, waiting for conclusive answer.</p>]]></description>
			<author><![CDATA[null@example.com (footon)]]></author>
			<pubDate>Sun, 08 Mar 2015 02:30:41 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28222/#p28222</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Fitness Function]]></title>
			<link>https://forexsb.com/forum/post/28219/#p28219</link>
			<description><![CDATA[<p>Well I am not looking forward to just see the account statistics, I want to use a custom fitness function instead of &quot;NetProfit&quot; or &quot;System Quality Number&quot;, I want to use my own calculation like &quot;NetProfit / Equity Curve Standard Deviation&quot; and tell the generator to use that to rank the strategies while it generates or optimizes them. Just like you can do in MT4 with the OnTester() function.</p>]]></description>
			<author><![CDATA[null@example.com (geektrader)]]></author>
			<pubDate>Sun, 08 Mar 2015 02:03:53 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28219/#p28219</guid>
		</item>
		<item>
			<title><![CDATA[Re: Custom Fitness Function]]></title>
			<link>https://forexsb.com/forum/post/28217/#p28217</link>
			<description><![CDATA[<p>Account Statistics is the word here, it&#039;s expandable by user. I don&#039;t know though whether it gets passed on to optimizer and generator. Lets wait for Miroslav&#039;s answer, curious to know myself <img src="https://forexsb.com/forum/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[null@example.com (footon)]]></author>
			<pubDate>Sat, 07 Mar 2015 21:27:19 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28217/#p28217</guid>
		</item>
		<item>
			<title><![CDATA[Custom Fitness Function]]></title>
			<link>https://forexsb.com/forum/post/28216/#p28216</link>
			<description><![CDATA[<p>Hi <img src="https://forexsb.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>would it be possible to be able to use a custom fitness function as the generating / optimizing goal? I would like to use something along the lines NetProfit / EquityCurveStdDev. I am already doing this in MT4 in my own EA´s and this custom fitness produces very good results, but there seems to be no way to do that in FSB Pro.</p><p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (geektrader)]]></author>
			<pubDate>Sat, 07 Mar 2015 19:47:22 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28216/#p28216</guid>
		</item>
	</channel>
</rss>
