<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Feature Proposal: Histogram of Trades]]></title>
		<link>https://forexsb.com/forum/topic/3000/feature-proposal-histogram-of-trades/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/3000/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Feature Proposal: Histogram of Trades.]]></description>
		<lastBuildDate>Mon, 20 Feb 2012 07:26:24 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12705/#p12705</link>
			<description><![CDATA[<p>graphical repredentation of trades, that is a great feature Thanks Guys <img src="https://forexsb.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />.... I wish i could contribute but this is way too advanced</p>]]></description>
			<author><![CDATA[null@example.com (dr.B)]]></author>
			<pubDate>Mon, 20 Feb 2012 07:26:24 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12705/#p12705</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12699/#p12699</link>
			<description><![CDATA[<p>Here&#039;s latest screenshot, I&#039;ve got this up on github:</p><br /><p><a href="http://postimage.org/image/ycn5f4wd3/"><span class="postimg"><img src="http://s7.postimage.org/ycn5f4wd3/hist_Trade_Distribution.jpg" alt="http://s7.postimage.org/ycn5f4wd3/hist_Trade_Distribution.jpg" /></span></a></p><p>- renamed as Trade Distribution Chart<br />- buttons on small background under title bar<br />- with tooltips</p><p>Not yet with StatsBuffer.</p>]]></description>
			<author><![CDATA[null@example.com (krog)]]></author>
			<pubDate>Sun, 19 Feb 2012 23:44:42 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12699/#p12699</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12664/#p12664</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>Should it be used in Small Histogram chart?</p></blockquote></div><p>I made Small Balance Chart taking data from StatsBuffer, but there was a side effect. It worked perfectly on the main screen. But this chart is also included in the Generator, Optimizer ... What happened is that the chart in the Generator was always showing the balance of the strategy on the main screen <img src="https://forexsb.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />I have to rethink the solution. StatsBuffer has to be used only from panels on the main screen because it contains data only for the strategy shown on the main screen. Other panels on Generator or Optimizer has to use local copy of the raw data or to update from Backtester class.</p><p>Small Balance Chart and probably Histogram Chart has to use local copy of the raw data. This is because these charts can be shown on main screen and also in some tools like Generator.</p><p>Or maybe the charts has to use StatsBuffer when they are shown on main screen and Backtester, when they are shown in a dynamic tool. I&#039;ll make some tests with this logic and will update the codes.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Sat, 18 Feb 2012 07:45:12 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12664/#p12664</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12660/#p12660</link>
			<description><![CDATA[<p>StatsBuffer question -- I&#039;ve updated my local copy to the latest on github, I only see StatBuffer used in Small Indicator Chart. Is it used in Small Balance Chart too? Should it be used in Small Histogram chart?</p><p>thanks</p>]]></description>
			<author><![CDATA[null@example.com (krog)]]></author>
			<pubDate>Sat, 18 Feb 2012 04:39:57 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12660/#p12660</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12632/#p12632</link>
			<description><![CDATA[<div class="quotebox"><cite>Popov wrote:</cite><blockquote><p>The chart was updated in order to shows also the reversals and reducing trades.</p><div class="codebox"><pre><code>for (int bar = 0; bar &lt; Data.Bars; bar++)
{
    for (int pos = 0; pos &lt; Backtester.Positions(bar); pos++)
    {
        Transaction transaction = Backtester.PosTransaction(bar, pos);
        if (transaction == Transaction.Close  ||
            transaction == Transaction.Reduce ||
            transaction == Transaction.Reverse)
        {
            results[ctr] = (int)Backtester.PosProfitLoss(bar, pos);
            ctr++;
        }
    }
}</code></pre></div></blockquote></div><p>On my local copy, I&#039;ve added for Transaction.Close || Reduce || Reverse.<br />Small Histogram Chart:<br />- changed title bar name to &quot;Trade Distribution Chart&quot;<br />- added bar under title bar for buttons (Toggle, Clipboard and Export)</p><p>TBD -- use StatsBuffer instead of Backtest class directly</p><p>After I get StatBuffer in there, I will upload to my github repository.</p>]]></description>
			<author><![CDATA[null@example.com (krog)]]></author>
			<pubDate>Fri, 17 Feb 2012 04:04:45 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12632/#p12632</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12630/#p12630</link>
			<description><![CDATA[<p>The chart was updated in order to shows also the reversals and reducing trades.</p><div class="codebox"><pre><code>for (int bar = 0; bar &lt; Data.Bars; bar++)
{
    for (int pos = 0; pos &lt; Backtester.Positions(bar); pos++)
    {
        Transaction transaction = Backtester.PosTransaction(bar, pos);
        if (transaction == Transaction.Close  ||
            transaction == Transaction.Reduce ||
            transaction == Transaction.Reverse)
        {
            results[ctr] = (int)Backtester.PosProfitLoss(bar, pos);
            ctr++;
        }
    }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Fri, 17 Feb 2012 03:10:14 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12630/#p12630</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12613/#p12613</link>
			<description><![CDATA[<p>I think we have to rename the chart. &quot;Histogram Chart&quot; speaks about the chart type, but not about what it interprets. I think &quot;Trade Distribution Chart&quot; will be better.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Thu, 16 Feb 2012 12:50:48 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12613/#p12613</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12612/#p12612</link>
			<description><![CDATA[<p>Actually you have made the sizing, but you misspelled the name of the class <img src="https://forexsb.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><div class="codebox"><pre><code>/// &lt;summary&gt;
/// Arrange the controls after resizing
/// &lt;/summary&gt;
void pnlMarket_Resize(object sender, EventArgs e)
{
    smallIndicatorChart.Height = 2 * pnlMarket.ClientSize.Height / (Configs.ShowJournal ? 3 : 4);
    smallHistogramChart.Height = 2 * pnlMarket.ClientSize.Height / (Configs.ShowJournal ? 3 : 4);
}</code></pre></div><p>versus</p><div class="codebox"><pre><code>/// &lt;summary&gt;
/// Arrange the controls after resizing
/// &lt;/summary&gt;
void pnlMarket_Resize(object sender, EventArgs e)
{
    smallIndicatorChart.Height = 2 * pnlMarket.ClientSize.Height / (Configs.ShowJournal ? 3 : 4);
    smallIndicatorChart.Height = 2 * pnlMarket.ClientSize.Height / (Configs.ShowJournal ? 3 : 4);
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Thu, 16 Feb 2012 12:46:49 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12612/#p12612</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12607/#p12607</link>
			<description><![CDATA[<p>Hi Mr Popov, thanks for your help on this, FSB covers many areas, there are more details than I know ...<br /></p><div class="quotebox"><cite>Popov wrote:</cite><blockquote><p>Krog,<br />Another issue is that the histogram chart doesn&#039;t take the same size as the indicator chart. (Do you need help with this?)</p></blockquote></div><p>Yes, if possible -- I couldn&#039;t get the initialization and event handlers to work out right, I couldn&#039;t figure it out.</p><div class="quotebox"><cite>Popov wrote:</cite><blockquote><p>The Histogram Chart shows only loosing trades for the included in the distribution Demo MACD Reversal strategy.</p></blockquote></div><p>I think it is what happens -- it considers a trade complete by searching for Transaction.Close, and the counts are based on transactions that are Transaction.Close. So, does it need to include Transaction.Reverse? <br />I&#039;m not sure how to handle Transaction.Reduce, is the close lot considered a trade, or when all open lots are finally closed? I would prefer when all open lots are closed and there are no more open lots, it would make it easier to get the result (from Position.ProfitLoss).</p><div class="quotebox"><cite>Popov wrote:</cite><blockquote><p>Also the chart takes raw values from the Backtester class. This can lead to an issue when the chart is forced to recalculate during the work of Generator or Optimizer. Th problem comes from the fact that Generator uses the Backtester class for its calculations and puts temporary values there. If happens that the user interface charts or journals need recalculation at that time, they will receive the temp values from the Generator instead of the already fixed strategy on the main screen. That&#039;s why I started developing this StatsBuffer. My idea is the main screen panels to use data only from it. I&#039;ll expand the buffer with the necessary data for the Histogram Chart and we can redirect the sources to the buffer.</p></blockquote></div><p>I agree, I will have to change it to use the StatsBuffer class.</p>]]></description>
			<author><![CDATA[null@example.com (krog)]]></author>
			<pubDate>Thu, 16 Feb 2012 03:48:50 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12607/#p12607</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12606/#p12606</link>
			<description><![CDATA[<p>Krog,<br />Thank you for uploading the sources to github. I played a little bit with the chart and found out unusual behaviour.</p><p>The Histogram Chart shows only loosing trades for the included in the distribution Demo MACD Reversal strategy.</p><p><a href="http://postimage.org/image/6i11t3y7h/"><span class="postimg"><img src="http://s14.postimage.org/6i11t3y7h/histogram_chart_bug.jpg" alt="http://s14.postimage.org/6i11t3y7h/histogram_chart_bug.jpg" /></span></a></p><p>Another issue is that the histogram chart doesn&#039;t take the same size as the indicator chart. (Do you need help with this?)</p><p>Also the chart takes raw values from the Backtester class. This can lead to an issue when the chart is forced to recalculate during the work of Generator or Optimizer. Th problem comes from the fact that Generator uses the Backtester class for its calculations and puts temporary values there. If happens that the user interface charts or journals need recalculation at that time, they will receive the temp values from the Generator instead of the already fixed strategy on the main screen. That&#039;s why I started developing this StatsBuffer. My idea is the main screen panels to use data only from it. I&#039;ll expand the buffer with the necessary data for the Histogram Chart and we can redirect the sources to the buffer.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Thu, 16 Feb 2012 01:55:02 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12606/#p12606</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12584/#p12584</link>
			<description><![CDATA[<p>I&#039;ve posted the addition to my github repository, and you can get the .exe to try it out at:<br /><a href="https://github.com/krogKrog/Forex-Strategy-Builder/blob/master/bin/Debug/Forex%20Strategy%20Builder.exe">https://github.com/krogKrog/Forex-Strat … uilder.exe</a><br />I think if you click Get Raw, it will download the exe for you.</p><p>Here is a screenshot, I was able to add to the left to toggle between the Indicator chart:</p><p><a href="http://postimage.org/image/56h4b83qv/"><span class="postimg"><img src="http://s15.postimage.org/56h4b83qv/hist_Overlaid.jpg" alt="http://s15.postimage.org/56h4b83qv/hist_Overlaid.jpg" /></span></a></p><p>- ToolStrip to hold buttons for toggling between Indicator and Histogram<br />- Splitter under ToolStrip to resize charts<br />- 3 buttons on Histogram chart for<br />&nbsp; * toggle between Count and Cumulative views<br />&nbsp; * copy histogram data to Clipboard<br />&nbsp; * Export histogram data to CSV file</p><p>This addition is minimally invasive, adding only Small Histogram Chart.cs. Modified files:<br />- Controls Market.cs<br />- Actions.cs<br />- Exporter.cs</p><p>To get the histogram data from somewhere else in the code, the calculating method is static and publicly available as:</p><p>Small_Histogram_Chart.GetHistogramDataInts(out int[] results, out int[] indexes, out int[] counts, out int[] cumulatives)</p><p>I think this will work, I didn&#039;t test it, let me know if it doesn&#039;t work, it will be easy to remove it.</p><p>These details, I wasn&#039;t able to do them:<br />- putting Toggle/Clipbard/Export buttons on the right<br />- generating the language files (but all strings are in Language.T(&#039;myString&#039;) form)<br />- making the Indicator and Histogram charts the same size all the time so when toggling between them the chart space does not jump around</p><p>I&#039;ve also had a few Visual Studio crashes in debugging when using the Clipboard feature. I haven&#039;t seen it with the exe, so hopefully it&#039;s just something about Vis Stud.</p><p>Let me if any comments or questions, then if it&#039;s passes review, I&#039;ll send on the push request in github.</p>]]></description>
			<author><![CDATA[null@example.com (krog)]]></author>
			<pubDate>Wed, 15 Feb 2012 04:11:42 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12584/#p12584</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12553/#p12553</link>
			<description><![CDATA[<p>This may be easier by just creating a class containing HistogramDataInt, then a List&lt;HistogramDataInt&gt; to pass data back, eg:</p><div class="codebox"><pre><code>public class HistogramDataInt
{
  private int count;
  public int Count
  {
    get { return count; }
    set { count = value; }
  }

  // ... Other stuff follows
}

private List&lt;HistogramDataInt&gt; getHistogramDataInts()
{
  List&lt;HistogramDataInt&gt; thelist = new List&lt;HistogramDataInt&gt;();
  // Populate the List&lt;&gt;
  return thelist;
}

public List&lt;HistogramDataInt&gt; mylist = getHistogramDataInts();</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ab)]]></author>
			<pubDate>Tue, 14 Feb 2012 02:10:52 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12553/#p12553</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12552/#p12552</link>
			<description><![CDATA[<p>I hope someone can help me with this one, I&#039;m not sure how to do this in C#:</p><p>how to make a public callable function for the class&#039;s private function with out parameters:</p><div class="codebox"><pre><code>private void getHistogramDataInts (out int[] results, out int[] indexes, out int[] counts, out int[] cumulatives)</code></pre></div><p>I&#039;ve tried:<br /></p><div class="codebox"><pre><code>public void GetHistogramDataInts { get { getHistogramDataInts( ); } }
public void GetHistogramDataInts { get { getHistogramDataInts(out int[] results, out int[] indexes, out int[] counts, out int[] cumulatives ); } }
public int[][][][] GetHistogramDataInts { get { getHistogramDataInts(out int[] results, out int[] indexes, out int[] counts, out int[] cumulatives ); } }
public void GetHistogramDataInts { get { getHistogramDataInts(new int[], new int[], new int[], new int[] ); } }</code></pre></div><p>and several other combinations like that, but I&#039;ve had no luck finding one that works ...</p>]]></description>
			<author><![CDATA[null@example.com (krog)]]></author>
			<pubDate>Tue, 14 Feb 2012 01:51:21 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12552/#p12552</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12511/#p12511</link>
			<description><![CDATA[<p>Exporting Data:<br />I got 2 buttons, one will copy the CSV data to the clipboard, so user can paste into Excel sheet very quickly; the other exports and writes a csv file to the local machine, and I added a function to Exporter.cs to do it.</p>]]></description>
			<author><![CDATA[null@example.com (krog)]]></author>
			<pubDate>Mon, 13 Feb 2012 03:58:59 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12511/#p12511</guid>
		</item>
		<item>
			<title><![CDATA[Re: Feature Proposal: Histogram of Trades]]></title>
			<link>https://forexsb.com/forum/post/12510/#p12510</link>
			<description><![CDATA[<div class="quotebox"><cite>Popov wrote:</cite><blockquote><p>Hello Krog,<br />You have to make both charts with equal size and location and to toggle their visibility. See how it&#039;s done in the generator&#039;s chart.<br />You also have to use Language.T(&quot;MyString&quot;) in orther to make the text translatable. After that you have to add the new strings in the Bulgarian.xml file in the Resources folder of the project. Just put both strings in english. Latter, when you start the program FSB will tell you that the new string is not in the language file. This is because FSB compares the integrated Bulgarian.xml with every language file at loading. You don&#039;t need to add the new phrases&nbsp; manually in all the lang files. Just use genlangfiles and repairlang commands from the console. FSB will inject the new phrases in the lang files. After that the phrases can be translated by using the Edit Translation tool.</p></blockquote></div><p>Ok, I&#039;ll try to do that before submitting to github.</p>]]></description>
			<author><![CDATA[null@example.com (krog)]]></author>
			<pubDate>Mon, 13 Feb 2012 03:56:25 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/12510/#p12510</guid>
		</item>
	</channel>
</rss>
