<?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>Sat, 04 Apr 2026 12:45:43 +0300</pubDate>
		<item>
			<title>Ошибка при выставлении заявки и стоп-заявки</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message47057/topic5662/">Ошибка при выставлении заявки и стоп-заявки</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<a class="blog-p-user-name" id="bp_ttgbukTn" href="/user/14129/" bx-tooltip-user-id="14129">Михаил</a>, <br />такой функции tostringEX не существует, значит Вы ее не добавили <br />
			<i>16.07.2020 11:22:42, Sergey Gorokhov.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message47057/topic5662/</link>
			<guid>http://forum.quik.ru/messages/forum10/message47057/topic5662/</guid>
			<pubDate>Thu, 16 Jul 2020 11:22:42 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Ошибка при выставлении заявки и стоп-заявки</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message47056/topic5662/">Ошибка при выставлении заявки и стоп-заявки</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_8MwihdgI" href="/user/17/" bx-tooltip-user-id="17">Sergey Gorokhov</a> написал:<br /> <br />====quote====<br /><noindex><a href="/user/14129/" target="_blank" rel="nofollow">Михаил</a></noindex> написал:<br />Не нашел ничего по своим ошибкам<br />=============<br /> <br />А это?,<br /> &nbsp; <br />=============<br />(&#39; expected near &#39;tostringEX&#39; с этим кодом выдает такую ошибку <br />
			<i>16.07.2020 11:00:31, Михаил.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message47056/topic5662/</link>
			<guid>http://forum.quik.ru/messages/forum10/message47056/topic5662/</guid>
			<pubDate>Thu, 16 Jul 2020 11:00:31 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Ошибка при выставлении заявки и стоп-заявки</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message47052/topic5662/">Ошибка при выставлении заявки и стоп-заявки</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_WY5avIu9" href="/user/14129/" bx-tooltip-user-id="14129">Михаил</a> написал:<br />Не нашел ничего по своим ошибкам<br /><br />=============<br /><br />А это?,<br />[FILE ID=6760] <br />
			<img src="https://forum.quik.ru/bitrix/components/bitrix/forum.interface/show_file.php?fid=6760&" width="960" height="149" /><br /><i>16.07.2020 10:45:35, Sergey Gorokhov.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message47052/topic5662/</link>
			<guid>http://forum.quik.ru/messages/forum10/message47052/topic5662/</guid>
			<pubDate>Thu, 16 Jul 2020 10:45:35 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Ошибка при выставлении заявки и стоп-заявки</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message47051/topic5662/">Ошибка при выставлении заявки и стоп-заявки</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_EH7zZgqb" href="/user/17/" bx-tooltip-user-id="17">Sergey Gorokhov</a> написал:<br /> <br />====quote====<br /><noindex><a href="/user/14129/" target="_blank" rel="nofollow">Михаил</a></noindex> написал:<br />Число не может содержать знак разделителя дробной части<br />=============<br /> тут все написано: &nbsp;<noindex><a href="https://forum.quik.ru/forum10/topic5119/" target="_blank" rel="nofollow">https://forum.quik.ru/forum10/topic5119/</a></noindex> <br />=============<br />Не нашел ничего по своим ошибкам <br />
			<i>16.07.2020 10:43:42, Михаил.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message47051/topic5662/</link>
			<guid>http://forum.quik.ru/messages/forum10/message47051/topic5662/</guid>
			<pubDate>Thu, 16 Jul 2020 10:43:42 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Ошибка при выставлении заявки и стоп-заявки</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message47050/topic5662/">Ошибка при выставлении заявки и стоп-заявки</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_sYeuV1X2" href="/user/14129/" bx-tooltip-user-id="14129">Михаил</a> написал:<br />Число не может содержать знак разделителя дробной части<br />=============<br />тут все написано: <noindex><a href="https://forum.quik.ru/forum10/topic5119/" target="_blank" rel="nofollow">https://forum.quik.ru/forum10/topic5119/</a></noindex> <br />
			<i>16.07.2020 10:22:48, Sergey Gorokhov.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message47050/topic5662/</link>
			<guid>http://forum.quik.ru/messages/forum10/message47050/topic5662/</guid>
			<pubDate>Thu, 16 Jul 2020 10:22:48 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Ошибка при выставлении заявки и стоп-заявки</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message47049/topic5662/">Ошибка при выставлении заявки и стоп-заявки</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Функция ProfitControl Отклик транзакции = &nbsp;Неправильно указана стоп-цена: &quot;-50.0&quot;CLASSCODE=SPBFUT; ACCOUNT=SPBFUT000a3; TRANS_ID=1234567; OFFSET=0; SPREAD=30.0; ACTION=NEW_STOP_ORDER; SECCODE=SiU0; STOPPRICE=-50.0; EXPIRY_DATE=TODAY; OFFSET_UNITS=PRICE_UNITS; QUANTITY=1; OPERATION=B; CLIENT_CODE=РОБОТ; STOP_ORDER_KIND=TAKE_PROFIT_STOP_ORDER; SPREAD_UNITS=PRICE_UNITS;<br /><br />function ProfitControl(posNow,acc,emit,class,file)<br /> &nbsp; local function fn1(param1,param2,param3)<br /> &nbsp; &nbsp; &nbsp;if(param1==acc and param2==emit and param2==class)then<br /> &nbsp; &nbsp; &nbsp; &nbsp; return true<br /> &nbsp; &nbsp; &nbsp;else<br /> &nbsp; &nbsp; &nbsp; &nbsp; return false<br /> &nbsp; &nbsp; &nbsp;end<br /> &nbsp; end<br /> &nbsp; local step = tonumber(getParamEx(class,emit,&quot;SEC_PRICE_STEP&quot;).param_value)<br /> &nbsp; local EnterPrice = RoundForStep(EnterPriceUni(posNow,emit,class,acc),step)<br /> &nbsp; local profitPrice = EnterPrice + SignFunc(posNow) * Profit * step<br /> &nbsp; local ProfCorrect = false &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--Нашли или нет нужный профит<br /> &nbsp; local count = 0<br /> &nbsp; local index = SearchItems(&quot;stop_orders&quot;,0,getNumberOf(&quot;stop_orders&quot;)-1, fn1, &quot;account,sec_code,class_code&quot;)<br /> &nbsp; if(index~=nil)then<br /> &nbsp; &nbsp; &nbsp;for i=1,#index do<br /> &nbsp; &nbsp; &nbsp; &nbsp; local row = getItem(&quot;stop_orders&quot;,index&#91;i&#93;)<br /> &nbsp; &nbsp; &nbsp; &nbsp; local flag = bit.band(row.flags,1) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--Активная заявка или нет<br /> &nbsp; &nbsp; &nbsp; &nbsp; if(flag&gt;0)then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(row.stop_order_type~=6 or ProfCorrect==true)then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local keyNumber = row.order_num<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DeleteProfitByNumber(emit,class,keyNumber,file)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count = count + 1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local qtyX = row.qty <br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local profitPriceX = row.condition_price &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local buySellX = row.condition<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local signPosX = 0<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(buySellX==4)then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;signPosX = -1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elseif(buySellX==5)then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;signPosX = 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(signPosX==Sign_func(posNow) and qtyX==math.abs(posNow) and profitPriceX==profitPrice)then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ProfCorrect = true<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;local keyNumber = row.order_num<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DeleteProfitByNumber(emit,class,keyNumber,file)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;count = count + 1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end<br /> &nbsp; &nbsp; &nbsp; &nbsp; end<br /> &nbsp; &nbsp; &nbsp;end<br /> &nbsp; end<br /> &nbsp; if(ProfCorrect==false and posNow~=0)then<br /> &nbsp; &nbsp; &nbsp;local profitSpread = 30 * step<br /> &nbsp; &nbsp; &nbsp;if(posNow&gt;0)then<br /> &nbsp; &nbsp; &nbsp; &nbsp; buySell = &quot;S&quot;<br /> &nbsp; &nbsp; &nbsp;else<br /> &nbsp; &nbsp; &nbsp; &nbsp; buySell = &quot;B&quot;<br /> &nbsp; &nbsp; &nbsp;end<br /> &nbsp; &nbsp; &nbsp;NewStopProfit(acc,emit,class,buySell,math.abs(posNow),profitPrice,0,profitSpread,file,&quot;Функция ProfitControl &quot;)<br /> &nbsp; &nbsp; &nbsp;count = count + 1<br /> &nbsp; end<br /> &nbsp; return count<br />end<br /><br /><br />Число не может содержать знак разделителя дробной части; Pos= -1; SECCODE=SiU0; QUANTITY=1; PRICE=71750.0; TYPE=L; OPERATION=B; CLIENT_CODE=РОБОТ; TRANS_ID=123456; ACCOUNT=SPBFUT000a3; CLASSCODE=SPBFUT; ACTION=NEW_ORDER; <br /><br />function NewStopProfit(acc,emit,class,buySell,qty,stopPrice,profitOtstup,profitSpread,file,prevString)<br /> &nbsp; transaction = {&#91;&quot;ACCOUNT&quot;&#93;=acc,&#91;&quot;CLASSCODE&quot;&#93;=class,&#91;&quot;SECCODE&quot;&#93;=emit,<br /> &nbsp; &#91;&quot;ACTION&quot;&#93;=&quot;NEW_STOP_ORDER&quot;,<br /> &nbsp; &#91;&quot;STOP_ORDER_KIND&quot;&#93;=&quot;TAKE_PROFIT_STOP_ORDER&quot;,<br /> &nbsp; &#91;&quot;TRANS_ID&quot;&#93;=&quot;1234567&quot;,<br /> &nbsp; &#91;&quot;CLIENT_CODE&quot;&#93;=&quot;РОБОТ&quot;,<br /> &nbsp; &#91;&quot;EXPIRY_DATE&quot;&#93;=&quot;TODAY&quot;, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--&quot;GTC&quot; тип заявки до отмены, доступна только в основной версии квика<br /> &nbsp; &#91;&quot;OPERATION&quot;&#93;=buySell,<br /> &nbsp; &#91;&quot;QUANTITY&quot;&#93;=tostring(qty),<br /> &nbsp; &#91;&quot;STOPPRICE&quot;&#93;=tostring(stopPrice),<br /> &nbsp; &#91;&quot;OFFSET_UNITS&quot;&#93;=&quot;PRICE_UNITS&quot;,<br /> &nbsp; &#91;&quot;SPREAD_UNITS&quot;&#93;=&quot;PRICE_UNITS&quot;,<br /> &nbsp; &#91;&quot;OFFSET&quot;&#93;=tostring(profitOtstup),<br /> &nbsp; &#91;&quot;SPREAD&quot;&#93;=tostring(profitSpread)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /> &nbsp; local result = sendTransaction(transaction)<br /> &nbsp; local sDataString = &quot;&quot;<br /> &nbsp; if(file~=nil or file ~=&quot;&quot;)then<br /> &nbsp; &nbsp; &nbsp; sDataString = &quot;Отклик транзакции = &quot;..result<br /> &nbsp; end<br /> &nbsp; for key,val in pairs(transaction) do<br /> &nbsp; &nbsp; &nbsp;sDataString = sDataString..key..&quot;=&quot;..val..&quot;; &quot;<br /> &nbsp; end<br /> &nbsp; if(prevString~=nil)then<br /> &nbsp; &nbsp; &nbsp;sDataString = prevString..sDataString<br /> &nbsp; end<br /> &nbsp; WriteToEndOfFile(file,sDataString)<br /> &nbsp; return 1<br />end<br /><br />Помогите пожалуйста, не могу понять что ему не нравится, версия квика 8.7.1.3 <br />
			<i>16.07.2020 10:20:38, Михаил.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message47049/topic5662/</link>
			<guid>http://forum.quik.ru/messages/forum10/message47049/topic5662/</guid>
			<pubDate>Thu, 16 Jul 2020 10:20:38 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
