<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic simple moving average in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/simple-moving-average/m-p/316912#M163594</link>
    <description>&lt;P&gt;hi , &lt;/P&gt;

&lt;P&gt;i am analysing the daily data of product which has a closing price. i wish to find all products which has closing price greater than the moving average of lets say 5 days , 10 days.  i am getting the correctly calculated sma but not in the desired row i.e. for 16th jan 18, DMA is calculated in 10th jan 18. &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4182i2B5B489A3ABDD49E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;request you to please suggest the solution. &lt;/P&gt;

&lt;P&gt;i wanted to show the product if the closing price is less than 5dma , in this case i.e. 16 jan 18, closing price is less than 5 DMA but the query is not showing the result. &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4183i04F1B136F411A841/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jan 2018 17:22:39 GMT</pubDate>
    <dc:creator>himpor</dc:creator>
    <dc:date>2018-01-16T17:22:39Z</dc:date>
    <item>
      <title>simple moving average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-moving-average/m-p/316912#M163594</link>
      <description>&lt;P&gt;hi , &lt;/P&gt;

&lt;P&gt;i am analysing the daily data of product which has a closing price. i wish to find all products which has closing price greater than the moving average of lets say 5 days , 10 days.  i am getting the correctly calculated sma but not in the desired row i.e. for 16th jan 18, DMA is calculated in 10th jan 18. &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4182i2B5B489A3ABDD49E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;request you to please suggest the solution. &lt;/P&gt;

&lt;P&gt;i wanted to show the product if the closing price is less than 5dma , in this case i.e. 16 jan 18, closing price is less than 5 DMA but the query is not showing the result. &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4183i04F1B136F411A841/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 17:22:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-moving-average/m-p/316912#M163594</guid>
      <dc:creator>himpor</dc:creator>
      <dc:date>2018-01-16T17:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: simple moving average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-moving-average/m-p/316913#M163595</link>
      <description>&lt;P&gt;I believe the issue is that Splunk is calculating the sma in reverse-chronological order, because this is the ordering of the results. If you replace your command &lt;CODE&gt;| sort -Date&lt;/CODE&gt; with &lt;CODE&gt;| sort Date&lt;/CODE&gt;, calculate your averages, and then put things back in your desired ordering by adding &lt;CODE&gt;|sort -Date&lt;/CODE&gt; after the calculations -  this should get you the actual averages you are seeking.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 17:35:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-moving-average/m-p/316913#M163595</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-01-16T17:35:00Z</dc:date>
    </item>
  </channel>
</rss>

