<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Форум QUIK [тема: Не запускается Lua на Quik]</title>
		<link>http://forum.quik.ru</link>
		<description>Новое в теме Не запускается Lua на Quik форума  на сайте Форум QUIK [forum.quik.ru]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Tue, 28 Apr 2026 18:27:58 +0300</pubDate>
		<item>
			<title>Не запускается Lua на Quik</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message14212/topic1546/">Не запускается Lua на Quik</a></b> <i>Не работает скрипт (сделки на график Квика)</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Шарманка заработала, метки сделок ставит<br />Скрипт не ставил метки поначалу из-за того, что не был прописан идентификатор на график Например, &quot;SiZ5&quot;<br />А затем, забыл вернуть имена картинкам buy.bmp, sell.bmp<br />Во время экспериментов переименовал их в buy2.bmp, sell2.bmp<br />Идентификатор прописал, имена вернул – заработало…<br />Метки ставит, но квадратик в окне запуска скриптов остается красный<br />Возможно это «норма» <br />
			<i>18.03.2016 11:36:59, Petya.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message14212/topic1546/</link>
			<guid>http://forum.quik.ru/messages/forum10/message14212/topic1546/</guid>
			<pubDate>Fri, 18 Mar 2016 11:36:59 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Не запускается Lua на Quik</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message14173/topic1546/">Не запускается Lua на Quik</a></b> <i>Не работает скрипт (сделки на график Квика)</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_6tc7ERGk" href="/user/86/" bx-tooltip-user-id="86">XXM</a> написал:<br />Простенькая рабочая программа.<br />Скачал - запустил.<br />Только надо, чтобы на вашем QUIK был график инструмента из файла trades.csv.<br />И еще малость: присвоить этому графику идентификатор - код тикера.<br />Например, &quot;SiZ5&quot;<br /><br /> <br />=============<br />График инструмента RIH6 в квике есть, в файле trades.csv. этот же тикер<br />присвоил графику идентификатор RIH6 - скрипт начал запускаться, но на 2 сек. метки не появляются даже на это короткое время<br />не каких сообщений по ошибкам не выдает<br />Основной квик стоит 7.1.2.2, думал возможно он лагает, попробовал на квик 6.17 таже история ;-( <br />
			<i>17.03.2016 17:09:14, Petya.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message14173/topic1546/</link>
			<guid>http://forum.quik.ru/messages/forum10/message14173/topic1546/</guid>
			<pubDate>Thu, 17 Mar 2016 17:09:14 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Не запускается Lua на Quik</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message14172/topic1546/">Не запускается Lua на Quik</a></b> <i>Не работает скрипт (сделки на график Квика)</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Нагуглил: <noindex><a href="http://smart-lab.ru/blog/279473.php" target="_blank" rel="nofollow">http://smart-lab.ru/blog/279473.php</a></noindex><br />Вам бы, Петя, там спросить. <br />
			<i>17.03.2016 16:35:12, XXM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message14172/topic1546/</link>
			<guid>http://forum.quik.ru/messages/forum10/message14172/topic1546/</guid>
			<pubDate>Thu, 17 Mar 2016 16:35:12 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Не запускается Lua на Quik</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message14167/topic1546/">Не запускается Lua на Quik</a></b> <i>Не работает скрипт (сделки на график Квика)</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Простенькая рабочая программа.<br />Скачал - запустил.<br />Только надо, чтобы на вашем QUIK был график инструмента из файла trades.csv.<br />И еще малость: присвоить этому графику идентификатор - код тикера.<br />Например, &quot;SiZ5&quot;<br /><br /><img src="https://i.gyazo.com/ed099fd56d2e7fa4ac93484b00bb894e.png" alt="Пользователь добавил изображение" border="0" /> <br />
			<i>17.03.2016 16:11:44, XXM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message14167/topic1546/</link>
			<guid>http://forum.quik.ru/messages/forum10/message14167/topic1546/</guid>
			<pubDate>Thu, 17 Mar 2016 16:11:44 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Не запускается Lua на Quik</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message14103/topic1546/">Не запускается Lua на Quik</a></b> <i>Не работает скрипт (сделки на график Квика)</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_c73E9Cqx" href="/user/82/" bx-tooltip-user-id="82">swerg</a> написал:<br />Какие-то ошибки пишет?<br />=============<br /> &nbsp;Если trades.csv переименовать или убрать из папки, то пишет<br />D:\Test-Lua\LCHI.lua:19: bad argument #1 to 'lines' (D:\Test-Lua\trades.csv: No such file or directory)<br />и оставляет красный квадратик<br />на файлы картинок не реагирует никак<br />Если все файлы на месте и с корректными именами, то никакой реакции на запуск скрипта нет<br />Остается красный квадратик запуска не происходит <br />
			<i>17.03.2016 11:03:35, Petya.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message14103/topic1546/</link>
			<guid>http://forum.quik.ru/messages/forum10/message14103/topic1546/</guid>
			<pubDate>Thu, 17 Mar 2016 11:03:35 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Не запускается Lua на Quik</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message14089/topic1546/">Не запускается Lua на Quik</a></b> <i>Не работает скрипт (сделки на график Квика)</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_MG3MeEEm" href="/user/1757/" bx-tooltip-user-id="1757">Петя Иванов</a> написал:<br />Скрипт стащил отсюда<br />=============<br /><br />Рекомендуем обратиться непосредственно к автору скрипта за решением описанной проблемы <br />
			<i>17.03.2016 07:17:05, Sergey Gorokhov.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message14089/topic1546/</link>
			<guid>http://forum.quik.ru/messages/forum10/message14089/topic1546/</guid>
			<pubDate>Thu, 17 Mar 2016 07:17:05 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Не запускается Lua на Quik</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message14087/topic1546/">Не запускается Lua на Quik</a></b> <i>Не работает скрипт (сделки на график Квика)</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Какие-то ошибки пишет? <br />
			<i>17.03.2016 07:04:42, swerg.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message14087/topic1546/</link>
			<guid>http://forum.quik.ru/messages/forum10/message14087/topic1546/</guid>
			<pubDate>Thu, 17 Mar 2016 07:04:42 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Не запускается Lua на Quik</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message14085/topic1546/">Не запускается Lua на Quik</a></b> <i>Не работает скрипт (сделки на график Квика)</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Здравствуйте<br />Помогите разобраться, почему не работает скрипт<br />(это для нанесения сделок на график Квика)<br />При запуске горит красный квадратик и дальше некуда<br />Картинки buy.bmp, sell.bmp и файл trades.csv находятся в папке со скриптом &nbsp;<br />---<br /> &nbsp; <noindex><a href="https://www.dropbox.com/s/q4wj7d7pb9jhcnl/LCHI.zip?dl=0" target="_blank" rel="nofollow">Скрипт стащил отсюда</a></noindex><br />----------------------<br /><br />function main()<br /><br /> &nbsp; &nbsp;local iif = function( cond, ifTrue, ifFalse )<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;if( cond ) then return ifTrue; end<br /> &nbsp; &nbsp; &nbsp; &nbsp;return ifFalse;<br /> &nbsp; &nbsp;end<br /><br /> &nbsp; &nbsp;local trades = {};<br /> &nbsp; &nbsp;local charts = {};<br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;local path = getScriptPath() .. &quot;\\&quot;;<br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;local IMAGE_BUY = path .. &quot;buy.bmp&quot;;<br /> &nbsp; &nbsp;local IMAGE_SELL = path .. &quot;sell.bmp&quot;;<br /><br /><br /> &nbsp; &nbsp;-- заполняем таблицу сделок<br /> &nbsp; &nbsp;for line in io.lines( path .. &quot;trades.csv&quot; ) do<br /> &nbsp; &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp;local isNewTrade = true;<br /> &nbsp; &nbsp; &nbsp; &nbsp;local row = {};<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;for column in string.gmatch( line, &quot;(&#91;^;&#93;+)&quot; ) do<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;table.insert( row, column );<br /> &nbsp; &nbsp; &nbsp; &nbsp;end<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local trade =<br /> &nbsp; &nbsp; &nbsp; &nbsp;{<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;timestamp = row&#91; 1 &#93;,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ticker = row&#91; 2 &#93;,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lots = tonumber( row&#91; 3 &#93; ),<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;price = tonumber( row&#91; 4 &#93; ),<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;date = string.gsub( string.match( row&#91; 1 &#93;, &quot;(%d+-%d+-%d+)&quot; ), &quot;-&quot;, &quot;&quot; ),<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;time = string.gsub( string.match( row&#91; 1 &#93;, &quot;(%d+:%d+:%d+)&quot; ), &quot;:&quot;, &quot;&quot; )<br /> &nbsp; &nbsp; &nbsp; &nbsp;};<br /> &nbsp; &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp;-- суммируем лоты сделок одного инструмента в один момент времени (минута) по одинаковой цене, чтобы не заграмождать график<br /> &nbsp; &nbsp; &nbsp; &nbsp;for _, t in pairs( trades ) do<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if t.ticker == trade.ticker and t.timestamp == trade.timestamp and t.price == trade.price then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;t.lots = t.lots + trade.lots;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;isNewTrade = false;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end<br /> &nbsp; &nbsp; &nbsp; &nbsp;end<br /> &nbsp; &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp;if ( isNewTrade ) then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- запоминаем тикеры графиков, для последующий очистки<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;charts&#91; trade.ticker &#93; = true;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;table.insert( trades, trade );<br /> &nbsp; &nbsp; &nbsp; &nbsp;end<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /> &nbsp; &nbsp;end<br /> &nbsp; &nbsp;<br /><br /> &nbsp; &nbsp;if( table.maxn( trades ) &lt; 1 ) then<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;return;<br /> &nbsp; &nbsp;end<br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;-- удаляем все предыдущие метки с используемых графиков<br /> &nbsp; &nbsp;for chart, _ in pairs( charts ) do<br /> &nbsp; &nbsp; &nbsp; <br /> &nbsp; &nbsp; &nbsp; &nbsp;DelAllLabels( chart );<br /> &nbsp; &nbsp;end<br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;-- добавляем метки по таблице сделок<br /> &nbsp; &nbsp;for _, t in pairs( trades ) do<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local label = <br /> &nbsp; &nbsp; &nbsp; &nbsp;{<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- параметры текста метки - отрисовываются со смещением от точки сделки :-( <br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--TEXT = iif( t.lots &gt; 0, &quot;5&quot;, &quot;6&quot; ), &nbsp; &nbsp;-- в шрифте &quot;Webdings&quot; это значки треугольников<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FONT_FACE_NAME = &quot;Webdings&quot;,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FONT_HEIGHT = 25,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;R = iif( t.lots &gt; 0, 0, 255 ),<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;G = iif( t.lots &gt; 0, 255, 0 ),<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;B = 0,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- параметры картинки<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IMAGE_PATH = iif( t.lots &gt; 0, IMAGE_BUY, IMAGE_SELL ), <br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ALIGNMENT = iif( t.lots &gt; 0, &quot;BOTTOM&quot;, &quot;TOP&quot; ),<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSPARENCY = 0,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRANSPARENT_BACKGROUND = 1,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- парамтеры координат<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;YVALUE = t.price,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DATE = t.date,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TIME = t.time,<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- всплывающая подсказка<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HINT = tostring( t.lots ) .. &quot; @ &quot; .. tostring( t.price )<br /> &nbsp; &nbsp; &nbsp; &nbsp;};<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local labelId = AddLabel( t.ticker, label );<br /><br /> &nbsp; &nbsp;end<br />end <br />
			<i>17.03.2016 06:28:18, Петя Иванов.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message14085/topic1546/</link>
			<guid>http://forum.quik.ru/messages/forum10/message14085/topic1546/</guid>
			<pubDate>Thu, 17 Mar 2016 06:28:18 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
