Hey guys, How can I calculate a standard deviation from the moving average(origin point). I don't want to enter a trade where the stock is too far from my MA as I know the move is already extended and I am chasing it.
Google bollinger bands. Should throw a formula at you. Could also check out keltner channels, somewhat similar but uses Average True Range to form bands.
You've just described Bollinger Bands, one of the most-used technical indicators. They should be pre-loaded on your charting platform. Just throw them on there and adjust the settings (i.e. 20 bar MA with 2 standard dev bands, or 50 bar MA with 2.5 standard dev, etc. etc.) If you want the gory details, this link should give you a good overview. https://school.stockcharts.com/doku.php?id=technical_indicators:bollinger_bands
I also recommend you look into the Fisher Transform by John Ehlers. The transform will "Gaussianize" your data over a given lookback window.
If you apply a linear regression channel to the data it will estimate the standard deviation for the entire data in the channel. This can be compared to the bollinger or keltner style estimates.
you should take log process, then combine the process and take standard deviation about zero for the combination. if you don't take logs it's not ideal (near the origin)
I have compiled the daily % change for about 4000 US stocks and AAPL. This is the histogram plot. P(0) = 0% to <1%, P(-1) = -1% to < 0% and so forth.