<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[QUIK -> DDE &mdash; Получить sec_code из метки индикатора]]></title>
	<link rel="self" href="https://quik2dde.ru/extern.php?action=feed&amp;tid=443&amp;type=atom" />
	<updated>2023-10-23T17:26:26Z</updated>
	<generator>PunBB</generator>
	<id>https://quik2dde.ru/viewtopic.php?id=443</id>
		<entry>
			<title type="html"><![CDATA[Получить sec_code из метки индикатора]]></title>
			<link rel="alternate" href="https://quik2dde.ru/viewtopic.php?pid=4290#p4290" />
			<content type="html"><![CDATA[<p>Есть индикатор&nbsp; </p><p>Settings = {<br />&nbsp; &nbsp;Name = &quot;goodmode1&quot;<br />}</p><p>function Init()<br />&nbsp; &nbsp;return 1<br />end</p><p>function OnCalculate(Index)<br />&nbsp; &nbsp;if Index == 1 then<br />&nbsp; &nbsp; &nbsp; &nbsp;local info = getDataSourceInfo()<br />&nbsp; &nbsp; &nbsp; &nbsp;--message(info.sec_code)<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;-- Создаем метку с информацией sec_code<br />&nbsp; &nbsp; &nbsp; &nbsp;local labelSize = 100 -- размер метки<br />&nbsp; &nbsp; &nbsp; &nbsp;local labelX = 10 -- координата X метки (посередине графика)<br />&nbsp; &nbsp; &nbsp; &nbsp;local labelY = 10 -- координата Y метки (посередине графика)<br />&nbsp; &nbsp; &nbsp; &nbsp;local secCodeLabel = tostring(info.sec_code)<br />&nbsp; &nbsp; &nbsp; &nbsp;AddLabel(labelX, labelY, secCodeLabel, RGB(255, 255, 0), labelSize)<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;-- Выводим значение метки в сообщении<br />&nbsp; &nbsp; &nbsp; &nbsp;message(&quot;Значение метки: &quot; .. secCodeLabel)<br />&nbsp; &nbsp;end<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;return 0<br />end</p><br /><p>График заякорен к ТТТ и при выборе инструмента в ТТТ выдает его название, вроде это название так же записывается в метку на графике ( метку кстати ни разу не получилось увидеть, надеюсь она есть)</p><p>Делаю скрипт что-бы при запуске скрипта, значение метки выводилось сообщением.</p><p>function OnInit()<br />&nbsp; &nbsp;local labelValue = GetLabelParams(&quot;goodmode1&quot;, &quot;Метка&quot;)<br />&nbsp; &nbsp;message(&quot;Значение метки: &quot; .. tostring(labelValue))<br />end</p><p>Такой скрипт отображает nill.&nbsp; Код вроде правильный, что не так?&nbsp; Как проверить есть ли метка?</p>]]></content>
			<author>
				<name><![CDATA[Alexey89]]></name>
				<uri>https://quik2dde.ru/profile.php?id=3408</uri>
			</author>
			<updated>2023-10-23T17:26:26Z</updated>
			<id>https://quik2dde.ru/viewtopic.php?pid=4290#p4290</id>
		</entry>
</feed>
