<?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>Fri, 01 May 2026 21:29:23 +0300</pubDate>
		<item>
			<title>Перевод каретки на Луа</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message24590/topic2795/">Перевод каретки на Луа</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Спасибо, Владимир!<br />Вы делаете доброе дело, что помогаете новичкам типа меня :) <br />
			<i>14.05.2017 15:15:47, Let_it_go.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message24590/topic2795/</link>
			<guid>http://forum.quik.ru/messages/forum10/message24590/topic2795/</guid>
			<pubDate>Sun, 14 May 2017 15:15:47 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Перевод каретки на Луа</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message24589/topic2795/">Перевод каретки на Луа</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_U8MTIAxm" href="/user/3905/" bx-tooltip-user-id="3905">Let_it_go</a> написал: &nbsp; &nbsp; &nbsp;
====code====
<pre>&nbsp;&nbsp;cf=io.open(file_path,"a+")
&nbsp;&nbsp;cf:write(value)</pre>
=============
<br />=============<br /> 
====code====
<pre> cf=io.open(file_path,"a")
&nbsp;&nbsp;cf:write(value ..'&#92;n')</pre>
============= <br />
			<i>14.05.2017 14:54:21, Владимир Киселев.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message24589/topic2795/</link>
			<guid>http://forum.quik.ru/messages/forum10/message24589/topic2795/</guid>
			<pubDate>Sun, 14 May 2017 14:54:21 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Перевод каретки на Луа</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message24588/topic2795/">Перевод каретки на Луа</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			вопрос решился<br /> &nbsp; &nbsp; &nbsp; &nbsp;write_end (path, day..month..dt.year..&quot; &quot;..typical_synt..&quot;\n&quot;) <br />
			<i>14.05.2017 14:52:41, Let_it_go.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message24588/topic2795/</link>
			<guid>http://forum.quik.ru/messages/forum10/message24588/topic2795/</guid>
			<pubDate>Sun, 14 May 2017 14:52:41 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Перевод каретки на Луа</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message24584/topic2795/">Перевод каретки на Луа</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Добрый день.<br />прошу подсказать, как делать перевод каретки на Луа.<br />чтобы новое значение дозаписывалось в файл с новой строки.<br />Это требуется для этого кода<br />
====code====
<pre>path="C:&#92;&#92;sintetika.lua"
function write_end(file_path,value)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cf=io.open(file_path,"a+")
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cf:write(value)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cf:flush()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cf:close()
end

function main ()
chart1="1"
price1 = getNumCandles (chart1)
chart2="2"
price2 = getNumCandles (chart2)
&nbsp;&nbsp;&nbsp;&nbsp;for i=100,1,-1 do
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local price_tab1=getCandlesByIndex(chart1,0,price1-i,1)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local high1=price_tab1&#91;0&#93;.high
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local low1=price_tab1&#91;0&#93;.low&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local last1=price_tab1&#91;0&#93;.close
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local typical1=(high1+low1+last1)/3
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local price_tab2=getCandlesByIndex(chart2,0,price2-i,1)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local high2=price_tab2&#91;0&#93;.high
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local low2=price_tab2&#91;0&#93;.low&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local last2=price_tab2&#91;0&#93;.close
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local typical2=(high2+low2+last2)/3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local typical_synt=typical1/typical2
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message (typical_synt.."",1)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write_end (path, typical_synt.." ")
&nbsp;&nbsp;&nbsp;&nbsp;end
end</pre>
============= <br />
			<i>14.05.2017 13:57:02, Let_it_go.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message24584/topic2795/</link>
			<guid>http://forum.quik.ru/messages/forum10/message24584/topic2795/</guid>
			<pubDate>Sun, 14 May 2017 13:57:02 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
