<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Форум QUIK [тема: Помогите с ошибкой LUA]</title>
		<link>http://forum.quik.ru</link>
		<description>Новое в теме Помогите с ошибкой LUA форума  на сайте Форум QUIK [forum.quik.ru]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Sun, 03 May 2026 13:59:59 +0300</pubDate>
		<item>
			<title>Помогите с ошибкой LUA</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message8813/topic947/">Помогите с ошибкой LUA</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_R177AHl5" href="/user/21/" bx-tooltip-user-id="21">Michael Bulychev</a> пишет: <br />
====code====
<pre> p_classcode='SPBFUT' 
p_seccode='SiU5' 
svecha=0
&nbsp;&nbsp;</pre>
=============
<br /><br />=============<br />Михаил, спасибо помогло устранить ошибку. <br />
			<i>18.09.2015 17:12:51, dimaz07.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message8813/topic947/</link>
			<guid>http://forum.quik.ru/messages/forum10/message8813/topic947/</guid>
			<pubDate>Fri, 18 Sep 2015 17:12:51 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Помогите с ошибкой LUA</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message8792/topic947/">Помогите с ошибкой LUA</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			====code====
<pre>svecha = cb_open-cb_close
 </pre>
=============
Что-то я не заметил, а где у вас присваиваются значения переменным cb_open и cb_close <br />
			<i>18.09.2015 10:58:33, Дмитрий.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message8792/topic947/</link>
			<guid>http://forum.quik.ru/messages/forum10/message8792/topic947/</guid>
			<pubDate>Fri, 18 Sep 2015 10:58:33 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Помогите с ошибкой LUA</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message8783/topic947/">Помогите с ошибкой LUA</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			====code====
<pre>p_classcode='SPBFUT' 
p_seccode='SiU5' 
svecha=0
 </pre>
============= <br />
			<i>18.09.2015 08:58:45, Michael Bulychev.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message8783/topic947/</link>
			<guid>http://forum.quik.ru/messages/forum10/message8783/topic947/</guid>
			<pubDate>Fri, 18 Sep 2015 08:58:45 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Помогите с ошибкой LUA</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message8782/topic947/">Помогите с ошибкой LUA</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Помогите разобраться с ошибкой. При выполнении скрипта на строчке if svecha&lt;0 then возникает ошибка: attempt to compare number with nil value.<br />Хотя если просто выводить значение в окно или таблицу, показывает правильно и ошибки нет. Возникает ошибка именно при попытке сравнения со значением.<br /><br />Или подскажите какой еще есть способ проверки текущей свечи (не закрытой): белая она или черная.<br />Спасибо!<br /><br />Текст скрипта:<br /><br />p_classcode='SPBFUT' <br />p_seccode='SiU5' <br /><br />is_run = true<br /><br />function cb(index)<br /><br /> &nbsp; &nbsp; &nbsp;local t = ds:T(index)<br /> &nbsp; &nbsp; &nbsp;svc_open = tonumber(ds :o (index))<br /> &nbsp; &nbsp; &nbsp;svc_high = tonumber(ds:H(index))<br /> &nbsp; &nbsp; &nbsp;svc_close = tonumber(ds:C(index))<br /> &nbsp; &nbsp; &nbsp;svc_low = tonumber(ds:L(index))<br /> &nbsp; &nbsp; &nbsp;svecha = cb_open-cb_close<br />end<br /><br /><br />function main()<br /><br /> &nbsp; &nbsp; &nbsp;ds=CreateDataSource(p_classcode, p_seccode, INTERVAL_M5)<br /> &nbsp; &nbsp; &nbsp;ds:SetUpdateCallback(cb)<br /><br /><br /> &nbsp; &nbsp; &nbsp;while is_run do<br />		if svecha&lt;0 then <br />			Telo= "Белая"<br />		else<br />			Telo= "Черная"<br />		end<br />		<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sleep(100)<br /> &nbsp; &nbsp; &nbsp;end<br /><br />end <br />
			<i>18.09.2015 08:52:33, dimaz07.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message8782/topic947/</link>
			<guid>http://forum.quik.ru/messages/forum10/message8782/topic947/</guid>
			<pubDate>Fri, 18 Sep 2015 08:52:33 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
