<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — LotSize Calculation Percentage of Balance]]></title>
		<link>https://forexsb.com/forum/topic/9830/lotsize-calculation-percentage-of-balance/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/9830/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in LotSize Calculation Percentage of Balance.]]></description>
		<lastBuildDate>Wed, 11 Mar 2026 20:04:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: LotSize Calculation Percentage of Balance]]></title>
			<link>https://forexsb.com/forum/post/83140/#p83140</link>
			<description><![CDATA[<p>Hi, what I usually do is to drop the EA code into the AI.<br />Ask to characterize the trading strategy and to calculate the lot size bases on:<br />- the account balance<br />- the stop loss pips in the code<br />- the asset<br />- for a specific the risk % per trade</p><p>Regards<br />Vincenzo</p>]]></description>
			<author><![CDATA[null@example.com (Vincenzo)]]></author>
			<pubDate>Wed, 11 Mar 2026 20:04:55 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/83140/#p83140</guid>
		</item>
		<item>
			<title><![CDATA[Re: LotSize Calculation Percentage of Balance]]></title>
			<link>https://forexsb.com/forum/post/83137/#p83137</link>
			<description><![CDATA[<div class="quotebox"><cite>Popov wrote:</cite><blockquote><p>Side note!</p><p>I&#039;ll add a Risk calculation functionality to the &quot;Top 10 Robots App&quot;.<br />It will be ready next week. </p><p>If it works fine, I may add such options to EA Studio.</p><p>It works as follows:<br />&nbsp; - The strategy needs Stop Loss (if not, we may assume 100 pips loss)<br />&nbsp; - Select Rsik percent (let&#039;s say 1% of the account)<br />&nbsp; - The program will calculate the proper Entry Lots depending on the Initial Account, the Stop Loss pips the spread and the commission.</p><p>Here is an example from the Prop Firm app (it also show the Stop Loss in dollars)</p><p><a href="https://image-holder.forexsb.com/store/prop-app-risk-to-lot-size.png"><span class="postimg"><img src="https://image-holder.forexsb.com/store/prop-app-risk-to-lot-size-thumb.png" alt="https://image-holder.forexsb.com/store/prop-app-risk-to-lot-size-thumb.png" /></span></a></p></blockquote></div><br /><p>Hello Popov, what&#039;s new about this?</p>]]></description>
			<author><![CDATA[null@example.com (mentosan)]]></author>
			<pubDate>Fri, 06 Mar 2026 11:10:24 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/83137/#p83137</guid>
		</item>
		<item>
			<title><![CDATA[Re: LotSize Calculation Percentage of Balance]]></title>
			<link>https://forexsb.com/forum/post/81885/#p81885</link>
			<description><![CDATA[<p>wow, thanks Mr. Popov !</p><p>late edit: oh, it is not for expert advisor studio. I red it very fast, too fast! <img src="https://forexsb.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>anyway, good things are coming in the future also for the eas, for sure!</p>]]></description>
			<author><![CDATA[null@example.com (mentosan)]]></author>
			<pubDate>Sun, 17 Nov 2024 17:44:20 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/81885/#p81885</guid>
		</item>
		<item>
			<title><![CDATA[Re: LotSize Calculation Percentage of Balance]]></title>
			<link>https://forexsb.com/forum/post/81881/#p81881</link>
			<description><![CDATA[<p>Side note!</p><p>I&#039;ll add a Risk calculation functionality to the &quot;Top 10 Robots App&quot;.<br />It will be ready next week. </p><p>If it works fine, I may add such options to EA Studio.</p><p>It works as follows:<br />&nbsp; - The strategy needs Stop Loss (if not, we may assume 100 pips loss)<br />&nbsp; - Select Rsik percent (let&#039;s say 1% of the account)<br />&nbsp; - The program will calculate the proper Entry Lots depending on the Initial Account, the Stop Loss pips the spread and the commission.</p><p>Here is an example from the Prop Firm app (it also show the Stop Loss in dollars)</p><p><a href="https://image-holder.forexsb.com/store/prop-app-risk-to-lot-size.png"><span class="postimg"><img src="https://image-holder.forexsb.com/store/prop-app-risk-to-lot-size-thumb.png" alt="https://image-holder.forexsb.com/store/prop-app-risk-to-lot-size-thumb.png" /></span></a></p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Sun, 17 Nov 2024 09:02:33 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/81881/#p81881</guid>
		</item>
		<item>
			<title><![CDATA[Re: LotSize Calculation Percentage of Balance]]></title>
			<link>https://forexsb.com/forum/post/81879/#p81879</link>
			<description><![CDATA[<p>Você precisa ir na opções create positivo signal e signal e chamar um. Função com stop loss de 500000 pontos assim fica o mesmo que operar sem. Stop e super fácil</p>]]></description>
			<author><![CDATA[null@example.com (gabdecsters)]]></author>
			<pubDate>Sat, 16 Nov 2024 08:35:52 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/81879/#p81879</guid>
		</item>
		<item>
			<title><![CDATA[Re: LotSize Calculation Percentage of Balance]]></title>
			<link>https://forexsb.com/forum/post/81869/#p81869</link>
			<description><![CDATA[<p>damn NOBODY AN IDEA?<br />I try 1000 times. i need the Stoploss of an signal but i dont know how to fetch it.</p><p>it must be something with this in OPENpOsition</p><div class="codebox"><pre><code>         double stopLoss   = GetStopLossPrice(command, signal.StopLossPips);</code></pre></div><p>i think it fetches the stoploss but i dont know how to implement</p>]]></description>
			<author><![CDATA[null@example.com (Roughey)]]></author>
			<pubDate>Fri, 15 Nov 2024 08:27:05 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/81869/#p81869</guid>
		</item>
		<item>
			<title><![CDATA[LotSize Calculation Percentage of Balance]]></title>
			<link>https://forexsb.com/forum/post/81114/#p81114</link>
			<description><![CDATA[<p>I try to find out how we can use Lotsize calculation of x percent of Account Balance.</p><p>Here is my code</p><div class="codebox"><pre><code>// Function to calculate lot size based on account balance and risk percentage
double CalculateLotSize(double risk_percentage)
{
    // Get the current account balance
    double account_balance = AccountInfoDouble(ACCOUNT_BALANCE);
    
    // Define the amount of balance to risk (risk_percentage of the balance)
    double risk_amount = (risk_percentage / 100.0) * account_balance;

    // Get the tick value and point size for the symbol
    double tick_value = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
    double tick_size = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
    
    // Risk per lot (pip value per lot)
    double risk_per_lot = tick_value / tick_size;

    // Assuming 100 pips as stop loss (modify this based on your strategy)
    double stop_loss_pips = 100;
    
    // Calculate lot size based on risk amount and stop loss
    double lot_size = risk_amount / (stop_loss_pips * risk_per_lot);
    
    // Ensure the lot size is within the broker&#039;s minimum and maximum allowed limits
    double min_lot = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MIN);
    double max_lot = SymbolInfoDouble(symbol, SYMBOL_VOLUME_MAX);
    double step_lot = SymbolInfoDouble(symbol, SYMBOL_VOLUME_STEP);
    
    // Round the lot size to the nearest lot step
    lot_size = MathMax(min_lot, MathMin(max_lot, NormalizeDouble(lot_size, int(log10(1.0/step_lot)))));

    return lot_size;
}</code></pre></div><p>The problem here is that the Lotsize Calculation depends of the stopLoss. So i ask how i can get the stoploss of the strategy which will open a trade next time. Maybe someone have idea or a better solution</p><div class="codebox"><pre><code>    // Calculate lot size based on risk amount and stop loss
    double lot_size = risk_amount / (stop_loss_pips * risk_per_lot);</code></pre></div><p>How can i get the stopLoss out of the signal ? someone have an idea..</p>]]></description>
			<author><![CDATA[null@example.com (Roughey)]]></author>
			<pubDate>Mon, 09 Sep 2024 11:35:48 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/81114/#p81114</guid>
		</item>
	</channel>
</rss>
