2 Replies Latest reply: Aug 29, 2016 7:01 AM by balraj ahlawat RSS

    Different moving averages in script

    Espen Skeie

      Hi

       

      Can anyone give me a hand on how to create different moving averages in the script load?

       

      I have some stock market data, daily values, and I want to create an average for the 5-10-20-50-100 and 200 days.

       

      LOAD

                '$(_vNameOfStock)' as Ticker,

                '$(_vNameOfExchange)' as Exchange,

                Day(Date) As StartDate,

                Num(Month(Date)) As StartMonth,

                Year(Date) As StartYear,

                TradeDate,

                Open,

                High,

                Low,

                Close,

               Volume,

                [Adj Close]

                                                                       

          FROM $(URL_String) (txt, codepage is 1252, embedded labels, delimiter is ',', msq);

       

      Best regards

      Espen