<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forum.equis.com/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>MetaStock</title><link>http://forum.equis.com/forums/3035/ShowForum.aspx</link><description>General discussions pertaining to MetaStock Professional and MetaStock EOD.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.0 (Debug Build: 60217.2664)</generator><item><title>Smoothed Heiken-Ashi formula !</title><link>http://forum.equis.com/forums/thread/27042.aspx</link><pubDate>Sun, 27 Apr 2008 04:13:15 GMT</pubDate><guid isPermaLink="false">2fa994ca-da92-4cc0-8578-1c713492f1d7:27042</guid><dc:creator>Desander</dc:creator><slash:comments>0</slash:comments><comments>http://forum.equis.com/forums/thread/27042.aspx</comments><wfw:commentRss>http://forum.equis.com/forums/commentrss.aspx?SectionID=3035&amp;PostID=27042</wfw:commentRss><description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Is there some smart programmer who can transform this wunderfull formula to use in Metastock ?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Heiken-Ashi Smoothed &lt;/STRONG&gt;(very very nice trading-indicator !!!&lt;/P&gt;
&lt;P&gt;For more detailed information, see &lt;a target="_blank" href="http://codebase.mql4.com/2754"&gt;http://codebase.mql4.com/2754&lt;/A&gt;&lt;/P&gt;&lt;PRE class=code2&gt;&lt;SPAN class=hl-comment&gt;//+------------------------------------------------------------------+&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//|                                         Heiken Ashi Smoothed.mq4 |&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//|                                                                  |&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//|                                                      mod by Raff |&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//+------------------------------------------------------------------+&lt;/SPAN&gt;
&lt;SPAN class=hl-prepro&gt;#property&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;copyright&lt;/SPAN&gt; &lt;SPAN class=hl-quotes&gt;"&lt;/SPAN&gt;&lt;SPAN class=hl-string&gt;Copyright © 2006, Forex-TSD.com &lt;/SPAN&gt;&lt;SPAN class=hl-quotes&gt;"&lt;/SPAN&gt;&lt;SPAN class=hl-prepro&gt;&lt;/SPAN&gt;
&lt;SPAN class=hl-prepro&gt;#property&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;link&lt;/SPAN&gt;      &lt;SPAN class=hl-quotes&gt;"&lt;/SPAN&gt;&lt;SPAN class=hl-string&gt;http://www.forex-tsd.com/&lt;/SPAN&gt;&lt;SPAN class=hl-quotes&gt;"&lt;/SPAN&gt;&lt;SPAN class=hl-prepro&gt;&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//----&lt;/SPAN&gt;
&lt;SPAN class=hl-prepro&gt;#property&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;indicator_chart_window&lt;/SPAN&gt;&lt;SPAN class=hl-prepro&gt;&lt;/SPAN&gt;
&lt;SPAN class=hl-prepro&gt;#property&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;indicator_buffers&lt;/SPAN&gt; &lt;SPAN class=hl-number&gt;4&lt;/SPAN&gt;&lt;SPAN class=hl-prepro&gt;&lt;/SPAN&gt;
&lt;SPAN class=hl-prepro&gt;#property&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;indicator_color1&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;Red&lt;/SPAN&gt;&lt;SPAN class=hl-prepro&gt;&lt;/SPAN&gt;
&lt;SPAN class=hl-prepro&gt;#property&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;indicator_color2&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;Lime&lt;/SPAN&gt;&lt;SPAN class=hl-prepro&gt;&lt;/SPAN&gt;
&lt;SPAN class=hl-prepro&gt;#property&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;indicator_color3&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;Red&lt;/SPAN&gt;&lt;SPAN class=hl-prepro&gt;&lt;/SPAN&gt;
&lt;SPAN class=hl-prepro&gt;#property&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;indicator_color4&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;Lime&lt;/SPAN&gt;&lt;SPAN class=hl-prepro&gt;&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//---- parameters&lt;/SPAN&gt;
&lt;SPAN class=hl-reserved&gt;extern&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;int&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;MaMetod&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt; =&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;extern&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;int&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;MaPeriod&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;6&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;extern&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;int&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;MaMetod2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt; =&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;3&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;extern&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;int&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;MaPeriod2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-comment&gt;//---- buffers&lt;/SPAN&gt;
&lt;SPAN class=hl-reserved&gt;double&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer1&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;double&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer2&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;double&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer3&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;double&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer4&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;double&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer5&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;double&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer6&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;double&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer7&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;double&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer8&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-comment&gt;//----&lt;/SPAN&gt;
&lt;SPAN class=hl-reserved&gt;int&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtCountedBars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-comment&gt;//+------------------------------------------------------------------+&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//| Custom indicator initialization function                         |&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//|------------------------------------------------------------------|&lt;/SPAN&gt;
&lt;SPAN class=hl-reserved&gt;int&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;init&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;()&lt;/SPAN&gt;
  &lt;SPAN class=hl-brackets&gt;{&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//---- indicators&lt;/SPAN&gt;
   &lt;SPAN class=hl-predfunc&gt;IndicatorBuffers&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;8&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexStyle&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;DRAW_HISTOGRAM&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;1&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;Red&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer1&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexStyle&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;1&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;DRAW_HISTOGRAM&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;1&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;Lime&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;1&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer2&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexStyle&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;DRAW_HISTOGRAM&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;3&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;Red&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer3&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexStyle&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;3&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;DRAW_HISTOGRAM&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;3&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;Lime&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;3&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer4&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-comment&gt;//----&lt;/SPAN&gt;
   &lt;SPAN class=hl-predfunc&gt;SetIndexDrawBegin&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;5&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-comment&gt;//---- indicator buffers mapping&lt;/SPAN&gt;
   &lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer1&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;1&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer2&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer3&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;3&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer4&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;4&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer5&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;5&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer6&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;6&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer7&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;SetIndexBuffer&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;7&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer8&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-comment&gt;//---- initialization done&lt;/SPAN&gt;
   &lt;SPAN class=hl-reserved&gt;return&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
  &lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;}&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//+------------------------------------------------------------------+&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//| Custor indicator deinitialization function                       |&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//+------------------------------------------------------------------+&lt;/SPAN&gt;
&lt;SPAN class=hl-reserved&gt;int&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;deinit&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;()&lt;/SPAN&gt;
  &lt;SPAN class=hl-brackets&gt;{&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//---- TODO: add your code here&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//----&lt;/SPAN&gt;
   &lt;SPAN class=hl-reserved&gt;return&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
  &lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;}&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//+------------------------------------------------------------------+&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//| Custom indicator iteration function                              |&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//+------------------------------------------------------------------+&lt;/SPAN&gt;
&lt;SPAN class=hl-reserved&gt;int&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;start&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;()&lt;/SPAN&gt;
  &lt;SPAN class=hl-brackets&gt;{&lt;/SPAN&gt;
   &lt;SPAN class=hl-reserved&gt;double&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;maOpen&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maClose&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maLow&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maHigh&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;double&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;haOpen&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haHigh&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haLow&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haClose&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;if&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-predvars&gt;Bars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;10&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;return&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtCountedBars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;IndicatorCounted&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;()&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-comment&gt;//---- check for possible errors&lt;/SPAN&gt;
   &lt;SPAN class=hl-reserved&gt;if&lt;/SPAN&gt; &lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtCountedBars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt; &lt;SPAN class=hl-reserved&gt;return&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;-&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;1&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-comment&gt;//---- last counted bar will be recounted&lt;/SPAN&gt;
   &lt;SPAN class=hl-reserved&gt;if&lt;/SPAN&gt; &lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtCountedBars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtCountedBars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;--;
   &lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;int&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-predvars&gt;Bars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;-&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtCountedBars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;-&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;1&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;while&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;
     &lt;SPAN class=hl-brackets&gt;{&lt;/SPAN&gt;
      &lt;SPAN class=hl-identifier&gt;maOpen&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-tech_inds&gt;iMA&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;NULL&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaPeriod&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaMetod&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;MODE_OPEN&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
      &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maClose&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-tech_inds&gt;iMA&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;NULL&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaPeriod&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaMetod&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;MODE_CLOSE&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
      &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maLow&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-tech_inds&gt;iMA&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;NULL&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaPeriod&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaMetod&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;MODE_LOW&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
      &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maHigh&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-tech_inds&gt;iMA&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;NULL&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaPeriod&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaMetod&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-consts&gt;MODE_HIGH&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-comment&gt;//----&lt;/SPAN&gt;
      &lt;SPAN class=hl-identifier&gt;haOpen&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer5&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;+&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;1&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;+&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer6&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;+&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;1&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;])&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;/&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
      &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haClose&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maOpen&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;+&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maHigh&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;+&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maLow&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;+&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maClose&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;/&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;4&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
      &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haHigh&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;MathMax&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maHigh&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;MathMax&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haOpen&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haClose&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;))&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
      &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haLow&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;MathMin&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;maLow&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-predfunc&gt;MathMin&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haOpen&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;, &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haClose&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;))&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
      &lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;if&lt;/SPAN&gt; &lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haOpen&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haClose&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;
        &lt;SPAN class=hl-brackets&gt;{&lt;/SPAN&gt;
         &lt;SPAN class=hl-identifier&gt;ExtMapBuffer7&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haLow&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
         &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer8&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haHigh&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
        &lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;}&lt;/SPAN&gt;
      &lt;SPAN class=hl-reserved&gt;else&lt;/SPAN&gt;
        &lt;SPAN class=hl-brackets&gt;{&lt;/SPAN&gt;
         &lt;SPAN class=hl-identifier&gt;ExtMapBuffer7&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haHigh&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
         &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer8&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haLow&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
        &lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;}&lt;/SPAN&gt;
      &lt;SPAN class=hl-identifier&gt;ExtMapBuffer5&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haOpen&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
      &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer6&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;haClose&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
      &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;pos&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;--;
     &lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;}&lt;/SPAN&gt;
   &lt;SPAN class=hl-reserved&gt;int&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;for&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;; &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=hl-predvars&gt;Bars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;; &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;++&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer1&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-tech_inds&gt;iMAOnArray&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer7&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-predvars&gt;Bars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaPeriod2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaMetod2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;for&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;; &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=hl-predvars&gt;Bars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;; &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;++&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer2&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-tech_inds&gt;iMAOnArray&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer8&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-predvars&gt;Bars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaPeriod2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaMetod2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;for&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;; &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=hl-predvars&gt;Bars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;; &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;++&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer3&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-tech_inds&gt;iMAOnArray&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer5&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-predvars&gt;Bars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaPeriod2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaMetod2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
   &lt;/SPAN&gt;&lt;SPAN class=hl-reserved&gt;for&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;; &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=hl-predvars&gt;Bars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;; &lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;++&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt; &lt;SPAN class=hl-identifier&gt;ExtMapBuffer4&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;[&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;]&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;=&lt;/SPAN&gt;&lt;SPAN class=hl-tech_inds&gt;iMAOnArray&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;ExtMapBuffer6&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-predvars&gt;Bars&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaPeriod2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;MaMetod2&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;,&lt;/SPAN&gt;&lt;SPAN class=hl-identifier&gt;i&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
&lt;/SPAN&gt;&lt;SPAN class=hl-comment&gt;//----&lt;/SPAN&gt;
   &lt;SPAN class=hl-reserved&gt;return&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;(&lt;/SPAN&gt;&lt;SPAN class=hl-number&gt;0&lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;)&lt;/SPAN&gt;&lt;SPAN class=hl-code&gt;;
  &lt;/SPAN&gt;&lt;SPAN class=hl-brackets&gt;}&lt;/SPAN&gt;
&lt;SPAN class=hl-comment&gt;//+------------------------------------------------------------------+&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=code2&gt;&lt;SPAN class=hl-comment&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=code2&gt;&lt;SPAN class=hl-comment&gt;&lt;FONT face="Times New Roman" size=5&gt;It would be a very nice utility to all MetaStock-users !!&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=code2&gt;&lt;SPAN class=hl-comment&gt;&lt;FONT face="Times New Roman" size=4&gt;Kind regards,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=code2&gt;&lt;SPAN class=hl-comment&gt;&lt;FONT face="Times New Roman" size=4&gt;Gilbert Despeghel, Belgium...&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=code2&gt;&lt;SPAN class=hl-comment&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;</description></item></channel></rss>