<?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>Wed, 08 Apr 2026 07:43:03 +0300</pubDate>
		<item>
			<title>Индикатор уровней совпадения цен</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message46212/topic5458/">Индикатор уровней совпадения цен</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			например:<br /><img src="https://d.radikal.ru/d13/2006/84/69ef602921bd.png" alt="Пользователь добавил изображение" border="0" /> <br />
			<i>13.06.2020 14:47:48, nikolz.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message46212/topic5458/</link>
			<guid>http://forum.quik.ru/messages/forum10/message46212/topic5458/</guid>
			<pubDate>Sat, 13 Jun 2020 14:47:48 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор уровней совпадения цен</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message46211/topic5458/">Индикатор уровней совпадения цен</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			тип &quot;4&quot; <br />
			<i>13.06.2020 14:41:51, nikolz.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message46211/topic5458/</link>
			<guid>http://forum.quik.ru/messages/forum10/message46211/topic5458/</guid>
			<pubDate>Sat, 13 Jun 2020 14:41:51 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор уровней совпадения цен</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message45350/topic5458/">Индикатор уровней совпадения цен</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Здравствуйте,<br /><br />При типе графика "линия" рисуется непрерывная линия. а в местах где нет значений она не прерывается, просто рисуется до следующей точки.<br />Варианта два:<br />Укажите тип графика - точка, тогда будете видеть точки там где они действительно есть<br />рисуйте несколько разных линий. <br />
			<i>21.05.2020 13:24:34, Sergey Gorokhov.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message45350/topic5458/</link>
			<guid>http://forum.quik.ru/messages/forum10/message45350/topic5458/</guid>
			<pubDate>Thu, 21 May 2020 13:24:34 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор уровней совпадения цен</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message45349/topic5458/">Индикатор уровней совпадения цен</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Добрый день. Создаю индикатор, он рисует линию только тогда, когда в заданном периоде (Period) есть определенное число совпадений (Sovpadeniya) Hi или Low свеч. Вопрос. Как чертить линии не от начала периода и до конца графика, а только в промежутке, от первого совпадения до Sovpadeniya. Думаю вопрос понятен. Прилагаю код и скриншот. Подозреваю, что нужно как то создать массив в массиве, но не могу до этого додуматься.<br />Settings =<br />{<br />	Name = &quot;*Sovpadeniya_cen_po_Hi_i_Low&quot;,<br />	Sovpadeniya = 3,<br />	Period = 150<br />}<br /><br />function Init()<br />--объявляем нужные переменные<br /> &nbsp; &nbsp; arr1={}<br /> &nbsp; &nbsp; schetchik_1=0<br /> &nbsp; &nbsp; skolko_lin=0 --эта переменная нужна для: 1) подсчета линий (передачи их в функцию Init); 2) определения &nbsp; &nbsp; &nbsp; &nbsp;количества элементов в массиве<br /><br />--вызываем функцию - один раз перед загрузкой<br /> &nbsp; &nbsp; OSN_1()<br /> &nbsp; &nbsp; if skolko_lin&gt;0 then --если совпадений не будет, то вернуть 1 линию, а то вернет 0 и выскочит ошибка<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return skolko_lin<br /> &nbsp; &nbsp; else<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return 1<br /> &nbsp; &nbsp; end<br />end<br /><br />function OSN_1()<br /> &nbsp; &nbsp; n_bars = getNumCandles(&#39;SBER_5_MINUT&#39;)<br /> &nbsp; &nbsp; moy_grafik, NUMBER, STRING &nbsp;= getCandlesByIndex (&#39;SBER_5_MINUT&#39;, 0, 0, n_bars)<br />--&#91;&#91;все, нужный график определили, теперь ищем количество нужных совпадений, если они найдутся - <br />запоминаем их цену в массив. Ищем не во всем графике, а на определенном периоде, указанном в Settings:&#93;&#93;<br /><br /> &nbsp; &nbsp; for i = (n_bars-Settings.Period), n_bars-Settings.Sovpadeniya-1 do<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;schetchik_1=0 --каждый раз обнуляем счетчик	<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for n = (i+1), (n_bars-1) do<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if moy_grafik&#91;i&#93;.high == moy_grafik&#91;n&#93;.high or moy_grafik&#91;i&#93;.high == moy_grafik&#91;n&#93;.low then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;schetchik_1=schetchik_1+1 -- если есть совпадения - то считаем их количество	<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --&#91;&#91;если нашли количество нужных совпадений набралось - запоминаем значение цены в массив и &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; выходим из цикла, дальше нет смысла искать:&#93;&#93;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if schetchik_1 == Settings.Sovpadeniya then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;skolko_lin = skolko_lin + 1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;arr1&#91;skolko_lin&#93;=moy_grafik&#91;i&#93;.high<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end		<br /> &nbsp; &nbsp; end<br />end<br /><br />function OnCalculate(index)	<br /> &nbsp; &nbsp; if index-1 &lt; (Size()-(Settings.Period)-1) then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return nil<br /> &nbsp; &nbsp; else<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return unpack(arr1) <br /> &nbsp; &nbsp; end<br />end <br />
			<img src="https://forum.quik.ru/bitrix/components/bitrix/forum.interface/show_file.php?fid=6652&" width="1111" height="543" /><br /><i>21.05.2020 13:13:37, Айдар.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message45349/topic5458/</link>
			<guid>http://forum.quik.ru/messages/forum10/message45349/topic5458/</guid>
			<pubDate>Thu, 21 May 2020 13:13:37 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
