<?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>Tue, 21 Apr 2026 10:00:02 +0300</pubDate>
		<item>
			<title>Индикатор с метками</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum17/message80628/topic9402/">Индикатор с метками</a></b> в форуме <a href="http://forum.quik.ru/forum17/">Обмен опытом</a>. <br />
			====code====
<pre>Settings={ Name = "*nk_test", tag ="Metka"&nbsp;&nbsp;}

params={R = 255, G = 255, B = 255, TRANSPARENCY = 0,FONT_HEIGHT = 10,TRANSPARENT_BACKGROUND = 1, FONT_FACE_NAME = 'Verdana' }

function OnCalculate(i)
&nbsp;&nbsp; if i==1 then
&nbsp;&nbsp; OnChangeSettings()
&nbsp;&nbsp;&nbsp;elseif i== Size() then&nbsp;&nbsp;&nbsp;&nbsp;-- последняя свеча
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if os.time() &#62; LastSecond&nbsp;&nbsp;then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- раз в секунду (или больше)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LastSecond = os.time();&nbsp;&nbsp;&nbsp;&nbsp;-- потиковое обновление (с задержкой)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DelAllLabels(Settings.tag);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;params.TEXT =tostring(C(i))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;params.HINT = tostring(i)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local h=0&nbsp;&nbsp; local&nbsp;&nbsp;m=i;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while 14&#62;i-m&nbsp;&nbsp;do if H(m) &#62; h then h=H(m) end;m=m-1;&nbsp;&nbsp;&nbsp;end
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local Ti=T(i-3)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;params.DATE=100*(100*Ti.year+Ti.month)+Ti.day;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;params.TIME=100*(100*Ti.hour+Ti.min)+Ti.sec;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;params.YVALUE =h;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Label= AddLabel(Settings.tag, params)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end -- every second
&nbsp;&nbsp;&nbsp;&nbsp;end
end

function OnChangeSettings()
sec = getDataSourceInfo().sec_code; 
DelAllLabels(Settings.tag);
LastSecond=0&nbsp;&nbsp;end
function OnDestroy() OnChangeSettings() end
function Init()&nbsp;&nbsp;return 1 end
</pre>
============= <br />
			<i>23.12.2025 11:19:21, nikolz.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum17/message80628/topic9402/</link>
			<guid>http://forum.quik.ru/messages/forum17/message80628/topic9402/</guid>
			<pubDate>Tue, 23 Dec 2025 11:19:21 +0300</pubDate>
			<category>Обмен опытом</category>
		</item>
		<item>
			<title>Индикатор с метками</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum17/message80620/topic9402/">Индикатор с метками</a></b> в форуме <a href="http://forum.quik.ru/forum17/">Обмен опытом</a>. <br />
			По просьбе трудящихся, написал Пример ПРАВИЛЬНОГО индикатора, который &nbsp;через секунду удаляет ранее выставленную метку и выводит новую.<br />--------------------------------<br />Пользуйтесь на здоровье.<br />----------------------------<br /><br /><table class="data-table"><tr><th>Код</th></tr><tr><td>Settings={ Name = &quot;*nk_test&quot;, tag =&quot;Metka&quot; &nbsp;}<br /><br /> params={R = 255, G = 255, B = 255, TRANSPARENCY = 0,FONT_HEIGHT = 10,TRANSPARENT_BACKGROUND = 1, FONT_FACE_NAME = &#39;Verdana&#39; }<br /><br />function OnCalculate(i)<br /> &nbsp; if i==1 then<br /> &nbsp; OnChangeSettings() &nbsp;<br /> &nbsp; elseif i== Size() then &nbsp; &nbsp;-- последняя свеча<br /> &nbsp; &nbsp; &nbsp;if os.time() &gt; LastSecond &nbsp;then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- раз в секунду (или больше) &nbsp; <br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LastSecond = os.time(); &nbsp; &nbsp;-- потиковое обновление (с задержкой) &nbsp; <br /> &nbsp; &nbsp; &nbsp; &nbsp; if Label then DelLabel(Settings.tag,Label) end<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;params.TEXT =tostring(C(i))<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;params.HINT = tostring(i)<br /> &nbsp; &nbsp; &nbsp; &nbsp; local h=0 &nbsp; local &nbsp;m=i; &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; while 14&gt;i-m &nbsp;do if H(m) &gt; h then h=H(m) end;m=m-1; &nbsp; end<br /> &nbsp; &nbsp; &nbsp; &nbsp; local Ti=T(i-3)<br /> &nbsp; &nbsp; &nbsp; &nbsp; params.DATE=100*(100*Ti.year+Ti.month)+Ti.day;<br /> &nbsp; &nbsp; &nbsp; &nbsp; params.TIME=100*(100*Ti.hour+Ti.min)+Ti.sec; &nbsp; <br /> &nbsp; &nbsp; &nbsp; &nbsp; params.YVALUE =h;<br /> &nbsp; &nbsp; &nbsp; &nbsp; Label= AddLabel(Settings.tag, params) <br /> &nbsp; &nbsp; &nbsp; &nbsp;end -- every second<br /> &nbsp; &nbsp;end <br />end<br /><br />function OnChangeSettings() <br />sec = getDataSourceInfo().sec_code; DelAllLabels(Settings.tag); <br />LastSecond=0 &nbsp;end<br />function OnDestroy() OnChangeSettings() end<br />function Init() &nbsp;return 1 end</td></tr></table><img src="https://forum.quik.ru/bitrix/components/bitrix/forum.interface/show_file.php?fid=13021&width=500&height=500" alt="Пользователь добавил изображение" border="0" /><br /><br /><img src="https://forum.quik.ru/bitrix/components/bitrix/forum.interface/show_file.php?fid=13022&width=500&height=500" alt="Пользователь добавил изображение" border="0" /><br /><br /><img src="https://forum.quik.ru/bitrix/components/bitrix/forum.interface/show_file.php?fid=13023&width=500&height=500" alt="Пользователь добавил изображение" border="0" /> <br />
			<i>23.12.2025 08:36:00, nikolz.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum17/message80620/topic9402/</link>
			<guid>http://forum.quik.ru/messages/forum17/message80620/topic9402/</guid>
			<pubDate>Tue, 23 Dec 2025 08:36:00 +0300</pubDate>
			<category>Обмен опытом</category>
		</item>
	</channel>
</rss>
