<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — Getting Equity And Balance Values in Indicators]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/2490/" />
	<updated>2011-08-11T03:34:14Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/2490/getting-equity-and-balance-values-in-indicators/</id>
		<entry>
			<title type="html"><![CDATA[Re: Getting Equity And Balance Values in Indicators]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/10003/#p10003" />
			<content type="html"><![CDATA[<p>Oh I see -- that&#039;s on the GitHub site. It lets you branch from Mr Popov&#039;s main branch, then download to keep a local copy. It has a download exe that controls uploading your changes from your machine to your branch on the website. After you&#039;ve committed your changes, you send a pull request to Mr Popov, and he can merge your changes into the main branch.</p>]]></content>
			<author>
				<name><![CDATA[krog]]></name>
				<uri>https://forexsb.com/forum/user/1692/</uri>
			</author>
			<updated>2011-08-11T03:34:14Z</updated>
			<id>https://forexsb.com/forum/post/10003/#p10003</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Getting Equity And Balance Values in Indicators]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/10002/#p10002" />
			<content type="html"><![CDATA[<p>I have donwloaded the source code from there that&#039;s how I was working on it. But what I meant to ask was that if I make changes to the system how do I send it back to the community or Popov for that matter.</p>]]></content>
			<author>
				<name><![CDATA[syedrizwanm]]></name>
				<uri>https://forexsb.com/forum/user/4317/</uri>
			</author>
			<updated>2011-08-11T03:29:56Z</updated>
			<id>https://forexsb.com/forum/post/10002/#p10002</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Getting Equity And Balance Values in Indicators]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/10001/#p10001" />
			<content type="html"><![CDATA[<p>Ok, for FSBuilder:</p><p><a href="http://forexsb.com/forum/topic/2189/forex-strategy-builder-source-code/">http://forexsb.com/forum/topic/2189/for … urce-code/</a></p><p>for FSTrader:<br /><a href="http://forexsb.com/forum/topic/2402/forex-strategy-trader-source-code/">http://forexsb.com/forum/topic/2402/for … urce-code/</a></p><p>Then, it is controlled through GitHub -- an open source control web site. Using the site, I was able to get through the how-tos in about 30 - 45 minutes to get my version and start working with my local copy and branch on the site.</p><p>I&#039;ve worked on the FSB code, but not the FST code.</p>]]></content>
			<author>
				<name><![CDATA[krog]]></name>
				<uri>https://forexsb.com/forum/user/1692/</uri>
			</author>
			<updated>2011-08-11T03:28:42Z</updated>
			<id>https://forexsb.com/forum/post/10001/#p10001</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Getting Equity And Balance Values in Indicators]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/10000/#p10000" />
			<content type="html"><![CDATA[<p>Yes, there is a centralized source control, give me a couple minutes, I&#039;ll find the thread ...</p>]]></content>
			<author>
				<name><![CDATA[krog]]></name>
				<uri>https://forexsb.com/forum/user/1692/</uri>
			</author>
			<updated>2011-08-11T03:24:54Z</updated>
			<id>https://forexsb.com/forum/post/10000/#p10000</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Getting Equity And Balance Values in Indicators]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/9999/#p9999" />
			<content type="html"><![CDATA[<p>You are correct. I so don&#039;t want to modify FST. I am more than happy to modify FSB. Because then result&#039;s can&#039;t be guaranteed. </p><p>Having said that is Popov the only person working on this or is he happy to have more developers working on this source code?</p><p>I don&#039;t see a centralized source control anywhere.</p><p>Regards,<br />Riz</p>]]></content>
			<author>
				<name><![CDATA[syedrizwanm]]></name>
				<uri>https://forexsb.com/forum/user/4317/</uri>
			</author>
			<updated>2011-08-11T03:21:51Z</updated>
			<id>https://forexsb.com/forum/post/9999/#p9999</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Getting Equity And Balance Values in Indicators]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/9998/#p9998" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>syedrizwanm wrote:</cite><blockquote><p>But I should be able to go through open positions and calculate current P/L of all open positions correct?<br />If yes then can you please point me to the function?</p></blockquote></div><p>Unfortunately not -- the indicators calculate and return their values before the steps in Backtester.Calculate that figure out the open positions / account balances for the back test. The indicator calculations and position calculations are totally separate. The open positions and current P/L is available in the FSB source code, in the Backtester Calculator.cs (or Backtester class), you can check it as it goes in the TransferFromPreviousBar method, or from the Position/Session object at a given bar.</p><p>(Here though is about as far as I understand the source code; Mr Popov may have more insight on the exact methods for getting the info)</p>]]></content>
			<author>
				<name><![CDATA[krog]]></name>
				<uri>https://forexsb.com/forum/user/1692/</uri>
			</author>
			<updated>2011-08-11T03:18:46Z</updated>
			<id>https://forexsb.com/forum/post/9998/#p9998</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Getting Equity And Balance Values in Indicators]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/9997/#p9997" />
			<content type="html"><![CDATA[<p>But I should be able to go through open positions and calculate current P/L of all open positions correct?<br />If yes then can you please point me to the function?</p><p>I am after something similar to Account Percent Stop but on the positive side.</p>]]></content>
			<author>
				<name><![CDATA[syedrizwanm]]></name>
				<uri>https://forexsb.com/forum/user/4317/</uri>
			</author>
			<updated>2011-08-11T03:06:33Z</updated>
			<id>https://forexsb.com/forum/post/9997/#p9997</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Getting Equity And Balance Values in Indicators]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/9996/#p9996" />
			<content type="html"><![CDATA[<p>Hi Riz,<br />Unfortunately this is not possible as is with FSB. (Mr Popov may have more comments). Based on the FSB source code, as I understand it, the indicator values are calculated first. The indicator&#039;s Calculate function runs over the entire bars, then returns the array of indicator values -- there is no information that gets in other than the Price series. Then, the backtester iterates through the bars, checking the array values from each indicator for a given bar and determines if it should open/close a position or not. If a position is open, it updates the floating balance / equity balance.</p><p>The only workaround I&#039;ve found, which I don&#039;t recommend, is try to simulate the equity balance in the indicator. This is a lot of work, because you basically have to include all of your strategy into one indicator, and then simulate the backtest. And then, the equity balance I got did not match because of things like the spread, and rollover, and others. If I had to choose, I&#039;d go with making a custom build of FSB and FST, it will probably work better and be a better solution your can use with different strategies.</p><p>sorry I could not help more<br />krog</p>]]></content>
			<author>
				<name><![CDATA[krog]]></name>
				<uri>https://forexsb.com/forum/user/1692/</uri>
			</author>
			<updated>2011-08-11T03:02:33Z</updated>
			<id>https://forexsb.com/forum/post/9996/#p9996</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Getting Equity And Balance Values in Indicators]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/9995/#p9995" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I am trying to get equity values from with-in the indicator.</p><p>Currently I am using this: curBalance = Backtester.MoneyEquity(iBar); inside the calculate method.<br />But this function either remains same as initial balance or returns an abrupt value after a few 100 bars have been processed. I tested it during debugging as well. Same for all the other money and profit loss functions.</p><p>Is it possible to access the Backtester object or Session object through the indicator to get hold of these values.</p><p>I don&#039;t want to write additional code in the Backtest Calculator to process this indicator because then I will have to go and modify Forex Stratey Trader as well. And I want things to be kept as standard as possible.</p><p>Please advise.<br />Regards,<br />Riz</p>]]></content>
			<author>
				<name><![CDATA[syedrizwanm]]></name>
				<uri>https://forexsb.com/forum/user/4317/</uri>
			</author>
			<updated>2011-08-11T01:55:54Z</updated>
			<id>https://forexsb.com/forum/post/9995/#p9995</id>
		</entry>
</feed>
