<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — How to calculate margin?]]></title>
		<link>https://forexsb.com/forum/topic/4853/how-to-calculate-margin/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/4853/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to calculate margin?.]]></description>
		<lastBuildDate>Sat, 21 Jun 2014 11:43:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to calculate margin?]]></title>
			<link>https://forexsb.com/forum/post/25444/#p25444</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>1) How to calculate margin?;</p></blockquote></div><div class="codebox"><pre><code>        public static double RequiredMargin(double lots, int bar)
        {
            double amount = lots*InstrProperties.LotSize;
            double exchangeRate = Close[bar]/AccountExchangeRate(Close[bar]);
            double requiredMargin = amount*exchangeRate/Configs.Leverage;

            return requiredMargin;
        }</code></pre></div><p>You can check the source code here: <a href="https://github.com/PopovMP/Forex-Strategy-Builder/blob/master/Source/ForexStrategyBuilder/Backtester/BacktesterStatistics.cs">https://github.com/PopovMP/Forex-Strate … tistics.cs</a> Line: 757</p><br /><div class="quotebox"><blockquote><p>2) Why does the program show opening 0.01 lot, and actually calculates the margin, spread and profit as of 1 lot? (XAUUSD)</p></blockquote></div><p>I don&#039;t think the program does that. As you see in the formula:</p><p>Required Margin = Lots * Lot Size * Exchange Rate / Leverage;</p><br /><p>So if you set lots = 0.01, it must not use 1.0. Probably you are missing some of the other parameters.</p><br /><p>Can you post the exact numbers?</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Sat, 21 Jun 2014 11:43:01 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/25444/#p25444</guid>
		</item>
		<item>
			<title><![CDATA[How to calculate margin?]]></title>
			<link>https://forexsb.com/forum/post/25443/#p25443</link>
			<description><![CDATA[<p>1) How to calculate margin?;<br />2) Why does the program show opening 0.01 lot, and actually calculates the margin, spread and profit as of 1 lot? (XAUUSD)</p>]]></description>
			<author><![CDATA[null@example.com (Pom-Pom)]]></author>
			<pubDate>Sat, 21 Jun 2014 10:52:52 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/25443/#p25443</guid>
		</item>
	</channel>
</rss>
