LuxAlgo

Triangular Momentum Oscillator & Real Time Divergences [LuxAlgo]

LuxAlgo Wizard Cập nhật   
Oscillators are widely used in technical analysis and can return a large amount of information to the trader depending on their design. It is common to use oscillators to detect divergences with the price, divergences occur when the tops/bottoms made by the oscillator and price are negatively correlated.

The following oscillator is based on the momentum of a triangular moving average, hence the name "triangular momentum" because of the very smooth property of the triangular moving average, we aimed at a real-time detection of divergences instead of using more common methods such as relying on pivot high/low detection which are suitable for more noisy oscillators.

The oscillator can also be colored based on a gradient derived from the correlation between its output and the price which can be useful to detect when the oscillator is out of phase (significantly lagging or leading the price).

Settings
  • length : Period of the oscillator, higher values return a smoother output.
  • src : Input source of the indicator.
  • Show Lines : Show lines connecting the current top/bottom with the previous one made by the oscillator when a divergence is detected. True by default.
  • Color Based On Price/Oscillator Correlation : Allows the color of the oscillator to change based on its correlation with the price, with red colors suggesting a negative correlation.

Usages

The advantage of having a smoother oscillator for divergences detection is that it can be done in real-time since a top or bottom is present when the oscillator first difference cross 0. Smoother oscillators are also easier to interpret, however, they will still suffer from lag.

The divergences detected by the oscillator are regular divergences, where the oscillator leads price variations.


Using higher values of length allows the oscillator to filter out longer-term variations thus being smoother as a result.

By using the color mode based on the price/oscillator correlation we can see where the oscillator leads or lag the price, and since divergences are based on the price and oscillator going in the opposite direction we can have information where price might reverse.


It is also possible to interpret the oscillator without relying on the divergence detection, with a decreasing value of the oscillator indicating a downtrend and an increasing value indicating an uptrend.

Phát hành các Ghi chú:
Minor Changes.
Phát hành các Ghi chú:
Update to script title & 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 đồ?