<?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, 11 Apr 2026 00:47:16 +0300</pubDate>
		<item>
			<title>Помогите пожалуйста доделать робота</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message13663/topic1489/">Помогите пожалуйста доделать робота</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Здравствуйте, Андрей!<br /><br />У вас код, действительно, непрофессионален.<br />Надо переделывать и кое-чего дописывать.<br />Николай любит поюморить, но ничего.<br />Но это не может быть бесплатным, потомучто многое из чего мы (более опытные) узнали проводя эксперименты на реальном счёте.<br />Поэтому пишите в личном плане сколько Вы согласны заплатить за это знание и опыт, можете не на форуме, а обменом почтовыми сообщениями на этом же форуме. <br />
			<i>04.03.2016 17:01:25, Фёдор Сухов.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message13663/topic1489/</link>
			<guid>http://forum.quik.ru/messages/forum10/message13663/topic1489/</guid>
			<pubDate>Fri, 04 Mar 2016 17:01:25 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Помогите пожалуйста доделать робота</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message13636/topic1489/">Помогите пожалуйста доделать робота</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			напоминает ракету из фанеры.<br />Вопрос конструктору:<br /> &nbsp;Не уже думаете за неделю долетите до луны?<br />Ответ <br />Да что до луны, Луна - это начало, скоро на марс, а там и юпитер.<br />Да мала ли что мы можем сделать ежели нас никто не остановит.<br />Даже некогда как следует почитать труды Цандера и Циолковского или , <br />не побоюсь этого слова, коллеги Королева. <br />
			<i>04.03.2016 14:07:41, Николай  Камынин.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message13636/topic1489/</link>
			<guid>http://forum.quik.ru/messages/forum10/message13636/topic1489/</guid>
			<pubDate>Fri, 04 Mar 2016 14:07:41 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Помогите пожалуйста доделать робота</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message13601/topic1489/">Помогите пожалуйста доделать робота</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			есть условие входа в позицю и есть отдельно тейк и стоп,когда складую вместе сразу после запуска виставляються лимитки,как зделать так чтоб лимитки виставлялись после входа в позицю?Заранее благодарен <br />Вот скрипти<br />run = true<br />function main()<br /> while run do<br />PriceStep = getParamEx('SPBFUT', 'RIH6' , 'SEC_PRICE_STEP').param_value<br />Price = getParamEx('SPBFUT', 'RIH6', 'LAST').param_value<br />PriceB = Price + 50 * PriceStep --маркет цена покупки &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp;local N1=getNumCandles(&quot;Price&quot;)<br /><br /> &nbsp; &nbsp; &nbsp;local N2=getNumCandles(&quot;MyPrice&quot;)<br /><br /> &nbsp; &nbsp; &nbsp;t1,n1,i1=getCandlesByIndex(&quot;Price&quot;, 0, N1-3, 2)<br /><br /> &nbsp; &nbsp; &nbsp;t2,n2,i2=getCandlesByIndex(&quot;MyPrice&quot;, 0, N2-3, 2)<br /> &nbsp; &nbsp; --сигнал на покупку (первый мувинг пересекает второй снизу вверх<br /><br /> &nbsp; &nbsp; &nbsp;if t1&#91;0&#93;.close&lt;t2&#91;0&#93;.close and t1&#91;1&#93;.close&gt;t2&#91;1&#93;.close then<br />Open('SPBFUT', 'RIH6',PriceB , 1, 'B')<br /> &nbsp; end<br /> &nbsp; &nbsp; &nbsp;sleep(500)<br /> &nbsp; end<br />end<br /><br />function OnStop()<br /> &nbsp; run = false<br />end<br /><br /> <br />function Open(class_code, sec_code, price, qty, operation)<br /> &nbsp; &nbsp;<br /> &nbsp; local Transaction={<br /> &nbsp; &nbsp; &nbsp;&#91;'TRANS_ID'&#93; &nbsp; = &nbsp;&quot;1&quot;,<br /> &nbsp; &nbsp; &nbsp;&#91;'ACTION'&#93; &nbsp; &nbsp; = 'NEW_ORDER',<br /> &nbsp; &nbsp; &nbsp;&#91;'CLASSCODE'&#93; &nbsp;= tostring(class_code),<br /> &nbsp; &nbsp; &nbsp;&#91;'SECCODE'&#93; &nbsp; &nbsp;= tostring(sec_code), &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp;&#91;'PRICE'&#93; &nbsp; &nbsp; &nbsp;= tostring(price),<br /> &nbsp; &nbsp; &nbsp;&#91;'QUANTITY'&#93; &nbsp; = tostring(qty),<br /> &nbsp; &nbsp; &nbsp;&#91;'OPERATION'&#93; &nbsp;= operation,<br /> &nbsp; &nbsp; &nbsp;&#91;'TYPE'&#93; &nbsp; &nbsp; &nbsp; = 'L',<br /> &nbsp; &nbsp; &nbsp;&#91;'QUANTITY'&#93; &nbsp; = tostring(qty),<br /> &nbsp; &nbsp; &nbsp;&#91;'ACCOUNT'&#93; &nbsp; &nbsp;= 'SPBFUT011Ib &nbsp;'<br /> &nbsp; }<br /> &nbsp; <br /> &nbsp; local res = sendTransaction(Transaction)<br /> &nbsp; if res ~= '' then message('Ошибка отправки транзакции: '..res) end<br />end &nbsp; <br /><br /><br />И второй <br />PriceStep = getParamEx('SPBFUT', 'RIH6' , 'SEC_PRICE_STEP').param_value<br />Price = getParamEx('SPBFUT', 'RIH6', 'LAST').param_value<br />PriceT = Price * 1+200 --маркет цена продажи<br />SEC_PRICE_STEP = getParamEx('SPBFUT', 'RIH6' , 'SEC_PRICE_STEP').param_value <br />STOP_LOSS=1; <br />TAKE_PROFIT=3; <br />stopprice= tostring(Price - TAKE_PROFIT*SEC_PRICE_STEP); <br />stopprice2= tostring(Price + STOP_LOSS*SEC_PRICE_STEP);<br />if operation(S) then send <br /> local Transaction = { <br />&#91;&quot;ACTION&quot;&#93; = &quot;NEW_STOP_ORDER&quot;, -- Тип заявки <br />&#91;&quot;TRANS_ID&quot;&#93; = &quot;2&quot;, <br />&#91;&quot;CLASSCODE&quot;&#93;=&quot;SPBFUT&quot;, <br />&#91;&quot;SECCODE&quot;&#93;=&quot;RIH6&quot;, <br />&#91;&quot;ACCOUNT&quot;&#93;=&quot;SPBFUT011Ib&quot;, <br />&#91;&quot;OPERATION&quot;&#93;=&quot;B&quot;, <br />&#91;&quot;QUANTITY&quot;&#93;= &quot;1&quot;, <br />&#91;&quot;PRICE&quot;&#93;= tostring(PriceT), <br />&#91;&quot;STOPPRICE&quot;&#93; = tostring(stopprice), -- Цена Тэйк-Профита <br />&#91;&quot;STOP_ORDER_KIND&quot;&#93;= &quot;TAKE_PROFIT_AND_STOP_LIMIT_ORDER&quot;, -- Тип стоп-заявки <br />&#91;&quot;EXPIRY_DATE&quot;&#93;= &quot;TODAY&quot;, <br />&#91;&quot;OFFSET&quot;&#93; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= tostring(2*SEC_PRICE_STEP),<br />&#91;&quot;OFFSET_UNITS&quot;&#93; &nbsp; &nbsp; &nbsp; &nbsp;= &quot;PRICE_UNITS&quot;,<br />&#91;&quot;SPREAD&quot;&#93;= &quot;30&quot;,<br />&#91;&quot;SPREAD_UNITS&quot;&#93; &nbsp; &nbsp; &nbsp; &nbsp;= &quot;PRICE_UNITS&quot;, <br />&#91;&quot;STOPPRICE2&quot;&#93;= tostring(stopprice2), -- Цена Стоп-Лосса <br />&#91;&quot;IS_ACTIVE_IN_TIME&quot;&#93;= &quot;NO&quot; <br />} <br />res = sendTransaction(Transaction);<br />end<br /><br />message('Выставление тейк-стоп: '..res,2)<br /> &nbsp; <br />
			<i>04.03.2016 00:05:23, Андрей Мурга.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message13601/topic1489/</link>
			<guid>http://forum.quik.ru/messages/forum10/message13601/topic1489/</guid>
			<pubDate>Fri, 04 Mar 2016 00:05:23 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
