<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Форум QUIK [тема: Расчет в роботе Экспоненциальное скользящее среднее (EMA)]</title>
		<link>http://forum.quik.ru</link>
		<description>Новое в теме Расчет в роботе Экспоненциальное скользящее среднее (EMA) форума  на сайте Форум QUIK [forum.quik.ru]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Sat, 11 Apr 2026 13:11:04 +0300</pubDate>
		<item>
			<title>Расчет в роботе Экспоненциальное скользящее среднее (EMA)</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message32405/topic3808/">Расчет в роботе Экспоненциальное скользящее среднее (EMA)</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Проблема решена. <br /><br />Считать необходимо не 8 свечей (период), а все для нужного таймфрейма, т.е. <br /><br />for i_ema_8 = 1, ds1:Size() , 1 do <br />
			<i>27.07.2018 11:47:26, Василий Веселов.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message32405/topic3808/</link>
			<guid>http://forum.quik.ru/messages/forum10/message32405/topic3808/</guid>
			<pubDate>Fri, 27 Jul 2018 11:47:26 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Расчет в роботе Экспоненциальное скользящее среднее (EMA)</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message32312/topic3808/">Расчет в роботе Экспоненциальное скользящее среднее (EMA)</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Здравствуйте,<br />Пример расчета в LUA можно посмотреть по ссылке:<br /><noindex><a href="ftp://ftp.quik.ru/public/INDICATORS.zip" target="_blank" rel="nofollow">ftp://ftp.quik.ru/public/INDICATORS.zip</a></noindex> <br />
			<i>23.07.2018 08:45:39, Sergey Gorokhov.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message32312/topic3808/</link>
			<guid>http://forum.quik.ru/messages/forum10/message32312/topic3808/</guid>
			<pubDate>Mon, 23 Jul 2018 08:45:39 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Расчет в роботе Экспоненциальное скользящее среднее (EMA)</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message32294/topic3808/">Расчет в роботе Экспоненциальное скользящее среднее (EMA)</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Если взять формулу из руководства все равно разница получается в десятки единиц<br />Ema_8 = (pre_ema_8*(period_ema8-1)+2*C_ema8&#91;i_ema_8&#93;)/(period_ema8 + 1) <br />
			<i>20.07.2018 15:30:30, Василий Веселов.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message32294/topic3808/</link>
			<guid>http://forum.quik.ru/messages/forum10/message32294/topic3808/</guid>
			<pubDate>Fri, 20 Jul 2018 15:30:30 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
		<item>
			<title>Расчет в роботе Экспоненциальное скользящее среднее (EMA)</title>
			<description><![CDATA[<b><a href="http://forum.quik.ru/messages/forum10/message32293/topic3808/">Расчет в роботе Экспоненциальное скользящее среднее (EMA)</a></b> в форуме <a href="http://forum.quik.ru/forum10/">Программирование на языке Lua</a>. <br />
			Здравствуйте! Возникла задача рассчитать EMA. Но результаты расчета не равны соответствующему индикатору. Не могу понять в чем ошибка? Бьюсь уже несколько дней. Может кто подскажет? Код привожу ниже.<br /><br /><br />C_ema8 = {}<br />function main()<br /> &nbsp;while is_run do<br /> &nbsp;sleep(1000)<br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;ds1, Error = CreateDataSource (CLASS, SEC, INTERVAL_M10)<br /> <br />-- Ema8<br /> <br />Ema_8 = 0<br />GO8 = 0<br />pre_ema_8 =0<br />period_ema8 = 8<br /><br /> &nbsp; &nbsp;for i_ema_8 = period_ema8, 1, -1 do<br /> &nbsp; &nbsp; &nbsp; &nbsp; C_ema8&#91;i_ema_8&#93; = ds1:C(ds1:Size() - (i_ema_8 - 1))<br /> &nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; if i_ema_8 == period_ema8 then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ema_8 = C_ema8&#91;i_ema_8&#93;<br /> &nbsp; &nbsp; &nbsp; &nbsp;else <br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pre_ema_8 = Ema_8<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GO8 = 1<br /> &nbsp; &nbsp; &nbsp; &nbsp;end<br /> <br /> &nbsp; &nbsp; &nbsp; &nbsp;if GO8 == 1 then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ema_8 = pre_ema_8*(2/(period_ema8+1))+ (1 - (2/(period_ema8+1)))*C_ema8&#91;i_ema_8&#93;<br /> &nbsp; &nbsp; &nbsp; &nbsp;end<br /> <br /> &nbsp; &nbsp; &nbsp; &nbsp;if i_ema_8 == 1 then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Ema8 = math.ceil(Ema_8)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GO8 = 0<br /> &nbsp; &nbsp; &nbsp; &nbsp;end<br /> &nbsp; &nbsp;end <br />end <br />
			<i>20.07.2018 15:01:50, Василий Веселов.</i>]]></description>
			<link>http://forum.quik.ru/messages/forum10/message32293/topic3808/</link>
			<guid>http://forum.quik.ru/messages/forum10/message32293/topic3808/</guid>
			<pubDate>Fri, 20 Jul 2018 15:01:50 +0300</pubDate>
			<category>Программирование на языке Lua</category>
		</item>
	</channel>
</rss>
