OPEN-SOURCE SCRIPT

Distance from Moving Average

Cập nhật
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.
Phát hành các Ghi chú
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.


Phát hành các Ghi chú
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
Phát hành các Ghi chú
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.
Phát hành các Ghi chú
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

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm