OPEN-SOURCE SCRIPT

Distance from Moving Average

已更新
1) Depicts price distance from user selected moving average for traders to pick good Risk : Reward entry points based on moving averages
2) It also compares the current distance from the moving average to the highest and lowest values of the distance from moving average based on the Comparison lookback bars length (default = 200)
3) The bars are shaded according to how close the current value is versus the lookback period highest and lowest. If it is closer to the extremes, then the bars become more transparent color which indicates the distance from MA could be coming to a climax and a pullback to the MA should be expected.
發行說明
Updated colours and corrected description

How to use this indicator
1) It depicts price distance from user selected moving average for traders to pick good Risk : Reward entry points based on moving averages
2) It also compares the current distance from the moving average to the highest and lowest values of the distance from moving average based on the Comparison lookback bars length (default = 200)
3) The bars are colour gradient according to how close the current value is to the lookback period highest and lowest. If it is closer to the extremes, then the bars are shaded closer to the selected color (blue for above 0 & Red for below 0) which indicates the distance from MA could be coming to its farthest point and a price pullback to the MA could be expected.
4) Bars being extended on either side, could be a signal to exit a trade. If its extended a lot on the "Up" side, then exit longs, and if its extended a lot on the "Down" side, then exit short positions.
5) Anecdotal side effect of this tool is that I've noticed a contraction in the bars on either side does mostly correlate with volume and price contraction for the stock. So it could be used to signal a VCP. Again this is observational and will need to be validated across multiple instruments when a VCP occurs

When Not to Trade
As a relatively new trader, my main goal is to use this tool as an indicator of when NOT to enter into a position.
  • When the bars are very extended on either side, don't make new entry in the direction of the current trend as the risk : reward isn't good at this point. A bet can be made on a reversal trade if the bars reach the extremes. However it's recommended to enter into a trade when the bars are closest to 0 i.e. the price is closest to the moving average
  • Bars moving from +ve (above zero) side to -ve (below zero) side abruptly, indicates extreme choppiness in the stock. New positions should probably wait till the froth settles and more gradual changes occur in the bars.


發行說明
Feature Update!
- Changed the default calculation to a % scale to normalize the bars across instruments priced at various scales
- Absolute distance to mean is still available as an option in settings
發行說明
Inspired by JohnMuchow's Moving Averages for multiple timeframes indicator
  • Added ability to set different MA & Lookback values for each type of timeframe - intraday, Daily, Weekly & Monthly. This is especially useful in multi-timeframe analysis in a single chart where for e.g. a trader might use 20 EMA on a daily chart with a 200 day lookback, but 8 SMA on weekly chart with a 52 week lookback. Now this indicator will work for both timeframes without the need to change settings for each individual timeframe every time.
  • Added separate colors for each timeframe if users want to configure it so. All timeframes default to the same colors.
  • Updated default colors to Blue for above zero and Red for below zero.
發行說明
New version with bands!!
You can now (if you wish) add upper and lower bands/lines at levels of your choosing. Optionally pot a zero line as well for those who would like that.
Moving AveragesmultitimeframeTrend Analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明