<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Форум QUIK [тема: CalcBuySell и getBuySellInfoEx неправильно считают для фьючерсов с валютой шага цены отличной от SUR]</title>
		<link>http://forum.quik.ru</link>
		<description>Новое в теме CalcBuySell и getBuySellInfoEx неправильно считают для фьючерсов с валютой шага цены отличной от SUR форума  на сайте Форум QUIK [forum.quik.ru]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Sun, 05 Apr 2026 08:21:33 +0300</pubDate>
		<item>
			<title>CalcBuySell и getBuySellInfoEx неправильно считают для фьючерсов с валютой шага цены отличной от SUR</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message81987/topic9522/">CalcBuySell и getBuySellInfoEx неправильно считают для фьючерсов с валютой шага цены отличной от SUR</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Собственно сабж. Брокер БКС, &nbsp;* &nbsp;со срочным рынком, заявки на 2 млн руб ГО могу выставить в торговую систему как на лонг, так и на шорт, однако функции говорят, что не должен мочь:<br /><br />
====code====
<pre>maxpos, commis = CalcBuySell(ticker.class, sec, nonfut and "1111111" or "SPBFUTxxxxx", accounts&#91;ticker.class&#93;, last, buy, false)
print(maxpos, commis)
debugf(table.tovstring(getBuySellInfoEx("xxxxxxx00000", nonfut and "1111111" or "SPBFUTxxxxx", ticker.class, sec, last)))</pre>
=============
<br />Неправильный выход для EDH6:<br />
====code====
<pre>0&nbsp;&nbsp;&nbsp;0.0
{
 balance = "0",
 can_buy = "0",
 can_buy_own = "0",
 can_sell = "23",
 can_sell_own = "0",
 client_type = "5",
 d_long = "0.050000",
 d_min_long = "1.000000",
 d_min_short = "1.000000e+50",
 d_short = "0.050000",
 is_asset_sec = "0",
 is_futures = "1",
 is_long_allowed = "0",
 is_margin_sec = "0",
 is_rest_short_sec = "0",
 is_short_allowed = "0",
 lim_long = "-1.000000",
 lim_short = "-1.000000",
 limit_kind = "0.000000",
 long_coef = "1.000000",
 long_wa_price = "0.000000",
 open_value = "0.000000",
 open_value_coef = "0.000000",
 position_valuation = "0.000000",
 profit_loss = "0.000000",
 share = "0.000000",
 short_coef = "1.000000",
 short_wa_price = "0.000000",
 spread_hc = "0.000000",
 value = "0.000000",
 value_coef = "0.000000",
}</pre>
=============
и для SVH6<br />
====code====
<pre>0&nbsp;&nbsp;&nbsp;0.0
{
 balance = "0",
 can_buy = "0",
 can_buy_own = "0",
 can_sell = "28",
 can_sell_own = "0",
 client_type = "5",
 d_long = "0.220000",
 d_min_long = "1.000000",
 d_min_short = "1.000000e+50",
 d_short = "0.220000",
 is_asset_sec = "0",
 is_futures = "1",
 is_long_allowed = "0",
 is_margin_sec = "0",
 is_rest_short_sec = "0",
 is_short_allowed = "0",
 lim_long = "-1.000000",
 lim_short = "-1.000000",
 limit_kind = "0.000000",
 long_coef = "1.000000",
 long_wa_price = "0.000000",
 open_value = "0.000000",
 open_value_coef = "0.000000",
 position_valuation = "0.000000",
 profit_loss = "0.000000",
 share = "0.000000",
 short_coef = "1.000000",
 short_wa_price = "0.000000",
 spread_hc = "0.000000",
 value = "0.000000",
 value_coef = "0.000000",
}</pre>
=============
а также ртс, золото, нефть, газ...<br /><br />Правильный выход для CRH6:<br />
====code====
<pre>2429&nbsp;&nbsp;&nbsp;0.0
{
 balance = "0",
 can_buy = "2429",
 can_buy_own = "47",
 can_sell = "2429",
 can_sell_own = "0",
 client_type = "5",
 d_long = "0.080000",
 d_min_long = "1.000000",
 d_min_short = "1.000000e+50",
 d_short = "0.080000",
 is_asset_sec = "0",
 is_futures = "1",
 is_long_allowed = "0",
 is_margin_sec = "0",
 is_rest_short_sec = "0",
 is_short_allowed = "0",
 lim_long = "-1.000000",
 lim_short = "-1.000000",
 limit_kind = "0.000000",
 long_coef = "1.000000",
 long_wa_price = "0.000000",
 open_value = "0.000000",
 open_value_coef = "0.000000",
 position_valuation = "0.000000",
 profit_loss = "0.000000",
 share = "0.000000",
 short_coef = "1.000000",
 short_wa_price = "0.000000",
 spread_hc = "0.000000",
 value = "0.000000",
 value_coef = "0.000000",
}</pre>
=============
и для SRH6<br />
====code====
<pre>533&nbsp;&nbsp;&nbsp;0.0
{
 balance = "0",
 can_buy = "533",
 can_buy_own = "0",
 can_sell = "514",
 can_sell_own = "0",
 client_type = "5",
 d_long = "0.120000",
 d_min_long = "1.000000",
 d_min_short = "1.000000e+50",
 d_short = "0.125000",
 is_asset_sec = "0",
 is_futures = "1",
 is_long_allowed = "0",
 is_margin_sec = "0",
 is_rest_short_sec = "0",
 is_short_allowed = "0",
 lim_long = "-1.000000",
 lim_short = "-1.000000",
 limit_kind = "0.000000",
 long_coef = "1.000000",
 long_wa_price = "0.000000",
 open_value = "0.000000",
 open_value_coef = "0.000000",
 position_valuation = "0.000000",
 profit_loss = "0.000000",
 share = "0.000000",
 short_coef = "1.000000",
 short_wa_price = "0.000000",
 spread_hc = "0.000000",
 value = "0.000000",
 value_coef = "0.000000",
}</pre>
=============
<br />Неужели эти функции не умеют до сих пор валютный курс учитывать хотя бы приблизительно? <br />
			<i>13.03.2026 11:54:36, funduk.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message81987/topic9522/</link>
			<guid>http://forum.quik.ru/messages/forum10/message81987/topic9522/</guid>
			<pubDate>Fri, 13 Mar 2026 11:54:36 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
