<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — Custom Account Statistics for FSB Pro]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/4011/" />
	<updated>2013-02-18T13:33:42Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/4011/custom-account-statistics-for-fsb-pro/</id>
		<entry>
			<title type="html"><![CDATA[Re: Custom Account Statistics for FSB Pro]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/18326/#p18326" />
			<content type="html"><![CDATA[<p>Maximum floating Draw down % , In my opinion its something like real trading&nbsp; we don&#039;t need a profitable strategy with floating draw down 25% or so</p>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2013-02-18T13:33:42Z</updated>
			<id>https://forexsb.com/forum/post/18326/#p18326</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Custom Account Statistics for FSB Pro]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/18325/#p18325" />
			<content type="html"><![CDATA[<p>Minimum number of consecutive weeks/days / bars&nbsp; strategy allowed to be out of market&#039;&#039; not trading&#039;&#039; it will be a nice addition</p>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2013-02-18T13:22:21Z</updated>
			<id>https://forexsb.com/forum/post/18325/#p18325</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Custom Account Statistics for FSB Pro]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/18323/#p18323" />
			<content type="html"><![CDATA[<p>average trades last week = average trades last two weeks = average trades last month = average trades last quarter = average trades last year plus/minus % </p><br /><p>Is it applicable!!!!</p>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2013-02-18T13:12:07Z</updated>
			<id>https://forexsb.com/forum/post/18323/#p18323</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Custom Account Statistics for FSB Pro]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/18314/#p18314" />
			<content type="html"><![CDATA[<p>I&#039;ll add also:&nbsp; Average trade duration, Realized PL per lot, and Max consecutive loses</p><p>With this custom file will be very easy to remove a record or rearrange records.</p><p>Also we&#039;ll be possible to make some &quot;Strategy Performance&quot; function that will combine several stats value and will show: Very Good, Good, Bad... <br />something like:</p><div class="codebox"><pre><code>if (AmbiguousBars&lt; 1 &amp;&amp; MoneyProfitPerDay&gt; 30 &amp;&amp; MoneyEquityPercentDrawdown&lt; 10)
{
    records.Add(new InfoRecord
        {
            Name = &quot;Strategy performance&quot;,
            Value = &quot;Excelent&quot;,
            Flag = InfoRecordFlag.VeryGood
        });
}
else if (AmbiguousBars&lt; 5 &amp;&amp; MoneyProfitPerDay&gt; 25 &amp;&amp; MoneyEquityPercentDrawdown&lt; 15)
{
    records.Add(new InfoRecord
        {
            Name = &quot;Strategy performance&quot;,
            Value = &quot;Good&quot;,
            Flag = InfoRecordFlag.Good
        });
}
else if (AmbiguousBars&lt; 10 &amp;&amp; MoneyProfitPerDay&gt; 0 &amp;&amp; MoneyEquityPercentDrawdown&lt; 15)
{
    records.Add(new InfoRecord
        {
            Name = &quot;Strategy performance&quot;,
            Value = &quot;Normal&quot;,
            Flag = InfoRecordFlag.Normal
        });
}
else
{
    records.Add(new InfoRecord
        {
            Name = &quot;Strategy performance&quot;,
            Value = &quot;Bad&quot;,
            Flag = InfoRecordFlag.Bad
        });
}</code></pre></div><p>Where different Flag values correspond to different color of the info line.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2013-02-17T22:25:11Z</updated>
			<id>https://forexsb.com/forum/post/18314/#p18314</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Custom Account Statistics for FSB Pro]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/18313/#p18313" />
			<content type="html"><![CDATA[<p>I am not sure if I am understanding the purpose of this.... so my reply may be way out to lunch..</p><p>Orders per day........ I feel it to be important that there be a certain number of actual trades per day for some advisers.&nbsp; Also.... profitable and losing entries per day. Because we may have a series of bad orders that needs to be corrected.</p>]]></content>
			<author>
				<name><![CDATA[Blaiserboy]]></name>
				<uri>https://forexsb.com/forum/user/2491/</uri>
			</author>
			<updated>2013-02-17T22:00:37Z</updated>
			<id>https://forexsb.com/forum/post/18313/#p18313</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Custom Account Statistics for FSB Pro]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/18306/#p18306" />
			<content type="html"><![CDATA[<p>I&#039;m now experimenting with loading custom account statistics.</p><p>In that connection I totally rewrite it&#039;s code.</p><p>The main parameters and stats values are calculated by the Backtester at every test.<br />After that program calls AccountStatistics class and provides a link to Backteser.</p><div class="codebox"><pre><code>/// &lt;summary&gt;
///     Calculates the account statistics.
/// &lt;/summary&gt;
public void CalculateAccountStats(IBackTester backtester)
{
    IStrategy strategy = backtester.Strategy;
    IDataSet dataSet = backtester.DataSet;
    IProfile profile = backtester.Profile;

    int bars = dataSet.Bars;
    int firstBar = strategy.FirstBar;
    isInfoInCurrency = profile.IsInfoInCurrency;
    accountCurrency = profile.AccountCurrency;
    SentOrders = backtester.SentOrders;
    isScanPerformed = backtester.IsScanPerformed;
    testedBars = bars - firstBar;

    NetBalance = backtester.NetBalance;
    NetMoneyBalance = backtester.NetMoneyBalance;</code></pre></div><p>In that way, the custom code has full access to all strategy, data series, profile settings and backtest data.</p><p>CalculateAccountStats method of the custom code copies what it needs from backtester and calculates the new parameters.</p><p>The stats info is stored in a InfoRecord class record by record:<br /></p><div class="codebox"><pre><code>    public struct InfoRecord
    {
        public string Name { get; set; }
        public string Value { get; set; }
        public InfoRecordFlag Flag { get; set; }
    }</code></pre></div><div class="codebox"><pre><code>records.Add(new InfoRecord
    {
        Name = &quot;Profit per day&quot;,
        Value = isInfoInCurrency
                    ? MoneyProfitPerDay.ToString(&quot;F2&quot;) + unit
                    : ProfitPerDay + unit,
        Flag = ProfitPerDay &lt; 0
                   ? InfoRecordFlag.Bad
                   : InfoRecordFlag.Normal
    });

records.Add(new InfoRecord
    {
        Name = &quot;Tested bars&quot;,
        Value = testedBars.ToString(CultureInfo.InvariantCulture),
        Flag = InfoRecordFlag.Normal
    });</code></pre></div><p>This concept works fine for now, but I want to experiment more.</p><p>Can you suggests some stats info you want to see in Account Stats info window.<br />I&#039;ll use it for a demo.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2013-02-17T16:44:35Z</updated>
			<id>https://forexsb.com/forum/post/18306/#p18306</id>
		</entry>
</feed>
