OPEN-SOURCE SCRIPT

MA Difference

Theo cereallarceny
Cập nhật
The MA Difference indicator shows 3 histograms representing differences in moving averages between a base MA (10) and 3 MA's: short (20), medium (50), and long (200). It also shows an exponentially weighted trend line which can indicate breakout opportunities, has alerts on all base <-> X crossovers, and shows potential consolidation zones where MA differences are below a user-defined tolerance.

The suggested way to use this indicator is to place a trade when the trend line is above the histogram (and filling the space between them). This indicates that the current MA values are significantly above or below the expected range and that prices are in the midst of breaking out. You may also consult the consolidation zones to eliminate false breakouts and momentary changes in trend. You may also consult the various short, medium, and long crossovers and crossunders to time entries and exits accordingly.

Histograms

The 3 histograms represent the differences between:

  • Base MA (10) and Short MA (20)
  • Base MA (10) and Medium MA (50)
  • Base MA (10) and Long MA (200)


All 4 moving average values can be configured in the indicator's settings. Consistency in direction and color of the histogram indicates a consistent trend across the various moving averages.

Trend Line

The trend line is an exponentially weighted average of the 3 moving averages, scaled by a factor configurable in the settings. When using the trend line, shading will be applied to the difference between the extremes of the histogram and the trend line to indicate that the chart is in a "breakout zone" and is beyond the normal, gradual sway of price action.

Crossovers/Crossunders

You may optionally turn on crossovers and crossunders in the indicator's settings to display when a short, medium, or long crossover occurs against the base moving average. Likewise, alerts are available for each crossover and crossunder for each of the 3 moving average convergences.

Consolidation Zones

Consolidation zones, as well as a line representing the current amount of consolidation, can also be optionally drawn on the chart. These indicate when a security is likely in consolidation, according to the spread of various MA values.
Phát hành các Ghi chú
Including or excluding the long MA in the calculation for consolidation.
Moving Averages
cereallarceny

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