Gauge the strength of the resistance level of a stock just using EMA
Firstly, you mean resistance not support, as a support is below the current price and resistance is above the price. Secondly using a MA as support or resistance would mean that that support or resistance level would move up or down as the price moved up or down and would not be static at $25. Generally stocks will range trade more often than they will be trending (either up or down), so a stock can be range trading between a support and resistance levels for months and even years, and usually the longer it range trades for, the bigger the outbreak (either up or down) will be when it does happen. Using a MA (especially shorter dated ones) as support or resistance (or as a up or down trend line) works better when a stock is already trending up or down. When a stock is moving sideways it will tend to keep crossing above and below the MA, and you will be whipsawed if you try to use them as your trigger for entry in these situations. Compare the two charts below:  In the first chart the stock is up-trending for over 6 months and the 50d EMA is being used as a support or up-trending line. As long as the price does not break through and close under the 50d EMA then the uptrend continues. You could use this EMA line as a means of entering the stock when prices move towards the EMA and bounce off it back up again. Or you could use it as your stop loss level, so if price closes below the EMA line you would sell your position.  In the second chart, the stock has been range trading between the support line at about $21.80 and the resistance line at about $25.50 for 10 months. In this case the price has been moving above and below the 50d EMA during these 10 months and you may have been whipsawed many times if you were trading each break above or below the 50d EMA. A better strategy here would be to buy the stock as it approached the support line and bounces up off it and then close and reverse your position (go short) when the price approached the resistance line and bounces down off it.  Edit: When range trading you would have your stops just below the support line when going long and just above the resistance line when going short, that way if it does break through support or resistance and starts trending you will be covered. So this shows that different strategies should be used when a stock is trending to when it is range trading. MAs are better used as entry signal during an established uptrend or downtrend than when a stock is range trading.
That is true. You will not be able to reconstruct the value of the index from the data returned with this script.  I initially wrote this script because I wanted data for a lot of stocks and I wanted to perform PCA on the stocks currently included in the index. I love technical analysis, and use candlesticks as part of my technical analysis system for trading mutual funds in my 401K. However, I would never use a candlestick chart on its own.  I use combination of candlesticks, 2 different EMAs, MACD, bollinger bands, RSI and hand drawn trend lines that I constantly tweak.  That's about as much data input as I can handle, but it is possible to graph it all at once and see it at a glance if you have the right trading platform. My approach is very personal, not very aggressive, and took me years to develop. But it's fairly effective - 90% + of my trades are winners. The big advantage of technical analysis is that it forces you to create repeatable rules around which you base your trading.  A lot of the time I have little attention at all on what fund I am trading or why it is doing well in that particular market condition. It's basically irrelevant as the technical system tells when to buy and sell, and stops you trying to second guess whether housing, chemicals, gold or asian tigers are is doing well right now. If you don't keep to your own rules, you have only yourself to blame. This keeps you from blaming the market, which is completely out of your control. I explain many of my trades with anotated graphs at http://neurotrade.blogspot.com/ "I would have to disagree with the other responders. In technical analysis of stock charts, various short and long term moving averages are used to give an indication of the trend of the stock in the short and long term, as compared to the current price. I would prefer to use the term moving average (MA) rather than average as the MA is recalculated every day (or at appropriate frequencies for your data) on the period you are using. I would also expand on the term ""moving average"". There are two that are commonly used Going back to the question, of the value of this number, For example if the current price is above the 200 day EWMA and also above the 30 day EWMA, then the stock is broadly trending upwards. Conversely if current price is below the 200 day EWMA and also below the 30 day EWMA, then the stock is broadly trending downwards. These numbers are chosen on the basis of the market you are trading in, the volatility and other factors. For another example of how a number of moving averages are used together, please have a read of Daryl Guppy's Multiple Moving Average, though this does not use moving averages as large as 200 days." "For a retail investor who isn't a Physics or Math major, the ""Beta"" of the stock is probably the best way to quantify risk.  Examples: A Beta of 1 means that a stock moves in line with the market. Over 1 means that you would expect the stock to move up or down faster than the market as a whole. Under 1 means that you would expect the stock to move slower than the market as a whole." "ycharts.com has ""Weighted Average PE Ratio"" and a bunch of other metrics that are meant to correspond to well known stock metrics.  Other websites will have similar ratios." Okay, how good is my programmed test going to be if I'm new to trading? I thought the biggest flaw to algorithm trading is the people that write the code?  I am still trying to develop my own sense of swing reading with significant structure, price action, and other technicals. I was going to use the click-by-click, ninjatrader method to see what works best.   So, between your answer and my question. If I was going to buy data, from what stocks would be the best data to mine. L? The values of 12, 26 and 9 are the typical industry standard setting used with the MACD, however other values can be substituted depending on your trading style and goals. The 26d EMA is considered the long moving average when in this case it is compared to the shorter 12d EMA. If you used a 5d EMA and a 10d EMA then the 10d EMA would be considered the long MA. It is based on what you are comparing it with. Apart from providing signals for a reversal in trend, MACD can also be used as an early indication to a possible end to a trend. What you look out for is divergence between the price and the MACD. See chart below of an example:  Here I have used 10d & 3d EMAs and 1 for the signal (as I did not want the signal to show up). I am simply using the MACD as a momentum indicator - which work by providing higher highs in the MACD with higher highs in price. This shows that the momentum in the trend is good so the trend should continue. However the last high in price is not met with a higher high in the MACD. The green lines demonstrate bearish divergence between price and the MACD, which is an indication that the momentum of the trend is slowing down. This could provide forewarning that the trend may be about to end and to take caution - i.e. not a good time to be buying this stock or if you already own it you may want to tighten up your stop loss. "Support and resistance points indicate price levels where there have been a large amount of trading activity, usually from institutions, that tend to stabilize the price of a stock. Support is a temporary FLOOR, where people have been buying in large quantities. That means there's a good chance that the stock won't go below this level in the near term. (But if it does, watch out.) Resistance is a temporary CEILING where people have been selling. When the stock price hits this level, people tend to sell, and push it back down. Until there are ""no more"" sellers at this level. Then the price could skyrocket if there is enough buying." Don't have access to a Bloomberg, Eikon ect terminal but I was wondering if those that do know of any functions that show say, the percentage of companies (in different Mcap ranges) held by differing rates institutionally. For example - if I wanted to compare what percentage of small cap companies' shares are 75% or more held by institutions relative to large cap companies what could I search in the terminal? One of the most obvious uses of SMAs is the detection of a trend reversal. A trend reversal happens when a short term SMA crosses over a longer term SMA.  For example, if a 20 day moving average was, previously, above a 200 day moving average, but has crossed over the 200 day and is currently below the 200 day then the security has performed a 'death cross' and the trend is for lower and lower prices.  Stockcharts.com has excellent 'chart school' for the beginning chart user. They also provide excellent charts.  Here is a link: http://stockcharts.com/school/doku.php?id=chart_school I  like to use a 20 day SMA, a 200 day SMA, and a 21 day EMA. You can call it a stock rating of say between 0 to 5 or 0 to 10 or whatever scale you want to use.  It should not be called a recommendation but rather a rating based on the criterial you have analysed. Also a scale from say 0 to 5 is better than using terms like buy, hold and sell. I implemented this in MatLab about 10 years back. You just calculate your conditional variance of the required assets (x_i), use matrix multiplication on the correlation matrix (rho_i_j) from the same asset (this could be a point of research but unless you are using extreme conditions on the VaR it makes little difference) then apply a standard Markiowitz optimisation approach. You can then just use simple Sharpe ratio (marginal return over conditional risk) at every point on the efficient frontier. Then choose the maximum Sharpe ratio point. If you had a trading system, and by trading system I mean the criteria setup that you will take a trade on, then once a setup comes up at what price will you open the trade and at what price you will close the trade. As an example, if you want to buy once price breaks through resistance at $10.00 you might place your buy order at $10.05. So once you have a written trading system you could do backtesting on this system to get a percentage of win trades to loosing trades, your average win size to average lose size, then from this you could work out your expectancy for each trade that you follow your trading system on. Relative Strength Indicators are also trailing indicators.  They are based on the number of recent upticks or downticks in an investment's price.  (The size of a tick is quantized, and related to the investment's price.)  By the time enough upticks have accumulated to generate a buy signal, the investment has already increased in price significantly.  Similarly, by the time enough downticks have accumulated a to generate a sell signal, the investment has already dropped in price significantly. The theory of Relative Strength Indicators is based on the hope that moves found by these indicators are likely to continue after the signal is generated.  But even if this is the case, someone who relies on these indicators will miss out on the first part of the move. Dorsey-Wright offers investment research based on the theory of Relative Strength Indicators.  They offer investment vehicles based on this research.  They also work with local investment advisors to develop custom back-tested strategies.  They have published a white-paper, with references to others' research. That's why I said you can do a weighted average and take into account other factors. The initial average calculation is just a simple, high level average to compare betas across different listings. For a more precise calculation you would have to weigh different factors.