glgene 616 posts msg #137954 - Ignore glgene |
9/3/2017 10:10:21 PM
I know that many stock-reporting services typically include a 50-day MA chart. But for some reason, the Wall Street Journal (WSJ) uses 65-day (13-week) MA charts, displaying the S&P 500, Dow 30, and Nasdaq. Anyway I have included a simple SF script below that is good for either the Table or Charts output in StockFetcher.
Comments on my script
====================
1) I use a Symlist of SPY, DIA, and QQQ (even though QQQ is the Nasdaq 100 and ONEQ is the Nasdaq). Big traders, I suspect, use the QQQ due to heavy trading volume. Should you desire, you can easily add more stock symbols in the Symlist.
2) I use a Relative Moving Average calculation in the script, i.e., an MA divided by another MA.
3) I multiply the result by 100 to produce a number that shows more exactness in result.
4) A result of exactly 100 would mean that Price = 65-day MA. Price and MA(1) are the same, but I use MA(1) in the script in case you would want to easily modify it to be -- for example -- MA(15) / MA(65) or MA(50) / MA(200). I alternatively show you how Close/MA(65) works if all you wanted to do was use the equivalent of MA(1).
5) Run this script on 9/1/2017, and you'll get these results:
QQQ ... 102.92, which means Price [same as MA(1)] is 2.92% higher than MA(65)
DIA ..... 101.76
SPY..... 101.27
So, QQQ on 9/1/2017 is stronger than DIA and SPY. Look back 1 month to get 1-month ago results, etc.
That's it for this simple "101" script.
-- Gene in FL
|