<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Форум QUIK [тема: Индикатор insidebar]</title>
		<link>http://forum.quik.ru</link>
		<description>Новое в теме Индикатор insidebar форума  на сайте Форум QUIK [forum.quik.ru]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Wed, 20 May 2026 08:51:47 +0300</pubDate>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75923/topic8680/">Индикатор insidebar</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_XMi2JVVB" href="/user/16565/" bx-tooltip-user-id="16565">Павел Лоскутов</a> написал:<br />Мот быть кто-то уже писал индикатор внутреннего бара для квика, или какой-нибудь подобный. Может ли кто написать простой индикатор insidebar, чтобы он изменял цвет или он отмечался точкой или другим знаком?<br />=============<br />написал &nbsp;такой вариант:
====code====
<pre>name="nk_insBar";
Settings={Name =name};
local function&nbsp;&nbsp;Cn(i) local Ci,Oi=C(i),O(i);if Ci&#62;=Oi then return Ci,Oi; end return Oi,Ci; end
j=1;
function OnCalculate(i)
&nbsp;&nbsp;&nbsp;&nbsp;Hi,Li=H(i),L(i);
&nbsp;&nbsp;&nbsp;&nbsp;if Hi~=Li then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BH,BL=Cn(i)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if i~=j then BH1,BL1=Cn(j); H1,L1=H(j),L(j); j=i; end
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if H_ then
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;if Hi&#62;H_ or L_&#62;Li then H1_,L1_=H_,L_;&nbsp;&nbsp;H_,L_=nil; end
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;if H1&#62;=Hi and Li&#62;=L1 then&nbsp;&nbsp;BH_,BL_,H_,L_=BH1,BL1,H1,L1; end
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end
&nbsp;&nbsp;&nbsp;&nbsp;end
&nbsp;&nbsp;&nbsp;&nbsp;if H_ then return H_,L_; else return H1_,L1_; end
end

function Init()
&nbsp;&nbsp;&nbsp;Settings.line = {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{Name = "H_",Color = RGB(0, 0, 255), Type =3, Width = 2},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{Name = "L_",Color = RGB(255, 0, 255), Type =3, Width = 2},
&nbsp;&nbsp;&nbsp;};
&nbsp;&nbsp;&nbsp;return #Settings.line;
end

</pre>
============= <br />
			<i>25.06.2024 07:29:20, nikolz.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75923/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75923/topic8680/</guid>
			<pubDate>Tue, 25 Jun 2024 07:29:20 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75920/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<a class="blog-p-user-name" id="bp_8W77VM63" href="/user/16131/" bx-tooltip-user-id="16131">VPM</a>, все заработал. Большое спасибо, что откликнулись и помогли. Удачи Вам в ваших делах. <br />
			<i>24.06.2024 16:57:04, Skyrider50.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75920/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75920/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 16:57:04 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75919/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Посмотрите внимательней вы пропустили строку <br /><br />local string_upper,string_sub=string.upper,string.sub;<br /><br />поставьте перед функцией function Value(I,VType,ds) <br />
			<i>24.06.2024 16:52:13, VPM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75919/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75919/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 16:52:13 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75918/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<a class="blog-p-user-name" id="bp_F6lMUb27" href="/user/16131/" bx-tooltip-user-id="16131">VPM</a>, нашел, но выдает ошибку при загрузке.<br />attempt to call a nil value (global &#39;string_sub&#39;) <br />
			<i>24.06.2024 16:47:20, Skyrider50.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75918/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75918/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 16:47:20 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75917/topic8680/">Индикатор insidebar</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_BeHLdkg6" href="/user/16565/" bx-tooltip-user-id="16565">Skyrider50</a> написал:<br /><noindex><a href="/user/16131/" target="_blank" rel="nofollow">VPM</a></noindex>, все так, но нет. lua 5.4.1<br />=============<br />В квике: система - настройки - основные - луа скрипты, вообще то хотя я и пишу в среде 5.4 но тут нет ничего такого что не воспроизвёл бы даже луа 5.1 <br />
			<i>24.06.2024 16:41:48, VPM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75917/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75917/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 16:41:48 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75915/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Что в списке было удобно и быстро находить измените имя индикатора например так<br />Settings.Name = &quot;1Structure&quot;;<br />это будет самописные блокировать в группу а Ваш поиск будет всегда с одного знака начинаться, просто удобно. <br />
			<i>24.06.2024 16:35:52, VPM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75915/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75915/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 16:35:52 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75914/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<a class="blog-p-user-name" id="bp_95rRIpUO" href="/user/16131/" bx-tooltip-user-id="16131">VPM</a>, все так, но нет. lua 5.4.1 <br />
			<i>24.06.2024 16:35:13, Skyrider50.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75914/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75914/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 16:35:13 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75913/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			В блокноте это ANSI <br />
			<i>24.06.2024 16:22:51, VPM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75913/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75913/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 16:22:51 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75911/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Нужен формат 1251, воспользуйтесь стандартным блокнотом, скопируйте и сохраните в этом формате, проверь настройки квик там поставьте lua 5.4 &nbsp; <br />
			<i>24.06.2024 16:20:51, VPM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75911/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75911/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 16:20:51 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75910/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<a class="blog-p-user-name" id="bp_zCWN9JRg" href="/user/16131/" bx-tooltip-user-id="16131">VPM</a>, извините, но не появляется в списке.<br />Может я что-то неправильно делаю? Сохраняю код в текстовом файле с расширением .lua и помещаю его в папку LuaIndicators.<br />Но его нет в списке. <br />
			<i>24.06.2024 15:24:23, Skyrider50.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75910/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75910/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 15:24:23 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75909/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Да действительно, вот исправленный проверил у себя, пробуйте<br />local string_upper,string_sub=string.upper,string.sub;<br />function Value(I,VType,ds) <br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;local Out = nil<br /> &nbsp; &nbsp;local VType=(VType and string_upper(string_sub(VType,1,1))) or &quot;A&quot;<br />	if VType == &quot;O&quot; then		--Open<br />		Out = (O and O(I)) or (ds and ds:O(I))<br />	elseif VType == &quot;H&quot; then 	--High<br />		Out = (H and H(I)) or (ds and ds:H(I))<br />	elseif VType == &quot;L&quot; then	--Low<br />		Out = (L and L(I)) or (ds and ds:L(I))<br />	elseif VType == &quot;C&quot; then	--Close<br />		Out = (C and C(I)) or (ds and ds:C(I))<br />	elseif VType == &quot;V&quot; then	--Volume<br />		Out = (V and V(I)) or (ds and ds:V(I))<br />	elseif VType == &quot;X&quot; then	--DateTime<br />		Out = (T and T(I)) or (ds and ds:T(I))<br />	elseif VType == &quot;A&quot; then	--Any<br />		if ds then Out = ds&#91;I&#93; end<br />	end<br />return Out<br />end<br />function Structure()<br /> &nbsp; &nbsp;local I1 = 0<br /> &nbsp; &nbsp;local Structura = 0<br /><br /> &nbsp; &nbsp;return function(I, FS, ds)<br /> &nbsp; &nbsp; &nbsp; &nbsp;I = I or 1<br /> &nbsp; &nbsp; &nbsp; &nbsp;ds = ds or nil<br /> &nbsp; &nbsp; &nbsp; &nbsp;FS = FS or {}<br /> &nbsp; &nbsp; &nbsp; &nbsp;local p = FS.persent or 4 -- %<br /> &nbsp; &nbsp; &nbsp; &nbsp;local wid = FS.wid or 0<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local o0 = Value(I, &#39;O&#39;, ds) or 0<br /> &nbsp; &nbsp; &nbsp; &nbsp;local c0 = Value(I, &#39;C&#39;, ds) or o0<br /> &nbsp; &nbsp; &nbsp; &nbsp;local h0 = Value(I, &#39;H&#39;, ds) or c0<br /> &nbsp; &nbsp; &nbsp; &nbsp;local l0 = Value(I, &#39;L&#39;, ds) or c0<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;if I == 1 then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I1 = 0<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Structura = 0<br /> &nbsp; &nbsp; &nbsp; &nbsp;end<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local flag = h0 and l0 and c0 and o0 or false<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local o1 = I &gt; 1 and Value(I-1, &#39;O&#39;, ds) or o0<br /> &nbsp; &nbsp; &nbsp; &nbsp;local c1 = I &gt; 1 and Value(I-1, &#39;C&#39;, ds) or c0<br /> &nbsp; &nbsp; &nbsp; &nbsp;local h1 = I &gt; 1 and Value(I-1, &#39;H&#39;, ds) or h0<br /> &nbsp; &nbsp; &nbsp; &nbsp;local l1 = I &gt; 1 and Value(I-1, &#39;L&#39;, ds) or l0<br /> &nbsp; &nbsp; &nbsp; &nbsp;local flag1 = I &gt; 1 and flag and h1 and l1 or false<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local h2 = I &gt; 2 and Value(I-2, &#39;H&#39;, ds) or h1<br /> &nbsp; &nbsp; &nbsp; &nbsp;local l2 = I &gt; 2 and Value(I-2, &#39;L&#39;, ds) or l1<br /> &nbsp; &nbsp; &nbsp; &nbsp;local flag2 = I &gt; 2 and h2 and l2 and flag1 and flag or false<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local newbar = I &gt; I1<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;-- Определение типов баров<br /> &nbsp; &nbsp; &nbsp; &nbsp;local up_bar1 = flag2 and h1 &gt; h2 and l1 &gt;= l2 or false<br /> &nbsp; &nbsp; &nbsp; &nbsp;local down_bar1 = flag2 and l1 &lt; l2 and h1 &lt;= h2 or false<br /> &nbsp; &nbsp; &nbsp; &nbsp;local inbar1 = flag2 and h1 &lt;= h2 and l1 &gt;= l2 or false<br /> &nbsp; &nbsp; &nbsp; &nbsp;local outbar1 = flag2 and h1 &gt; h2 and l1 &lt; l2 or false<br /> &nbsp; &nbsp; &nbsp; &nbsp;local outbar_up1 = outbar1 and c1 &gt; o1 or false<br /> &nbsp; &nbsp; &nbsp; &nbsp;local outbar_down1 = outbar1 and c1 &lt;= o1 or false<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local outbar0 = flag1 and h0 &gt; h1 and l0 &lt; l1 or false<br /> &nbsp; &nbsp; &nbsp; &nbsp;local outbar_up0 = outbar0 and c0 &gt; o0 or false<br /> &nbsp; &nbsp; &nbsp; &nbsp;local outbar_down0 = outbar0 and c0 &lt; o0 or false<br /> &nbsp; &nbsp; &nbsp; &nbsp;local up_bar0 = flag1 and h0 &gt; h1 and l0 &gt;= l1 or false<br /> &nbsp; &nbsp; &nbsp; &nbsp;local down_bar0 = flag1 and l0 &lt; l1 and h0 &lt;= h1 or false<br /> &nbsp; &nbsp; &nbsp; &nbsp;local inbar0 = flag1 and h0 &lt; h1 and l0 &gt; l1 or false<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local event = newbar and (outbar0 or up_bar0 or down_bar0) or false<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;local struc = (outbar_up0 or up_bar0) and 1 or (outbar_down0 or down_bar0) and -1 or 0<br /> &nbsp; &nbsp; &nbsp; &nbsp;local structura = Structura<br /> &nbsp; &nbsp; &nbsp; &nbsp;Structura = (newbar or event) and Structura + struc or structura<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp;I1 = I<br />		if newbar and inbar1 then SetValue(I-1,1,l1 ) end<br />		if newbar and outbar1 then SetValue(I-1,2,h1 ) end<br /> &nbsp; &nbsp; &nbsp; &nbsp;--return newbar and inbar1 and li or nil, newbar and outbar1 and h1 or nil<br /> &nbsp; end<br />end<br /><br />Settings={};<br />Settings.Name = &quot;Structure&quot;;<br /><br />local f;<br />function Init()<br /><br />f=Structure();<br />Settings.line = {<br />{Name = &quot;InBar&quot;,Color = RGB(0, 0, 255), Type = TYPE_POINT, Width = 3},<br />{Name = &quot;OutBar&quot;,Color = RGB(255, 0, 255), Type = TYPE_POINT, Width = 3},<br />};<br />return #Settings.line;<br />end<br />function OnCalculate(index)<br />return f( index,Settings )<br />end <br />
			<i>24.06.2024 14:04:36, VPM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75909/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75909/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 14:04:36 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75908/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<a class="blog-p-user-name" id="bp_A2NwyhNS" href="/user/16131/" bx-tooltip-user-id="16131">VPM</a>, не загружает. Ошибка <br />
			<i>24.06.2024 13:07:49, Skyrider50.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75908/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75908/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 13:07:49 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75907/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Все таки напутал, нужно заменить строку <br />return newbar and inbar1 or nil, newbar and outbar1 or nil<br />на <br />return newbar and inbar1 and l1 or nil, newbar and outbar1 and h1 or nil<br /><br />Должен выводить точки в момент появления новой свечи <br />
			<i>24.06.2024 12:15:10, VPM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75907/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75907/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 12:15:10 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75906/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			====code====
<pre>Попробуйте так, должен выводить внутренний бар и внешний бар поглощения. надеюсь ничего не напутал, давно не пользуюсь, но это самый простой и понятный вариант.

function Structure()
&nbsp;&nbsp;&nbsp;&nbsp;local I1 = 0
&nbsp;&nbsp;&nbsp;&nbsp;local Structura = 0

&nbsp;&nbsp;&nbsp;&nbsp;return function(I, FS, ds)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I = I or 1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ds = ds or nil
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FS = FS or {}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local p = FS.persent or 4 -- %
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local wid = FS.wid or 0

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local o0 = Value(I, 'O', ds) or 0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local c0 = Value(I, 'C', ds) or o0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local h0 = Value(I, 'H', ds) or c0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local l0 = Value(I, 'L', ds) or c0

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if I == 1 then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I1 = 0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Structura = 0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local flag = h0 and l0 and c0 and o0 or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local o1 = I &#62; 1 and Value(I-1, 'O', ds) or o0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local c1 = I &#62; 1 and Value(I-1, 'C', ds) or c0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local h1 = I &#62; 1 and Value(I-1, 'H', ds) or h0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local l1 = I &#62; 1 and Value(I-1, 'L', ds) or l0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local flag1 = I &#62; 1 and flag and h1 and l1 or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local h2 = I &#62; 2 and Value(I-2, 'H', ds) or h1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local l2 = I &#62; 2 and Value(I-2, 'L', ds) or l1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local flag2 = I &#62; 2 and h2 and l2 and flag1 and flag or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local newbar = I &#62; I1

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- Определение типов баров
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local up_bar1 = flag2 and h1 &#62; h2 and l1 &#62;= l2 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local down_bar1 = flag2 and l1 &#60; l2 and h1 &#60;= h2 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local inbar1 = flag2 and h1 &#60;= h2 and l1 &#62;= l2 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar1 = flag2 and h1 &#62; h2 and l1 &#60; l2 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar_up1 = outbar1 and c1 &#62; o1 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar_down1 = outbar1 and c1 &#60;= o1 or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar0 = flag1 and h0 &#62; h1 and l0 &#60; l1 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar_up0 = outbar0 and c0 &#62; o0 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar_down0 = outbar0 and c0 &#60; o0 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local up_bar0 = flag1 and h0 &#62; h1 and l0 &#62;= l1 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local down_bar0 = flag1 and l0 &#60; l1 and h0 &#60;= h1 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local inbar0 = flag1 and h0 &#60; h1 and l0 &#62; l1 or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local event = newbar and (outbar0 or up_bar0 or down_bar0) or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local struc = (outbar_up0 or up_bar0) and 1 or (outbar_down0 or down_bar0) and -1 or 0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local structura = Structura
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Structura = (newbar or event) and Structura + struc or structura

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I1 = I

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return newbar and inbar1 or nil, newbar and outbar1 or nil
&nbsp;&nbsp; end
end

Settings={};
Settings.Name = "Structure";

local f;
function Init()

f=Structure();
Settings.line = {
{Name = "InBar",Color = RGB(0, 0, 255), Type = TYPE_POINT, Width = 2},
{Name = "OutBar",Color = RGB(255, 0, 255), Type = TYPE_HISTOGRAM, Width = 2},
};
return #Settings.line;

end
function OnCalculate(index)
return f( index,Settings )
end
</pre>
=============
 &nbsp; &nbsp; <br />
			<i>24.06.2024 12:00:55, VPM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75906/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75906/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 12:00:55 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75904/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			<a class="blog-p-user-name" id="bp_Do5y53fY" href="/user/16131/" bx-tooltip-user-id="16131">VPM</a>, спасибо, но я не знаю этого языка. В квике при добавлении выдает ошибку: <br />unexpected symbol near &#39;&lt;\255&gt;&#39;.<br />Что это? <br />
			<i>24.06.2024 10:48:35, Skyrider50.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75904/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75904/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 10:48:35 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75899/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Попробуйте такой
====code====
<pre>function Cached.Structure()
&nbsp;&nbsp;&nbsp;&nbsp;local I1 = 0
&nbsp;&nbsp;&nbsp;&nbsp;local Structura = 0

&nbsp;&nbsp;&nbsp;&nbsp;return function(I, FS, ds)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I = I or 1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ds = ds or nil
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FS = FS or {}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local p = FS.persent or 4 -- %
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local wid = FS.wid or 0

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local o0 = Value(I, 'O', ds) or 0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local c0 = Value(I, 'C', ds) or o0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local h0 = Value(I, 'H', ds) or c0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local l0 = Value(I, 'L', ds) or c0

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if I == 1 then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I1 = 0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Structura = 0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local flag = h0 and l0 and c0 and o0 or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local o1 = I &#62; 1 and Value(I-1, 'O', ds) or o0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local c1 = I &#62; 1 and Value(I-1, 'C', ds) or c0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local h1 = I &#62; 1 and Value(I-1, 'H', ds) or h0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local l1 = I &#62; 1 and Value(I-1, 'L', ds) or l0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local flag1 = I &#62; 1 and flag and h1 and l1 or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local h2 = I &#62; 2 and Value(I-2, 'H', ds) or h1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local l2 = I &#62; 2 and Value(I-2, 'L', ds) or l1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local flag2 = I &#62; 2 and h2 and l2 and flag1 and flag or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local newbar = I &#62; I1

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- Определение типов баров
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local up_bar1 = flag2 and h1 &#62; h2 and l1 &#62;= l2 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local down_bar1 = flag2 and l1 &#60; l2 and h1 &#60;= h2 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local inbar1 = flag2 and h1 &#60;= h2 and l1 &#62;= l2 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar1 = flag2 and h1 &#62; h2 and l1 &#60; l2 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar_up1 = outbar1 and c1 &#62; o1 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar_down1 = outbar1 and c1 &#60;= o1 or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar0 = flag1 and h0 &#62; h1 and l0 &#60; l1 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar_up0 = outbar0 and c0 &#62; o0 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local outbar_down0 = outbar0 and c0 &#60; o0 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local up_bar0 = flag1 and h0 &#62; h1 and l0 &#62;= l1 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local down_bar0 = flag1 and l0 &#60; l1 and h0 &#60;= h1 or false
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local inbar0 = flag1 and h0 &#60; h1 and l0 &#62; l1 or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local event = newbar and (outbar0 or up_bar0 or down_bar0) or false

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local struc = (outbar_up0 or up_bar0) and 1 or (outbar_down0 or down_bar0) and -1 or 0
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local structura = Structura
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Structura = (newbar or event) and Structura + struc or structura

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I1 = I

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if wid == 0 then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return Structura
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return struc
&nbsp;&nbsp;&nbsp;&nbsp;end
end
</pre>
============= <br />
			<i>24.06.2024 08:11:59, VPM.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75899/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75899/topic8680/</guid>
			<pubDate>Mon, 24 Jun 2024 08:11:59 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Индикатор insidebar</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message75896/topic8680/">Индикатор insidebar</a></b> <i>Написать индикатор</i> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Мот быть кто-то уже писал индикатор внутреннего бара для квика, или какой-нибудь подобный. Может ли кто написать простой индикатор insidebar, чтобы он изменял цвет или он отмечался точкой или другим знаком? <br />
			<i>23.06.2024 11:38:19, Павел Лоскутов.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message75896/topic8680/</link>
			<guid>http://forum.quik.ru/messages/forum10/message75896/topic8680/</guid>
			<pubDate>Sun, 23 Jun 2024 11:38:19 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
