<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Форум QUIK [тема: стоп завка больше чем в портфеле на лот раз]</title>
		<link>http://forum.quik.ru</link>
		<description>Новое в теме стоп завка больше чем в портфеле на лот раз форума  на сайте Форум QUIK [forum.quik.ru]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Mon, 20 Apr 2026 11:04:28 +0300</pubDate>
		<item>
			<title>стоп завка больше чем в портфеле на лот раз</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message21613/topic2434/">стоп завка больше чем в портфеле на лот раз</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			нашел в чём дело.<br />депо лимитов нужно делить на лот.<br />нужно написать глобальную переменную лотов. и куда её вставить?<br />а поделить <br /> &nbsp;T&#91;&quot;QUANTITY&quot;&#93; = tostring(math.abs(size/lot)) <br />не удавалось. так как лоты были &nbsp;лимитами.<br />вручную работает.<br />lot=1000<br />....<br />lot = getParamEx(&quot;TQBR&quot;, &quot;TICKER&quot;, &quot;LOTSIZE&quot;).param_value+0 &nbsp;это не работает.здесь не в лотах а на лоты. &nbsp; <br />
			<i>12.01.2017 16:54:03, федя федя.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message21613/topic2434/</link>
			<guid>http://forum.quik.ru/messages/forum10/message21613/topic2434/</guid>
			<pubDate>Thu, 12 Jan 2017 16:54:03 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>стоп завка больше чем в портфеле на лот раз</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message21611/topic2434/">стоп завка больше чем в портфеле на лот раз</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			function GetBalance()<br /> &nbsp; for i = 0, getNumberOf(&quot;DEPO_LIMITS&quot;) - 1 do <br /> &nbsp; &nbsp; &nbsp;local depo_limit = getItem(&quot;DEPO_LIMITS&quot;, i)<br /> &nbsp; &nbsp; &nbsp;if depo_limit.sec_code == TICKER<br /> &nbsp; &nbsp; &nbsp;and depo_limit.trdaccid == ACCOUNT<br /> &nbsp; &nbsp; &nbsp;and depo_limit.limit_kind == LIMIT_KIND then &nbsp; &nbsp; &nbsp; &nbsp; <br /> &nbsp; &nbsp; &nbsp; &nbsp; return depo_limit.currentbal<br /> &nbsp; &nbsp; &nbsp;end<br /> &nbsp; end<br /> &nbsp; return 0<br />end<br />function NewStopOrder(size)<br /> &nbsp; T = {}<br /> &nbsp; TRANS_ID = TRANS_ID + 1<br /> &nbsp; T&#91;&quot;TRANS_ID&quot;&#93; &nbsp; &nbsp;= tostring(TRANS_ID)<br /> &nbsp; T&#91;&quot;ACTION&quot;&#93; &nbsp; &nbsp; &nbsp;= &quot;NEW_STOP_ORDER&quot; &nbsp; <br /> &nbsp; T&#91;&quot;CLASSCODE&quot;&#93; &nbsp; = MARKET<br /> &nbsp; T&#91;&quot;SECCODE&quot;&#93; &nbsp; &nbsp; = TICKER<br /> &nbsp; T&#91;&quot;ACCOUNT&quot;&#93; &nbsp; &nbsp; = ACCOUNT<br /> &nbsp; T&#91;&quot;CLIENT_CODE&quot;&#93; = CLIENT_CODE<br /> &nbsp; T = SetStopprice(T)<br /> &nbsp; if BALANCE &gt; 0 then<br /> &nbsp; &nbsp; &nbsp;T&#91;&quot;OPERATION&quot;&#93; = &quot;S&quot;<br /> &nbsp; else<br /> &nbsp; &nbsp; &nbsp;T&#91;&quot;OPERATION&quot;&#93; = &quot;B&quot;<br /> &nbsp; end &nbsp; &nbsp;<br /> &nbsp; T&#91;&quot;QUANTITY&quot;&#93; = tostring(math.abs(size))-- что интересно &nbsp;qty &nbsp;в лотах!-- на купайле здесь делил на лот. а луа ругается<br /> &nbsp; local trans_reply = SEND_TRANSACTION(30, T)<br /> &nbsp; if trans_reply ~= nil then<br /> &nbsp; &nbsp; &nbsp;if trans_reply.order_num ~= nil then<br /> &nbsp; &nbsp; &nbsp; &nbsp; return trans_reply.order_num<br /> &nbsp; &nbsp; &nbsp;else<br /> &nbsp; &nbsp; &nbsp; &nbsp; message(trans_reply.result_msg)<br /> &nbsp; &nbsp; &nbsp; &nbsp; return 0<br /> &nbsp; &nbsp; &nbsp;end<br /> &nbsp; else<br /> &nbsp; &nbsp; &nbsp;return 0<br /> &nbsp; end<br />end<br /><br />проверка балланса в лотах? <br />
			<i>12.01.2017 14:46:58, федя федя.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message21611/topic2434/</link>
			<guid>http://forum.quik.ru/messages/forum10/message21611/topic2434/</guid>
			<pubDate>Thu, 12 Jan 2017 14:46:58 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>стоп завка больше чем в портфеле на лот раз</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message21610/topic2434/">стоп завка больше чем в портфеле на лот раз</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			суппорт квик вы так и не ответите? <br />
			<i>12.01.2017 14:40:33, федя федя.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message21610/topic2434/</link>
			<guid>http://forum.quik.ru/messages/forum10/message21610/topic2434/</guid>
			<pubDate>Thu, 12 Jan 2017 14:40:33 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>стоп завка больше чем в портфеле на лот раз</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message21544/topic2434/">стоп завка больше чем в портфеле на лот раз</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			где уменьшить в стоп заявке на кол лотов . делю как в qpl &nbsp;языке не получается!<br />везде делил!<br />делил в подготовке транзакции. квик ругается. дробное число!<br />где лоты 1 работает. хорошо.<br />и если обмен с биржей по причине интернета или чего много стопов всегда и на купайле &nbsp;и на луа языках! устранимо?<br /><br />function NewStopOrder(size)<br /> &nbsp; T = {}<br /> &nbsp; TRANS_ID = TRANS_ID + 1<br /> &nbsp; T&#91;&quot;TRANS_ID&quot;&#93; &nbsp; &nbsp;= tostring(TRANS_ID)<br /> &nbsp; T&#91;&quot;ACTION&quot;&#93; &nbsp; &nbsp; &nbsp;= &quot;NEW_STOP_ORDER&quot; &nbsp; <br /> &nbsp; T&#91;&quot;CLASSCODE&quot;&#93; &nbsp; = MARKET<br /> &nbsp; T&#91;&quot;SECCODE&quot;&#93; &nbsp; &nbsp; = TICKER<br /> &nbsp; T&#91;&quot;ACCOUNT&quot;&#93; &nbsp; &nbsp; = ACCOUNT<br /> &nbsp; T&#91;&quot;CLIENT_CODE&quot;&#93; = CLIENT_CODE<br /> &nbsp; T = SetStopprice(T)<br /> &nbsp; if BALANCE &gt; 0 then<br /> &nbsp; &nbsp; &nbsp;T&#91;&quot;OPERATION&quot;&#93; = &quot;S&quot;<br /> &nbsp; else<br /> &nbsp; &nbsp; &nbsp;T&#91;&quot;OPERATION&quot;&#93; = &quot;B&quot;<br /> &nbsp; end &nbsp; &nbsp;<br /> &nbsp; T&#91;&quot;QUANTITY&quot;&#93; = tostring(math.abs(size))-- вот здесь теперь не работает.<br /> &nbsp; local trans_reply = SEND_TRANSACTION(30, T)<br /> &nbsp; if trans_reply ~= nil then<br /> &nbsp; &nbsp; &nbsp;if trans_reply.order_num ~= nil then<br /> &nbsp; &nbsp; &nbsp; &nbsp; return trans_reply.order_num<br /> &nbsp; &nbsp; &nbsp;else<br /> &nbsp; &nbsp; &nbsp; &nbsp; message(trans_reply.result_msg)<br /> &nbsp; &nbsp; &nbsp; &nbsp; return 0<br /> &nbsp; &nbsp; &nbsp;end<br /> &nbsp; else<br /> &nbsp; &nbsp; &nbsp;return 0<br /> &nbsp; end<br />end<br /><br />понятно дробное не получится. если это последнее место отправки транзакции то арка ответьте в чем дело. <br />
			<i>09.01.2017 19:03:56, федя федя.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message21544/topic2434/</link>
			<guid>http://forum.quik.ru/messages/forum10/message21544/topic2434/</guid>
			<pubDate>Mon, 09 Jan 2017 19:03:56 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
