LuxAlgo

Moving Averages Proximity Oscillator [LuxAlgo]

This indicator returns the percentage or count of prices greater than simple moving averages with periods in a user set range, as well as the moving average period that is the closest to price values.

Settings

  • Minimum Length: Minimum SMA period
  • Maximum Length: Maximum SMA period
  • Smooth: Control the degree of smoothness of the indicator outputs
  • Normalized: Normalize the indicator outputs in a range (0, 100)
  • Src: Input source of the indicator

Usage

The indicator returns two outputs.

 
The "Price Above MA's" output returns for a current price value the number of times this one is greater than simple moving averages with periods ranging from Minimum Length to Maximum Length. This oscillator can be expressed as a percentage if Normalized is selected.


This oscillator allows identifying the direction of an underlying trend in the price. Higher Minimum Length and Maximum Length settings will return indications regarding longer term price variations, while shorter ranges will return less detailed outputs. This can be seen in the chart above where Minimum Length = 80 to Maximum Length = 100.

The "Proximity Index" output on the other end does not return information regarding the direction of an underlying trend but the period of the simple moving average with periods ranging from Minimum Length to Maximum Length that is the closest to the current price value.


For various simple moving averages of differing periods, we can see that SMA's with shorter periods will tend to stay closer to the price, when price start reverting it will reach higher periods moving averages.


As such, this second indicator output can help identify the start of new trends, with higher values indicating price is reverting toward longer-term moving averages, suggesting a new trend forming.
Phát hành các Ghi chú:
Minor changes.

Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Mã nguồn mở

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

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

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

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